Skip to content

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:

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

Package Managers

Node.js

bash
npm install -g opencode-ai
bash
bun install -g opencode-ai
bash
pnpm install -g opencode-ai
bash
yarn global add opencode-ai

Homebrew (macOS / Linux)

bash
brew install anomalyco/tap/opencode

TIP

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

bash
sudo pacman -S opencode          # Stable
paru -S opencode-bin             # Latest from AUR

Windows

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.

powershell
choco install opencode
powershell
scoop install opencode
powershell
npm install -g opencode-ai
powershell
mise use -g github:anomalyco/opencode

Docker

bash
docker run -it --rm ghcr.io/anomalyco/opencode

Binary 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:

bash
opencode --version

Next Steps

Once installed, you'll need to configure a provider to start using OpenCode. Head to the Usage guide to learn the basics.

Released under the GPLv3 License.