Installation Options
Opencode provides multiple installation methods across different platforms. Use the tabs below to find the most suitable installation guide for your operating system.
macOS Installation
Recommended Method: Official Install Script
The easiest way to install Opencode on macOS is using our official install script:
curl -sL opencode.ai/install | bashHomebrew
For macOS users who prefer Homebrew:
brew tap anomalyco/opencode
brew install opencodeManual Installation
Apple Silicon (M1/M2/M3)
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-darwin-arm64
chmod +x opencode-darwin-arm64
mv opencode-darwin-arm64 /usr/local/bin/opencodeIntel
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-darwin-amd64
chmod +x opencode-darwin-amd64
mv opencode-darwin-amd64 /usr/local/bin/opencodenpm
You can also install Opencode via npm:
npm install -g @anomalyco/opencodeVerify Installation
After installation, verify that Opencode is correctly installed:
opencode --version Linux Installation
Recommended Method: Official Install Script
The easiest way to install Opencode on Linux is using our official install script:
curl -sL opencode.ai/install | bashArch Linux
For Arch Linux users, install from the AUR:
paru -S opencode
# or
yay -S opencodeManual Installation
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/opencodeARM64
wget https://github.com/anomalyco/opencode/releases/latest/download/opencode-linux-arm64
chmod +x opencode-linux-arm64
mv opencode-linux-arm64 /usr/local/bin/opencodenpm
You can also install Opencode via npm:
npm install -g @anomalyco/opencodeVerify Installation
After installation, verify that Opencode is correctly installed:
opencode --version Windows Installation
Recommended Method: WSL2
On Windows, we recommend using WSL2 for the best experience:
- Install WSL2 if you haven’t already:
wsl --install-
Restart your computer
-
Open WSL2 terminal and install Opencode using the official script:
curl -sL opencode.ai/install | bashNative Windows (Experimental)
For native Windows installation:
- Download the Windows binary from our GitHub Releases page
- Add the binary to your PATH environment variable
- Open Command Prompt or PowerShell and verify installation:
opencode --versionnpm
You can also install Opencode via npm on Windows:
npm install -g @anomalyco/opencode Docker Installation
For sandboxed environments, you can run Opencode in a Docker container:
docker run -it -v $(pwd):/app anomalyco/opencode:latestFor detailed Docker usage instructions, including DevOps integration, CI/CD pipeline setup, and advanced configuration, see our Docker Support page.
Troubleshooting
If you encounter any issues during installation, please open an issue on our GitHub repository.
Updating Opencode
To update Opencode to the latest version, you can use the same installation method you used initially. For example:
- Official script:
curl -sL opencode.ai/install | bash - Homebrew:
brew upgrade opencode - npm:
npm update -g @anomalyco/opencode - AUR:
paru -Syu opencodeoryay -Syu opencode
Uninstalling Opencode
To uninstall Opencode:
- Official script/Homebrew/AUR: Use your package manager’s uninstall command
- Manual installation:
rm /usr/local/bin/opencode - npm:
npm uninstall -g @anomalyco/opencode - Docker: Remove the container and image as needed