Installation
Prerequisites
To use OpenCode in your terminal, you'll need:
- A modern terminal emulator such as:
- API keys for the LLM providers you want to use (or use OpenCode Zen/Go)
Quick Install
The easiest way to install OpenCode is through the install script:
curl -fsSL https://opencode.ai/install | bashPackage Managers
Node.js
npm install -g opencode-aibun install -g opencode-aipnpm install -g opencode-aiyarn global add opencode-aiHomebrew (macOS / Linux)
brew install anomalyco/tap/opencodeTIP
We recommend using the OpenCode tap for the most up to date releases. The official brew install opencode formula is maintained by the Homebrew team and may be updated less frequently.
Arch Linux
sudo pacman -S opencode # Stable
paru -S opencode-bin # Latest from AURWindows
For the best experience on Windows, we recommend using Windows Subsystem for Linux (WSL). It provides better performance and full compatibility with OpenCode's features.
choco install opencodescoop install opencodenpm install -g opencode-aimise use -g github:anomalyco/opencodeDocker
docker run -it --rm ghcr.io/anomalyco/opencodeBinary Releases
You can also download pre-built binaries directly from the GitHub Releases page.
Desktop App
OpenCode has a desktop app available in beta for macOS, Windows, and Linux. Download it from opencode.ai/download.
Verify Installation
After installation, verify that OpenCode is working:
opencode --versionNext Steps
Once installed, you'll need to configure a provider to start using OpenCode. Head to the Usage guide to learn the basics.