OpenCode is a free, open-source AI coding agent. Like Claude Code or Codex, it reads your repo, edits files and runs commands from a chat. The difference is that it isn't tied to one model company: it works with 75+ providers, your existing ChatGPT or GitHub Copilot subscription, local models, or the free models OpenCode includes. It runs in the terminal, as a desktop app, in the browser and inside VS Code or Cursor.
It's built by Anomaly, the team behind SST, and is MIT licensed. The repo, anomalyco/opencode, has passed 200k stars and 950 contributors, ships a new release most weeks (v1.18 as of October 2026), and the team says it's used by 16M developers a month.
What OpenCode is, and what it isn't
OpenCode is a full agent with its own harness: its own prompts, tools, permission system and context handling. That's different from apps like T3 Code or Conductor, which start the official Claude Code and Codex CLIs and give them a shared window. With OpenCode, the model changes but the agent stays the same, so your config, commands and habits carry over when you switch from Claude to GPT to Kimi.
It's also not a model provider you have to buy from. The agent is free. You bring the model, in one of four ways:
- An API key from any of 75+ providers through the AI SDK and Models.dev: Anthropic, OpenAI, Google, OpenRouter, Groq, Bedrock, Azure and more.
- A subscription you already pay for: log in with ChatGPT Plus or Pro, GitHub Copilot or GitLab Duo and use it with no extra setup.
- Local models through Ollama or LM Studio.
- OpenCode's own gateways, Zen and Go (see pricing), including a rotating set of free models.
One exception: you can't use a Claude Pro or Max subscription. Anthropic prohibits it, and OpenCode removed the plugins that did it in version 1.3.0. Claude models work through an Anthropic API key, Zen or another provider.
Main features
Build and Plan agents
OpenCode has two main agents, and Tab switches between them:
- Build is the default. It has every tool and can edit files and run commands.
- Plan is for thinking first: it asks before any file edit or shell command, so you can explore an unfamiliar codebase or agree on an approach before anything changes.
The usual loop is to describe the feature in Plan, refine the plan together, then press Tab and tell Build to go ahead. Build and Plan can call subagents for side work: General for multi-step tasks in parallel, Explore for fast read-only code search, and Scout for reading a dependency's source or docs. You can call any of them yourself with an
@ mention.Undo, redo and project memory
Every change the agent makes can be rolled back.
/undo reverts the last change and puts your original message back in the box, so you can reword it and try again; run it several times to step further back, and /redo to go forward. /init scans the repo and writes an AGENTS.md with the project's structure and conventions, which the agent reads on every session. Commit it so the whole team's agents start from the same rules.Any model, switched per session
/connect adds a provider and /models lists everything you have access to. You can change the model mid-session, set different models per agent (a cheap fast one for Explore, a strong one for Build), and add any OpenAI-compatible endpoint by its base URL. With LSP turned on, OpenCode starts the right language server for your files and feeds its errors back to the agent, so it sees type errors the moment it makes them.Terminal, desktop, web and IDE
The terminal interface is the original. There's also a desktop app for macOS, Windows and Linux (still in beta) with tabs for parallel sessions across projects:
opencode web starts the same interface in your browser, with a review panel for the session's changes. It binds to localhost by default; set OPENCODE_SERVER_PASSWORD before you open it to your network.In VS Code, Cursor, Windsurf or VSCodium, run
opencode in the built-in terminal and the extension installs itself. Cmd+Esc opens OpenCode in a split view, your current selection goes into the prompt, and Cmd+Option+K inserts a file reference like @File#L37-42. Zed and other editors that speak the Agent Client Protocol can run it through opencode acp.Under all of these is a client and server.
opencode serve runs a headless server with an OpenAPI spec, and there's an SDK, so you can drive OpenCode from scripts or your own tools. opencode run "..." runs one prompt without the interface, which is handy in CI.GitHub agent
Mention
/opencode or /oc in a GitHub issue or pull request comment and OpenCode works on it inside your own GitHub Actions runner: it explains an issue, or fixes it on a new branch and opens a PR. opencode github install sets up the GitHub app, the workflow and the secrets. A GitLab version works the same way.Share a session
/share creates a public link to the conversation at opncd.ai/s/... that you can send to a teammate or attach to a bug report, and /unshare deletes it. Sharing is manual by default. You can set it to automatic, or turn it off for a whole project in opencode.json, which is worth doing for client code.Extend it
OpenCode reads the same building blocks as other agents, so most of what you've set up elsewhere carries over:
- MCP servers, local or remote, with OAuth.
- Skills: folders with a
SKILL.md, in.opencode/skills/or your home config, loaded only when the agent needs them.
- Custom agents and commands: a markdown file with a prompt, a model and tool permissions becomes a new agent or a
/command.
- Plugins in JavaScript or TypeScript that hook into events, add tools or change behavior.
- Permissions per tool with
allow,askordeny, including patterns for specific shell commands and folders outside the project.
Pricing: Zen and Go
OpenCode itself is free. You pay your model provider, or one of OpenCode's two optional gateways:
| Option | Price | What you get |
|---|---|---|
| Your own keys or subscription | What your provider charges | Any of 75+ providers, ChatGPT Plus/Pro, Copilot, GitLab Duo, local models |
| OpenCode Zen | Pay per request, top up credits | Models the OpenCode team tested and benchmarked for coding: Claude, GPT, Gemini, Kimi, GLM, Qwen and more, plus several free models for a limited time |
| OpenCode Go | $10/month, or $40 for Go Plus | Open models like Kimi, GLM, Qwen, MiniMax and DeepSeek with monthly usage limits |
The case for Zen is consistency. The same open model can behave very differently depending on who serves it, and Zen only routes to providers the team has checked. Their demo runs the same prompt on Kimi K2 through OpenRouter and through Zen, side by side:
On privacy: OpenCode doesn't store your code or context. Zen's providers follow zero retention, except OpenAI and Anthropic, which keep requests for 30 days, and the free models, whose providers may use your data to improve them during the free period. For companies, OpenCode Enterprise adds a central config tied to your SSO and your own AI gateway, so nothing leaves your infrastructure.
How to set it up
- Install the CLI. Any of these work:
- Install script:
curl -fsSL https://opencode.ai/install | bash
- npm:
npm i -g opencode-ai@latest(or bun, pnpm, yarn)
- Homebrew:
brew install anomalyco/tap/opencode(the tap gets updates first)
- Windows:
scoop install opencodeorchoco install opencode, or run it inside WSL, which the docs recommend
- Desktop app: download from opencode.ai/download, or
brew install --cask opencode-desktop
- Open your project and start it:
cd my-app && opencode.
- Run
/connectand pick a provider: log in with ChatGPT or Copilot, paste an API key, or sign in to Zen to start with its free models.
- Run
/initto createAGENTS.md, and commit it.
- Press Tab to switch to Plan, describe what you want, then Tab back to Build to let it make the change.
A modern terminal helps: the docs recommend WezTerm, Alacritty, Ghostty or Kitty. This hands-on review compares it with Claude Code and Codex CLI:
Where it falls short
The Build agent runs every tool without asking by default. That's fast, but it means the agent can run any shell command your user account can. If you want approvals, set
bash and edit to ask in opencode.json, or work in Plan until you trust the task.Quality depends on the model more than with first-party tools. Claude Code and Codex are tuned for one model family each; OpenCode has to work with all of them, and a weak or badly served model gives weak results, which is the problem Zen exists to solve. You also can't bring a Claude Pro or Max subscription, so heavy Claude users pay API prices or go through Zen.
It moves fast: a new release most weeks, and settings and defaults change between versions. The desktop app is still in beta, Windows works best through WSL, and LSP is off until you turn it on. Shared sessions are public to anyone with the link, so turn sharing off for private code.
OpenCode alternatives
OpenCode's edge is that one open agent works with any model, any subscription that allows it, and any interface. The alternatives trade that for something else:
- Claude Code: Anthropic's agent, the way to use a Claude Pro or Max subscription. Best fit for Claude models, locked to them.
- Codex: OpenAI's agent across CLI, IDE and cloud, included with ChatGPT plans. Best fit for GPT models.
- Gemini CLI: Google's open-source terminal agent, the closest match if you want a free option with Gemini models.
- Cursor: an editor first, with its own agent inside it. Pick it if you'd rather review changes in an IDE than in a terminal.
- GitHub Copilot: agent mode in VS Code and other editors, and a cheap flat plan if you're comparing against OpenCode Go.
For a side-by-side of the new agent apps, see Top new agentic IDEs.
Ship faster than your competition
Focus on customers and sales while we handle product delivery. Hire a dedicated AI maker or a whole product team.
Launch new products
Fix your delivery
Hit fundraising milestones











