Appearance
Installation & Setup
OpenCode is a Go-based CLI. Install it with a shell script, npm, Homebrew, Chocolatey, Scoop, or Docker. This lesson covers all installation methods and provider configuration.

What you'll learn
- Install:
curl -fsSL https://opencode.ai/install | bashornpm install -g opencode-ai - 75+ model providers configurable via
/connectin the TUI /initcreates an AGENTS.md file for project context
Build it
Choose an installation method that best fits your environment. Once installed, configure your preferred model provider by launching the TUI and running the connect command.
bash
# Shell installer (recommended)
curl -fsSL https://opencode.ai/install | bash
# Or npm
npm install -g opencode-ai
# Or Homebrew
brew install anomalyco/tap/opencode
# Or Docker
docker run -it --rm ghcr.io/anomalyco/opencode
# Configure a provider
opencode
/connect
# Select a provider and enter your API keyWhat goes wrong
| Mistake | How you notice it | The fix |
|---|---|---|
| Terminal not supported | Display issues, missing features | Use WezTerm, Alacritty, Ghostty, or Kitty |
| Provider not configured | No model available | Run /connect in the TUI |
Next: The TUI & Keybinds