Installation
Opencode is distributed as a single binary. It supports macOS, Linux, and Windows (via WSL2).
Official Install Script
The recommended way to install is via our shell script. It detects your OS and architecture, downloads the correct binary, and adds it to your PATH.
curl -sL opencode.ai/install | bash
npm
You can install Opencode via npm:
npm install -g @anomalyco/opencode
Homebrew (macOS)
For macOS users, you can install Opencode using Homebrew:
brew tap anomalyco/opencode
brew install opencode
Arch Linux
For Arch Linux users, you can install Opencode from the AUR:
paru -S opencode
# or
yay -S opencode
Windows
WSL2
On Windows, we recommend using WSL2. First, install WSL2 if you haven’t already:
wsl --install
Then restart your computer and install Opencode using the official script:
curl -sL opencode.ai/install | bash
Native Windows (Experimental)
For native Windows installation, download the Windows binary from our GitHub Releases page and add it to your PATH.
Manual Installation
You can also download binaries directly from our GitHub Releases page.
macOS (Apple Silicon)
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-darwin-arm64
chmod +x opencode-darwin-arm64
mv opencode-darwin-arm64 /usr/local/bin/opencode
macOS (Intel)
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-darwin-amd64
chmod +x opencode-darwin-amd64
mv opencode-darwin-amd64 /usr/local/bin/opencode
Linux (x86_64)
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-linux-amd64
chmod +x opencode-linux-amd64
mv opencode-linux-amd64 /usr/local/bin/opencode
Linux (ARM64)
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-linux-arm64
chmod +x opencode-linux-arm64
mv opencode-linux-arm64 /usr/local/bin/opencode
Docker
For sandboxed environments, you can run Opencode in a Docker container. For detailed Docker usage instructions, including DevOps integration, CI/CD pipeline setup, and advanced configuration, see our Docker Support page.
docker run -it -v $(pwd):/app anomalyco/opencode:latest