OpenCode

A free terminal agent that talks to 75+ model providers, so no single AI company can price you out or shut you off.

Price
Free
Free tier
Free tier: yes
Updated
Updated Sep 6, 2026
Website
Website

Good for / not for

  • Developers who want to move between models — cheap ones for routine edits, expensive ones for hard problems.
  • Anyone who has been rate-limited by a single provider and wants somewhere else to go mid-project.
  • Terminal users who want an agent that is still shipping, unlike Aider.
  • People who would rather pay per token than hold another monthly subscription.
  • Anyone who wants a graphical editor or a single polished vendor experience.
  • People who want the tool to make model choices for them; the freedom is the point, and it is also the work.
  • Teams that need an agent to respect project conventions unsupervised — reviewers report it ignoring stated ones.

What it actually does

OpenCode runs in your terminal, in your project directory. You describe what you want, it reads the files it needs, proposes edits and runs commands, in the same shape as any other coding agent. The difference is the layer underneath. Instead of being wired to one AI company, it can reach more than 75 providers, so the model is a setting rather than a constraint. You supply your own API keys and pay each provider directly. If you would rather not collect keys, the project runs an optional hosted gateway called Zen: one account, many models, billed per million tokens with no subscription attached, and six models offered at no cost. Either way nothing about your setup is locked to a vendor, and switching when a provider raises prices or throttles you does not mean switching tools. The project is MIT licensed and, at 205,312 stars, the most-starred agent covered here. Releases land most weeks; v1.18.29 shipped on 4 September 2026.

Two ways to pay for the same agent

Run OpenCode with your own provider key, or with a Zen account.

With your own key, the provider bills you and OpenCode costs nothing. With Zen, you are billed per million tokens; when the balance falls below $5, Zen reloads $20 automatically.

From the vendor's docs

Pricing and free-plan limits

Free tier: The CLI is free with no usage cap; Zen adds six models you can use at no cost.

PlanPriceWhat you get
Open sourceFree
  • The full CLI agent, MIT licensed
  • Bring your own keys across 75+ model providers
  • No usage cap; the CLI runs entirely on your machine

The agent itself is free forever. With your own keys, your only bill comes from the provider you chose.

Zen (hosted gateway)Custom pricing
  • One account instead of a key per provider
  • Billed per million tokens, priced per model
  • Six models offered at no cost

Pure pay-as-you-go: there is no monthly fee and no free credit balance. When your balance falls below $5, Zen automatically reloads $20.

Prices checked on Sep 6, 2026 against the vendor's pricing page. Plans change often — confirm before you pay.

Three honest limitations

  1. Provider rate limits bite in long sessions, and reviewers report switching models mid-project to get around them.
  2. It ignores stated project tooling out of the box — one reviewer asked for uv and got pip and venv anyway.
  3. An unrelated Alibaba code-review product shares the name, so searching for help returns results for the wrong OpenCode.

Alternatives

  • AiderChoose Aider instead if you want each edit committed to git automatically and do not mind a slower release cadence.
  • ClineChoose Cline instead if you want the same open licence and key freedom inside VS Code, with an approval prompt at every step.
  • ZedChoose Zed instead if you want an editor rather than a terminal, and a free tier that does not need an API key at all.

Getting started in 5 minutes

  1. Install the CLI from opencode.ai and run it inside a project directory.
  2. Either export an API key for a provider you already use, or create a Zen account and add credit.
  3. Pick a model — start with a cheap one while you learn what the agent does well.
  4. Give it one contained task, then read the diff before you accept it.
  5. Check what it reaches for: reviewers report it defaulting to pip and venv even when told to use uv.

OpenCode questions

Is OpenCode free?
Yes. The CLI is MIT licensed with no usage cap. You either pay a provider directly for tokens, or use Zen, which bills per million tokens with no subscription.
What is Zen?
An optional hosted gateway run by the project. One account reaches many models, billed per million tokens. Six models are free, and the balance auto-reloads $20 when it drops below $5.
Why did the GitHub repository move?
The organisation renamed from SST to Anomaly in mid-2026 and the repository moved to github.com/anomalyco/opencode. The old address redirects to the new one.
OpenCode or Aider?
Both are free terminal agents. OpenCode ships releases most weeks and reaches far more providers; Aider turns every edit into a git commit and has not tagged a release since August 2025.
Do I need to understand model pricing to use it?
Not to start — the six free Zen models cost nothing. But choosing between 75+ providers is the point of the tool, and you get more from it once you know roughly what each model costs.

Related reading

Sources

Research-compiled, not hands-on tested. Compiled from official docs, the vendor's pricing page and community reviews as of Sep 6, 2026. We haven't tested it hands-on yet.

Cline

Free

A free open-source agent inside VS Code that edits files and runs commands, asking your permission before each step.

Aider

Free

A free terminal tool that edits your code with the model you choose, turning every change into a git commit you can review or undo.

Zed

from $10/month

A fast native editor written in Rust with agents and multiplayer built in, and 2,000 free accepted AI edit predictions.