Skip to main content
OpenCode can be installed on macOS, Linux, and Windows using multiple package managers and installation methods.

Quick Install

The fastest way to install OpenCode is using the installation script:
This script automatically detects your platform and installs the latest version.

Prerequisites

Before installing OpenCode, ensure you have:
  1. A modern terminal emulator for the best experience:
    • WezTerm - Cross-platform, highly recommended
    • Alacritty - Cross-platform, GPU-accelerated
    • Ghostty - Linux and macOS
    • Kitty - Linux and macOS
  2. API keys for your preferred LLM providers (configured after installation)

Installation Methods

Install from the OpenCode tap for the most up-to-date releases:
Or use the official Homebrew formula (updated less frequently):

Node.js Package Managers

Mise

Nix

For the latest development version:

Desktop App (Beta)

OpenCode is also available as a desktop application with a native GUI experience.

Download

Download directly from the releases page or opencode.ai/download.

Install via Package Manager

Custom Installation Directory

The installation script respects environment variables for custom installation paths:

Priority Order

  1. $OPENCODE_INSTALL_DIR - Custom installation directory
  2. $XDG_BIN_DIR - XDG Base Directory Specification path
  3. $HOME/bin - Standard user binary directory
  4. $HOME/.opencode/bin - Default fallback

Manual Download

Grab the binary directly from the GitHub Releases page:
  1. Download the appropriate binary for your platform
  2. Extract the archive
  3. Move the binary to a directory in your $PATH
  4. Make it executable: chmod +x opencode

Verify Installation

Confirm OpenCode is installed correctly:
You should see the version number printed to the console.

Upgrading

Remove versions older than 0.1.x before installing or upgrading to avoid compatibility issues.

Uninstalling

To remove OpenCode from your system:
Remove configuration files:

Next Steps

Quick Start

Configure OpenCode and start your first session

Configuration

Customize OpenCode to match your workflow