
OpenCode
Open SourceThe open-source, provider-agnostic coding agent for the terminal.
OpenCode is an MIT-licensed AI coding agent with a terminal UI, plus a desktop app. It ships two built-in agents, build and plan, that you switch with Tab, and it can run against any LLM provider you configure. It is one of the most-starred coding agents on GitHub.
Best for
Developers who want an open-source terminal agent and the freedom to switch models.
Review summary
The default pick if you want a Claude Code–style terminal agent without locking into one model vendor.
Pros
- +MIT open source
- +Works with any model provider
- +Separate plan and build agents
Cons
- −You manage provider keys and costs yourself
- −v1 and v2 install paths currently coexist
Install
The official docs recommend the install script on macOS and Linux.
curl -fsSL https://opencode.ai/install | bash
npm (also works with bun, pnpm, or yarn):
npm install -g opencode-ai
Homebrew:
brew install anomalyco/tap/opencode
Windows (WSL is recommended; native options):
scoop install opencode
# or
choco install opencode
Quickstart
Start inside your project:
cd /path/to/your/repo
opencode
Connect a model provider from the TUI:
/connect
Then let OpenCode analyze the project and write an AGENTS.md (commit it to Git):
/init
Press Tab to switch between the plan agent (read-only, proposes changes) and the build agent (edits files).


