Intro
Install OpenCode, the open source coding agent, as a CLI, desktop app, web app, or Docker image, then connect a model provider.
OpenCode is an open source coding agent. It’s available as a terminal-based interface, desktop app, or web app.
CLI
curl
curl -fsSL https://opencode.ai/v2/install | bashhomebrew
brew install anomalyco/tap/opencode-v2npm
npm install -g @opencode/clibun
bun install -g --trust @opencode/clipnpm
pnpm add -g --allow-build=@opencode/cli @opencode/cliyarn
yarn global add @opencode/clivite+
vp install -g @opencode/cliaur
paru -S opencode-betamise
mise use -g opencodeThe npm package uses a postinstall script to select the native opencode binary for your platform. The Bun and pnpm commands
explicitly allow the required script; Vite+ requires no additional flag. The mise command requires mise 2026.10.9 or later;
older versions install OpenCode 1.
Windows package managers are not supported.
Download a standalone CLI binary for your platform.
- macOS: Apple silicon (opens in a new tab) · Intel (opens in a new tab) · Intel (baseline) (opens in a new tab)
- Windows: ARM64 (opens in a new tab) · x64 (opens in a new tab) · x64 (baseline) (opens in a new tab)
- Linux (glibc): ARM64 (opens in a new tab) · x64 (opens in a new tab) · x64 (baseline) (opens in a new tab)
- Linux (musl): ARM64 (opens in a new tab) · x64 (opens in a new tab) · x64 (baseline) (opens in a new tab)
Desktop
Download the latest OpenCode Desktop build for your platform.
- macOS: Apple silicon (opens in a new tab) · Intel (opens in a new tab)
- Windows: x64 (opens in a new tab) · ARM64 (opens in a new tab)
- Linux (.deb): x64 (opens in a new tab) · ARM64 (opens in a new tab)
- Linux (.rpm): x64 (opens in a new tab) · ARM64 (opens in a new tab)
- Linux (AppImage): x64 (opens in a new tab) · ARM64 (opens in a new tab)
Web
Access the OpenCode web interface with the opencode pair command.
$ opencode pair
Open a link to connect. Links work once and expire in 5 minutes.
http://127.0.0.1:49374/auth/connect/...Docker
Docker images use versioned tags, for example ghcr.io/anomalyco/opencode:2.0.0.
Connect
OpenCode has built-in support for many LLM providers. You can connect to them
directly in the TUI with /connect.
See Providers to configure custom providers.
If you'd like easy access to the best coding models, you can try out OpenCode Console.
You can also try OpenCode Console, a $10/month subscription plan that grants you access to the best coding models.
Customize
Make OpenCode your own by editing the OpenCode config, loading plugins, connecting MCP servers, or creating commands. For terminal interface themes and keybindings, see CLI settings.
Learn
If you are interested in an in-depth course on OpenCode, Boot.dev has created an excellent AI Coding with OpenCode (opens in a new tab) course in consultation with our team. All the information in the course is free to read and watch, though some interactive features may require payment.
Coming from another AI coding tool, or still deciding? Our guides compare OpenCode against Claude Code, Cursor, and the rest of the field.