OpenCode is installable via one-line script, multiple package managers (npm, Homebrew, Scoop, Chocolatey, etc.), and Docker, with platform-specific recommended methods: Homebrew on macOS/Linux, Chocolatey/Scoop/WSL on Windows. The desktop app and TUI require compatible terminal emulators (WezTerm, Alacritty, Ghostty, Kitty) or run as a native application on macOS, Windows, and Linux.
OpenCode can be installed via a one-line script (curl -fsSL https://opencode.ai/install | bash), package managers (npm, Bun, pnpm, or Yarn under the package name opencode-ai), Homebrew, Scoop, Chocolatey, Pacman, AUR, Mise, Nix, or Docker.[1] Versions older than 0.1.x must be removed before installing.[2]
On macOS and Linux, Homebrew (brew install anomalyco/tap/opencode) is the recommended package-manager install, as it is always up to date.[2] On Arch Linux, OpenCode is available via sudo pacman -S opencode (stable) or paru -S opencode-bin (latest from AUR).[1] On Windows, supported installers include Chocolatey (choco install opencode), Scoop (scoop install opencode), npm (npm install -g opencode-ai), Mise (mise use -g github:anomalyco/opencode), and Docker (docker run -it --rm ghcr.io/anomalyco/opencode); Bun support on Windows is in progress.[1] For the best experience on Windows, installing via Windows Subsystem for Linux (WSL) is recommended for better performance and full feature compatibility.[1]
The install script selects an installation directory using this priority order: $OPENCODE_INSTALL_DIR → $XDG_BIN_DIR → $HOME/bin → $HOME/.opencode/bin (default fallback).[2]
The OpenCode desktop app is available for macOS (Apple Silicon and Intel), Windows (x64), and Linux (.deb, .rpm, .AppImage), downloadable from the releases page or opencode.ai/download.[2]
The recommended terminal emulators for OpenCode's TUI are WezTerm (cross-platform), Alacritty (cross-platform), Ghostty (Linux and macOS), and Kitty (Linux and macOS).[1] OpenCode is available in the Zed ACP Registry and can be installed directly by running zed: acp registry in the Zed Command Palette, without needing manual configuration.[3]
Sources