Tools / OpenCode
OpenCode Review
Provider-agnostic coding agent with plan and build modes in your terminal
Last reviewed: October 2026
TL;DR
OpenCode is an MIT-licensed coding agent for the terminal, with a beta desktop app and IDE extension, that connects to 75+ model providers through Models.dev and can reuse a GitHub Copilot or ChatGPT Plus or Pro login. Its Plan and Build modes, LSP integration, and undo make it a practical open alternative to Claude Code and Codex, with the freedom to switch models whenever a better one ships.
License
MIT
Self-hosted
Yes
Cloud option
OpenCode Zen (curated hosted models) is optional
GitHub stars
212.9K★
Checked October 2026
Category
Developer Tools & AI Coding
Pricing
Free under MIT; you pay for model usage via your own API keys, OpenCode Zen, or an existing subscription
What is OpenCode?
OpenCode is an open-source coding agent. Inside a project it reads and edits code, runs commands, and uses built-in Language Server Protocol support for code-aware context. The README describes three agents: build, the default with full access for development; plan, which is read-only, denies file edits by default, and asks before running bash commands; and general, a subagent for complex searches and multistep tasks invoked with @general. You switch between the primary agents with the Tab key. It supports 75+ providers through Models.dev including local models, lets multiple agents run in parallel on a project, and can generate a shareable link to a session with /share, though conversations are not shared by default.
Installation & self-hosting
There is an install script, plus npm, Bun, pnpm, Yarn, Homebrew (the anomalyco/tap formula is described as most current), pacman and AUR, Scoop, Chocolatey, mise, and Nix. On Windows the docs recommend WSL. The docs warn that OpenCode 1 and OpenCode 2 both use the opencode command and can conflict if installed together, and the README tells you to remove versions older than 0.1.x first. After installing, run /connect in the TUI to choose OpenCode Zen (a curated list of models the team has tested) or another provider and paste an API key, then run opencode in a project and /init to create an AGENTS.md file, which the docs recommend committing to Git. The desktop app is in beta for macOS (Apple Silicon and Intel), Windows, and Linux (.deb, .rpm, or .AppImage).
User experience
In the terminal UI you use @ to fuzzy-search project files, Tab to flip between Plan and Build, and /undo and /redo to revert or restore changes. The Plan mode is a useful guard rail: you can have the agent propose a change without touching files, then switch to Build. Customization covers themes, keybinds, formatters, custom commands, and an opencode.json config file. This section reflects the README and docs; we did not use OpenCode hands-on.
Key features
- Plan (read-only) and Build (full access) agents, plus an @general subagent
- 75+ providers through Models.dev, including local models
- Login with GitHub Copilot or ChatGPT Plus or Pro subscriptions
- Built-in LSP support for code-aware context
- /undo and /redo, /share links, and AGENTS.md project instructions
- Terminal UI, desktop app (beta), and IDE extension
- Parallel agents on the same project
What OpenCode does well
- Provider freedom: you can change models without changing your tool
- Plan mode makes it easier to review a proposed approach before any edit
- MIT license and a very large community (about 213,000 stars, 28,500 forks)
- Many install paths, including Nix, Homebrew, and Windows package managers
Where OpenCode falls short
- Quality depends on the model you choose, and you pay for usage separately
- The desktop app is still beta
- OpenCode 1 and OpenCode 2 share a command name and can conflict if installed together
- Fewer enterprise controls and less vendor support than first-party tools
- The repository moved organizations (sst/opencode to anomalyco/opencode), so older links and package names may not match
Pricing
OpenCode is free under the MIT license. Costs come from model usage: your own API keys with a provider, OpenCode Zen's curated models, an existing GitHub Copilot or ChatGPT Plus or Pro subscription, or local models.
OpenCode vs Claude Code
Claude Code is Anthropic's agentic terminal tool and Codex is OpenAI's coding agent, so each is tied to its vendor's models and billing. OpenCode offers a similar terminal-first workflow with open code and provider choice, which lets you mix a strong cloud model for hard tasks with a cheaper or local one for routine work. The first-party tools usually have the tightest integration with their own models; OpenCode wins on flexibility, transparency, and not being tied to one vendor's roadmap.
See all Claude Code alternativesBest for
- Developers who want a terminal coding agent without vendor lock-in
- People who already pay for Copilot or ChatGPT and want to reuse that access
- Teams that want to switch or compare models quickly
- Anyone who likes a read-only planning step before edits
Not ideal for
- Teams that want a centrally managed, vendor-supported coding agent
- Developers who prefer a fully polished GUI-only editor
- Organizations that need strict guarantees about model behavior
Alternatives
Final verdict
OpenCode is the most popular open-source coding agent and a strong default if you value model choice. Use Plan mode on unfamiliar codebases, keep AGENTS.md up to date, and review every diff as you would a teammate's.