The open source AI coding agent.
English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt
Installation
Choose one V2 installation method:
- Install script:
curl -fsSL https://opencode.ai/v2/install | bash - npm:
npm install -g @opencode/cli - Bun:
bun install -g --trust @opencode/cli - Homebrew:
brew install anomalyco/tap/opencode-v2
Tip
Remove a package-managed V1 installation before installing V2; both use the
opencodecommand.
Desktop App (BETA)
OpenCode V2 is also available as a desktop application. Find platform installers in the V2 download guide.
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | opencode-desktop-mac-arm64.dmg |
| macOS (Intel) | opencode-desktop-mac-x64.dmg |
| Windows (x64) | opencode-desktop-win-x64.exe |
| Linux | .deb, .rpm, or .AppImage |
Installation Directory
The V2 install script places the binary in $HOME/.opencode/bin. It does not use OPENCODE_INSTALL_DIR or XDG_BIN_DIR to change that location.
Agents
OpenCode includes two visible primary agents you can switch between with Shift+Tab.
- build - Default coding agent. Tools are allowed by default; sensitive reads and external paths ask for approval.
- plan - Explores and plans without editing normal project files. It can write plan files when asked; shell commands follow your configured permissions.
The general subagent handles research and multistep tasks in a child session.
Learn more about agents.
Documentation
For more info on how to configure OpenCode V2, head over to our docs.
Contributing
If you're interested in contributing to OpenCode, please read our contributing docs before submitting a pull request.
Building on OpenCode
If you are working on a project that's related to OpenCode and is using "opencode" as part of its name, for example "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way.
