OpenCode is an open-source, terminal-native AI coding agent. It runs in your terminal with a polished TUI and a client/server architecture, and it is provider-agnostic — you can point it at Anthropic, OpenAI, Google, or local models rather than being locked to a single vendor. A desktop app (BETA) is also available for macOS, Windows, and Linux.
- Works with Anthropic, OpenAI, Google, and local/self-hosted models.
- Not tied to any single provider or subscription.
- Fast, keyboard-driven interface built for the terminal.
- Client/server architecture so the agent can run detached from the UI.
- build — default full-access agent for development work.
- plan — read-only agent for analysis and exploration; denies edits and asks before running commands.
- general — subagent for complex searches and multistep tasks, invoked with
@general.
- Language Server Protocol support for richer, code-aware assistance.
- Custom agents and MCP (Model Context Protocol) server support.
- Configurable via project and global config.
# Install script
curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g opencode-ai@latest # or bun/pnpm/yarn
brew install anomalyco/tap/opencode # macOS and Linux (recommended)
scoop install opencode # Windows
choco install opencode # Windows
sudo pacman -S opencode # Arch Linux
mise use -g opencode # Any OSDownload directly from the releases page or opencode.ai/download.
Run opencode in a project directory, then switch between the build and plan agents with the Tab key.