
OpenCode
An open source AI coding agent you run in your terminal, with a desktop app in beta.
- Stars
- 224k
- Forks
- 30.1k
- Licence
- MIT
- Language
- TypeScript
- Last update
- 4 days ago
- Type
- AI model / agent
What it is
OpenCode is an open source AI coding agent that helps you work on software projects. The README describes it as a terminal-based tool with a built-in set of agents you can switch between, such as a build agent for making changes and a read-only plan agent for exploring code. It is also offered as a desktop application in beta.
- Asking the plan agent to explain how an unfamiliar codebase is organized, without allowing file edits
- Using the build agent to make development changes across a project
- Delegating multistep searches to the @general subagent by mentioning it in a message
- Configuring the tool through its documentation at opencode.ai/v2/docs
Great for
- Developers who want an AI agent that works inside their terminal and existing projects
- People exploring an unfamiliar codebase who want a read-only agent that asks before running commands
- Developers comfortable installing tools via npm, Homebrew, or similar package managers
- Teams wanting an MIT-licensed, inspectable agent rather than a closed product
Not ideal for
- Non-programmers, since the tool is built around reading and editing code (reason: the README assumes development work)
- People who need a stable, fully supported desktop app (reason: the desktop app is marked BETA in the README)
- Anyone who cannot review AI-generated code changes before accepting them (reason: the build agent has full access for development work)
How to get it
- 1
Install with a package manager
You'll need: npm, bun, pnpm, or yarn (for the npm install route) · Homebrew (optional, for the brew route)
Install via npm
npm i -g @opencode/cli@latestInstall via Homebrew (macOS and Linux)
brew install anomalyco/tap/opencode-v2Install via curl script
curl -fsSL https://opencode.ai/v2/install | bash - 2
Run it
- Install using one of the package manager commands listed in the README
- Run the install and confirm the opencode command is available in your terminal
- Open a project folder and start OpenCode
- Press Tab to switch between the build and plan agents
- Read the documentation at opencode.ai/v2/docs to configure it
- 3
Get the most out of it
- Start in the plan agent to explore an unfamiliar codebase before allowing changes
- Use @general in a message to hand off complex searches or multistep tasks
- Read the agents documentation at opencode.ai/v2/docs/agents to understand permissions
- Try the desktop app if you want a windowed interface, noting it is beta
Downloads
Strengths
- Open source under the MIT license, so the code can be read and reused
- The plan agent denies file edits by default and asks before bash commands, which adds a safety layer
- Available through many install routes including npm, Homebrew, Arch Linux, Nix, and mise
Trade-offs
- The README does not detail which AI models or providers it supports, so check the docs before relying on it
- The desktop app is beta and the README's install paths include both a stable and a 'v2' install route, which may be confusing
- The README is truncated in this analysis, so some setup details and limits are not confirmed here
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.