
OpenCode
CLIOpen-source terminal coding agent that switches freely between model providers. Includes a build agent that edits code, a read-only plan agent for analysis, subagents, and a desktop app. Formerly sst/opencode.
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
# YOLO
curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g @opencode/cli@latest # or bun/pnpm/yarn
scoop install opencode # Windows
choco install opencode # Windows
brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date)
brew install opencode # macOS and Linux (official brew formula, updated less)
sudo pacman -S opencode # Arch Linux (Stable)
paru -S opencode-bin # Arch Linux (Latest from AUR)
mise use -g opencode # Any OS
nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch
[!TIP] Remove versions older than 0.1.x before installing.
Desktop App (BETA)
OpenCode is also available as a desktop application. Download directly from the releases page or opencode.ai/download.
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | opencode-desktop-mac-arm64.dmg |
| macOS (Intel) | opencode-desktop-mac-x64.dmg |
| Windows | opencode-desktop-windows-x64.exe |
| Linux | .deb, .rpm, or .AppImage |
# macOS (Homebrew)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop
Installation Directory
The install script respects the following priority order for the installation path:
$OPENCODE_INSTALL_DIR- Custom installation directory$XDG_BIN_DIR- XDG Base Directory Specification compliant path$HOME/bin- Standard user binary directory (if it exists or can be created)$HOME/.opencode/bin- Default fallback
# Examples
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
Agents
OpenCode includes two built-in agents you can switch between with the Tab key.
- build - Default, full-access agent for development work
- plan - Read-only agent for analysis and code exploration
- Denies file edits by default
- Asks permission before running bash commands
- Ideal for exploring unfamiliar codebases or planning changes
Also included is a general subagent for complex searches and multistep tasks.
This is used internally and can be invoked using @general in messages.
Learn more about agents.
Documentation
For more info on how to configure OpenCode, 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.
Ressources associées

Qwen Code
CLIOpen-source terminal coding agent from Alibaba's Qwen team with subagents, auto memory, skills and MCP. Works with Qwen, OpenAI, Anthropic, Gemini and other APIs or local models, with IDE plugins and a headless mode (qwen -p).
QwenLM/qwen-code28.5k
Mistral Vibe
CLIMistral's official open-source terminal coding assistant: uses Mistral models to read and write code, run commands and search the codebase, with multiple agent profiles and subagents, plus Skills, MCP and a --prompt scripting mode. Needs a Mistral API key.
mistralai/mistral-vibe5.1k
Claude Code
CLIAnthropic's terminal coding agent: understands your codebase, edits code, runs commands and handles git workflows, with plugins, MCP and a headless mode (claude -p). Sign in with a Claude account or set an API key.
anthropics/claude-code151k
Gemini CLI
CLIGoogle's official open-source terminal agent using Gemini models with a 1M-token context. Built-in Google Search, file and shell tools, plus MCP support. Personal Google accounts get a free quota.
google-gemini/gemini-cli107k
Cline CLI
CLIOfficial Cline CLI sharing its agent core with the VS Code extension: plan/act modes, MCP, checkpoints and subagents; --yolo and --json run it unattended in CI and scripts. Sign in with Cline or a ChatGPT subscription, or bring your own API key.
cline/cline70.4k
Aider
CLIAI pair programming in your terminal: builds a repo map of the whole codebase, auto-commits changes to git, works with Claude, DeepSeek, OpenAI and almost any other model including local ones, and can run lint and tests after edits.
Aider-AI/aider49.6k
