Overview
- Tool name: OpenCode
- Developer: Anomaly
- Official website: https://opencode.ai/
- Category: AI Coding Tools
OpenCode is an open-source AI coding agent that lives in your terminal, with a beta desktop app, IDE extensions and a web interface alongside it. It is built by Anomaly, the company formerly known as SST, and is one of the most popular open-source coding agents in existence, with over 208,000 GitHub stars, 950 contributors and more than 16 million monthly developers.

Its defining trait is model freedom. The agent itself is free and MIT-licensed, and instead of locking you to one vendor it lets you connect any model from 75+ providers through Models.dev, sign in with a GitHub Copilot or ChatGPT Plus/Pro account you already pay for, or run a local model through Ollama. It auto-loads the right LSP so the model sees real diagnostics and symbols, supports multiple parallel agent sessions, and offers shareable session links.
A useful safety design is the two-agent split: a read-only plan agent that analyzes and proposes, and a build agent that actually edits files and runs shell commands, with per-tool allow/ask/deny permissions. The one thing to understand about pricing is that OpenCode the tool is free, but the models it drives are not: you pay for tokens either directly to a provider or through OpenCode's own Zen gateway.
Key Uses
- Write and edit code in the terminal: Start an agent session in any repository and let it implement features, fix bugs or refactor, with full file and shell access under your permission rules.
- Plan before touching code: Use the read-only plan agent to review a codebase, understand a change or sketch an approach without it editing anything.
- Use your existing AI subscriptions: Log in with GitHub to use your Copilot account, or with OpenAI to use your ChatGPT Plus or Pro account, instead of paying a second vendor.
- Bring any model or local model: Point OpenCode at Anthropic, OpenAI, Google, OpenRouter, a corporate gateway or a local model through Ollama for fully offline work.
- Run parallel sessions: Start multiple agents on the same project at once, such as refactoring legacy code in one while debugging a feature in another.
- Automate and embed: Script OpenCode into CI, or use the SDK and plugin API to build your own tooling on top of the agent.
Pricing
- Open-source agent (free, MIT): the terminal client, desktop app and IDE extensions cost nothing, with no seat fee and no feature gates. You only pay for the models you use.
- Bring your own key (BYOK): connect your own Anthropic, OpenAI, Google, OpenRouter or other provider API key, or a local model through Ollama for zero inference cost.
- Zen (pay-as-you-go): OpenCode's curated gateway of 60+ coding-benchmarked models, billed per 1M tokens, from about $0.20 input / $1.20 output for budget models up to roughly $30 / $180 for top models such as GPT-5.5 Pro, with Claude Opus 5 around $5 / $25. Several models are currently free on a time-limited basis.
- Go ($10/month): a flat subscription for curated open models such as DeepSeek, Qwen, GLM and Kimi, with usage caps of about $12 per 5 hours, $30 weekly and $60 monthly. A Go Plus tier at $40/month adds several times more allowance for heavier use.
- Enterprise (contact sales): per-seat pricing with SSO, a central config that can lock the agent to an internal gateway, and workspace controls for teams that need governance.
The agent is MIT-licensed and free; the paid options above are for model access only. Zen charges a card processing fee of 4.4% plus $0.30 per top-up, and auto-reloads $20 when your balance drops below $5. Model prices change over time, so treat these figures as a guide. This page is not affiliated with Anomaly.
Who It Is For
- Terminal-native developers: If you already live in a TUI and want agent sessions next to your shell, OpenCode fits without forcing a graphical editor.
- Cost-conscious solo developers: Route routine work to cheap open models through Go, keep BYOK for your main provider, and reserve frontier models for hard problems.
- Privacy-sensitive teams: OpenCode does not store your code or context, and can run fully local or against an internal gateway, which suits regulated environments.
- Teams that want to avoid vendor lock-in: Model neutrality and the MIT license mean you can audit, fork and self-host the agent and switch providers at will.
- Developers reusing existing subscriptions: If you already pay for GitHub Copilot or ChatGPT Plus/Pro, you can use that entitlement inside OpenCode instead of a second bill.
- Open-source contributors and tinkerers: Read the implementation, write plugins against the SDK, or fork it under the permissive MIT licence to fit your workflow.
How to Use OpenCode
1. Install OpenCode with `curl -fsSL https://opencode.ai/install | bash`, or via npm, Bun, Homebrew, Scoop, Chocolatey or Pacman (OpenCode 2 uses a separate `v2` installer).
2. Open a terminal, `cd` into your project and run `opencode`, then run `/init` so it analyzes the project and generates an AGENTS.md file.
3. Run `/connect` in the TUI and pick a provider: sign in with GitHub Copilot, OpenAI (ChatGPT Plus/Pro), or paste an API key for another provider.
4. Choose a model with the model picker, or configure your default provider and model in `opencode.json` (JSONC format).
5. Toggle between the plan agent (read-only) and the build agent (edits and runs commands) with the Tab key.
6. Review the plan agent's proposal, then switch to the build agent to apply the change, approving sensitive commands as prompted.
7. Set up LSP servers, MCP tools, AGENTS.md project instructions and per-tool allow/ask/deny rules to tailor behaviour.
8. Optionally add Zen credits for one balance across models, or point OpenCode at a local Ollama model for fully offline use.
Tips for Best Results
- Review before applying: keep the plan agent read-only and only hand control to the build agent after you agree with the approach.
- Tighten permissions: set per-tool allow/ask/deny rules so destructive commands and edits to sensitive files always ask first.
- Reuse what you already pay for: link a GitHub Copilot or ChatGPT Plus/Pro account before buying separate model credits.
- Write an AGENTS.md in the repo root with build commands, conventions and gotchas so every session starts with the right context.
- Route by difficulty: cheap open models (via Go) for routine edits, frontier models for hard reasoning, local models for sensitive data.
- Watch Zen balances: enable spend caps per workspace or member, and remember Zen's top-up card fee (about 4.4% + $0.30) makes it slightly pricier than going direct.
- Use share links to hand a session to a teammate or reproduce a bug instead of pasting long transcripts.
- Keep the agent and config in version control where it makes sense, and audit what a plugin or MCP server can touch before enabling it.
Limitations
- Terminal-first design: the polished experience is the TUI, while the desktop app is still in beta, so it is not a full graphical editor like Cursor.
- You still pay for models: the tool is free, but heavy use of frontier models adds up the same way a subscription would.
- Claude subscription login removed: following legal requests from Anthropic in March 2026, the Claude Pro/Max OAuth sign-in was dropped, so existing Claude subscriptions no longer fund usage; use API keys or Zen instead.
- No formal compliance attestations for the open client: there is no SOC 2 or ISO 27001, and enterprise support details are limited to the paid Enterprise track.
- AI output still needs review: generated code can contain bugs or security issues, so test and review before production, just as with any coding agent.
- Impostor sites exist: opencode.ai is the only official domain; lookalike pages such as open-code.dev and opencode.ac.cn are unrelated clones, so install only from the official site or the GitHub repo.
Frequently Asked Questions
Is OpenCode really free?
The agent is MIT-licensed and free, with no seat fee and no feature gates. You only pay for the models you use, either through your own API keys, an existing subscription, or OpenCode's optional Zen gateway and Go plan.
Who develops OpenCode?
OpenCode is built by Anomaly, the company formerly known as SST, the team behind the SST framework. The project is hosted on GitHub as anomalyco/opencode, which redirects from the old sst/opencode repository.
Do I need an AI subscription to use OpenCode?
No subscription is required. You can bring your own API key, sign in with GitHub Copilot or ChatGPT Plus/Pro, or run a local model through Ollama. A free account plus your own keys is enough to start.
Can I use my existing AI subscriptions?
Yes for some. You can log in with GitHub to use your Copilot account, or with OpenAI to use ChatGPT Plus/Pro. The Claude Pro/Max login was removed in March 2026, so Claude access now goes through API keys or Zen.
What is Zen?
Zen is OpenCode's pay-as-you-go gateway of 60+ models the team has benchmarked for coding agents. It bills per 1M tokens, from around $0.20 in / $1.20 out for budget models up to roughly $30 / $180 for top models, with auto-reload and spending caps.
What is the Go plan?
Go is a flat $10 per month subscription for curated open models such as DeepSeek, Qwen, GLM and Kimi, with usage caps of about $12 per 5 hours, $30 weekly and $60 monthly. A $40 per month Go Plus tier offers several times more allowance.
Can OpenCode run only in the terminal?
No. It works as a terminal TUI, a beta desktop app for macOS, Windows and Linux, IDE extensions (VS Code, Cursor, Zed, Windsurf and others) and a web interface.
What models and languages does OpenCode support?
It connects to 75+ LLM providers through Models.dev, including local models. Language support is driven by the LSP it auto-loads, so it works across the languages your tooling covers, not a fixed list.
What about my code and privacy?
OpenCode does not store your code or context data, and it can run fully local or against an internal gateway, which makes it suitable for privacy-sensitive environments. For Zen, data retention depends on the underlying provider.

