OpenCode
The most-starred open-source terminal coding agent
About
OpenCode is an MIT-licensed terminal AI coding agent maintained by Anomaly (the company formerly called SST, also behind OpenNext and OpenTUI). It has become the most-starred coding agent on GitHub with more than 187,000 stars and roughly 900 contributors — more stars than Claude Code — and it is the clearest example of the open, model-agnostic approach: the agent itself is free, and you bring whatever model you want. Mechanically it runs in a terminal UI (with a beta desktop app, IDE extension and web UI around it), ships two agents you toggle with Tab — build, which has full file and shell access, and plan, which is read-only and asks before running shell commands — and auto-loads the language server for your project so the model sees real diagnostics and symbols instead of guessing from text. It reaches 75+ model providers through Models.dev, including local models, and can sign in with an existing GitHub Copilot or ChatGPT Plus/Pro subscription, so you may not need to pay anything extra at all. Code and context are not stored by the vendor. Pricing follows that philosophy: the CLI is $0 and open source, the optional Go subscription is $5 for the first month then $10/month for 15 open coding models (capped at $12 per 5 hours, $30 per week, $60 per month, one subscriber per workspace), and Zen is a pay-as-you-go gateway across 50+ models that auto-tops up $20 when your balance drops below $5. Enterprise is seat-priced and quote-only, and can be restricted to an internal AI gateway with no token fee. Watch the BYO-key path: there is no built-in per-session spend cap, so a long run on a frontier model can get expensive. One naming note: the original OpenCode by Kujtim Hoxha moved to Charm and became Crush; the team holding the domain rewrote the agent in TypeScript, which is the project described here.
Key Features
- Terminal UI agent with build and read-only plan modes
- 75+ providers via Models.dev, including Ollama and other local models
- Sign-in with existing GitHub Copilot / ChatGPT Plus subscriptions
- Automatic LSP loading for real symbol and diagnostic context
- Optional Go subscription and Zen pay-as-you-go gateway
- Local-first privacy — vendor stores no code or context
Deals, Discounts & How to Save
OpenCode is free, so the only cost is model usage — and the cheapest path is often zero extra spend, because you can log in with a GitHub Copilot or ChatGPT Plus/Pro subscription you already pay for. When you do pay per token, route everyday work to local models or to the $10/month Go tier (hard-capped at $60/month) and keep frontier models for genuinely hard tasks.
Pros
- Free, MIT-licensed and model-agnostic — 75+ providers including local models
- Reuses an existing Copilot or ChatGPT subscription, so the marginal cost can be $0
- Auto-loads the project language server, so the model sees real diagnostics
- Most-starred coding agent on GitHub with a very active release cadence
Cons
- BYO-key usage has no built-in per-session spend cap
- Young project — breaking changes between versions are common
- Enterprise pricing is not published, which makes budgeting harder
- Desktop and IDE clients are still beta compared with the terminal UI
Pro Tips for OpenCode
Try the free CLI with your existing Copilot or ChatGPT subscription before buying anything.
Use plan mode on unfamiliar repos — it refuses edits and asks before running shell commands.
If you pay per token, set a budget at the provider as well: OpenCode has no in-app session cap.
Go at $10/month is the predictable path for routine work; keep frontier models for hard problems.
Pin versions in CI — the project moves fast and breaking changes ship between releases.
Alternatives to OpenCode
Cline
Autonomous coding agent in VS Code & JetBrains
Aider
AI pair programming in your terminal
Claude Code
FeaturedAnthropic's terminal-first AI coding agent
Codex CLI
OpenAI's Rust-powered terminal coding agent
More in Cli Tool
Aider
AI pair programming in your terminal
Claude Code
FeaturedAnthropic's terminal-first AI coding agent
Gemini CLI
Google's free AI coding agent with 1M+ context
Codex CLI
OpenAI's Rust-powered terminal coding agent