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:- A modern terminal emulator for the best experience:
- API keys for your preferred LLM providers (configured after installation)
Installation Methods
- macOS
- Linux
- Windows
- Docker
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.| Platform | Download File |
|---|---|
| macOS (Apple Silicon) | opencode-desktop-darwin-aarch64.dmg |
| macOS (Intel) | opencode-desktop-darwin-x64.dmg |
| Windows | opencode-desktop-windows-x64.exe |
| Linux (Debian/Ubuntu) | opencode-desktop-linux-x64.deb |
| Linux (Fedora/RHEL) | opencode-desktop-linux-x64.rpm |
| Linux (AppImage) | opencode-desktop-linux-x64.AppImage |
Install via Package Manager
Custom Installation Directory
The installation script respects environment variables for custom installation paths:Priority Order
$OPENCODE_INSTALL_DIR- Custom installation directory$XDG_BIN_DIR- XDG Base Directory Specification path$HOME/bin- Standard user binary directory$HOME/.opencode/bin- Default fallback
Manual Download
Grab the binary directly from the GitHub Releases page:- Download the appropriate binary for your platform
- Extract the archive
- Move the binary to a directory in your
$PATH - Make it executable:
chmod +x opencode
Verify Installation
Confirm OpenCode is installed correctly:Upgrading
- Homebrew
- npm
- Chocolatey
- Scoop
Uninstalling
To remove OpenCode from your system:- Homebrew
- npm
- Chocolatey
- Scoop
Next Steps
Quick Start
Configure OpenCode and start your first session
Configuration
Customize OpenCode to match your workflow