OpenCode

CLI Required

Go-based AI coding agent with self-contained ACP support. Lightweight, fast startup, and works with various open and commercial models.

INSTALLATION
1. Install OpenCode
npm install -g opencode-ai
2. Configure a provider

OpenCode supports multiple providers. Set the API key for your preferred provider:

# Anthropic
export ANTHROPIC_API_KEY=your-key
# OpenAI
export OPENAI_API_KEY=your-key
# Google
export GEMINI_API_KEY=your-key
3. Verify installation
opencode --version
SUPPORTED_MODELS

OpenCode routes to the model provider configured via environment variables. Compatible models include:

-
Claude (via Anthropic)Sonnet 4, Opus 4
-
GPT-4 (via OpenAI)GPT-4, GPT-4 Turbo
-
Gemini (via Google)Gemini 2.5 Pro, Gemini 2.5 Flash
-
Open models (via Ollama)Llama, Mistral, CodeGemma, etc.
FEATURES

- Self-contained ACP -- ACP support is built into the binary. No adapter needed.

- Fast startup -- Written in Go, starts almost instantly compared to Node.js-based agents.

- Multi-provider -- Switch between Anthropic, OpenAI, Google, or local models by changing environment variables.

- Local models -- Works with Ollama for fully offline operation.

REQUIREMENTS

- Node.js 18+ (for npm global install)

- At least one provider API key, or Ollama for local models