Skip to content

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

The easiest way to install Opencode on macOS is using our official install script:

curl -fsSL https://opencode.ai/install | bash

Homebrew

For macOS users who prefer Homebrew:

brew install anomalyco/tap/opencode

Manual Installation

Apple Silicon (M1/M2/M3)

wget https://github.com/anomalyco/opencode/releases/download/v2.3.0/opencode-darwin-arm64.zip
unzip opencode-darwin-arm64.zip
chmod +x opencode-darwin-arm64
sudo mv opencode-darwin-arm64 /usr/local/bin/opencode

Intel

wget https://github.com/anomalyco/opencode/releases/download/v2.3.0/opencode-darwin-x64.zip
unzip opencode-darwin-x64.zip
chmod +x opencode-darwin-x64
sudo mv opencode-darwin-x64 /usr/local/bin/opencode

npm

You can also install Opencode via npm:

npm install -g opencode-ai

Verify Installation

After installation, verify that Opencode is correctly installed:

opencode --version

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 -fsSL https://opencode.ai/install | bash
  • Homebrew: brew upgrade anomalyco/tap/opencode
  • npm: npm install -g opencode-ai@latest
  • AUR: paru -Syu opencode-bin or yay -Syu opencode-bin

Uninstalling Opencode

To uninstall Opencode:

  • Official script: opencode uninstall
  • Homebrew: brew uninstall anomalyco/tap/opencode
  • Manual installation: rm /usr/local/bin/opencode
  • npm: npm uninstall -g opencode-ai
  • Docker: Remove the container and image as needed