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 -sL opencode.ai/install | bash

Homebrew

For macOS users who prefer Homebrew:

brew tap anomalyco/opencode
brew install opencode

Manual 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/opencode

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

npm

You can also install Opencode via npm:

npm install -g @anomalyco/opencode

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