OpenCode and Crush
Open-source, multi-provider terminal AI coding agent written in Go. OpenCode (MIT, ~12K stars) was archived mid-2025 and succeeded by Crush from Charmbracelet (~23K stars).
Open-source, multi-provider terminal AI coding agent written in Go. OpenCode (MIT, ~12K stars) was archived mid-2025 and succeeded by Crush from Charmbracelet (~23K stars). Same lead developer, same architecture, production backing from the Charm team.
Status: OpenCode is archived. Crush (https://github.com/charmbracelet/crush) is the active successor.
Why This Matters
OpenCode/Crush occupies a unique position: it’s the only mature open-source terminal coding agent with multi-provider support, local model compatibility, and LSP integration. For teams that need:
- Provider flexibility – switch between Anthropic, OpenAI, Google, Groq, or self-hosted models
- Self-hosted/air-gapped environments – works with any OpenAI-compatible endpoint (Ollama, vLLM)
- No vendor lock-in – MIT license, full source access
- GitHub Copilot subscription reuse – can use existing Copilot tokens as a provider
Quick Facts
| Property | Value |
|---|---|
| OpenCode Repo | https://github.com/opencode-ai/opencode (archived) |
| Crush Repo | https://github.com/charmbracelet/crush (active) |
| License | MIT |
| Language | Go (single binary, no runtime dependencies) |
| TUI Framework | Bubble Tea (Charmbracelet) |
| Stars | OpenCode ~12K, Crush ~23K |
Architecture
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
+------------------------------------------+
| Terminal UI (Bubble Tea) |
| Editor | Chat | Logs | Sessions |
+------------------------------------------+
| Agent Layer |
| Coder Agent | Task Agent | Title Agent |
+------------------------------------------+
| Tool Layer |
| bash | glob | grep | ls | view | write |
| edit | patch | diagnostics | fetch |
| sourcegraph | agent (sub-tasks) |
+------------------------------------------+
| Provider Layer |
| OpenAI | Anthropic | Google | Groq |
| Bedrock | Azure | Copilot | Local |
+------------------------------------------+
| Storage (SQLite) |
+------------------------------------------+
Each agent can be assigned a different model, enabling per-task model routing natively.
Multi-Provider Support
Supported Providers
| Provider | Models | Auth |
|---|---|---|
| Anthropic | Claude 4 Opus/Sonnet, 3.7/3.5 Sonnet, 3.5/3 Haiku | ANTHROPIC_API_KEY |
| OpenAI | GPT-4.1, GPT-4.5, GPT-4o, O1/O3/O4-mini | OPENAI_API_KEY |
| Google Gemini | Gemini 2.5 Pro/Flash, 2.0 Flash | GEMINI_API_KEY |
| GitHub Copilot | GPT-4/4o/4.1, Claude 3.5/3.7/4, Gemini 2.0/2.5 | GITHUB_TOKEN |
| Groq | Llama 4 Maverick/Scout, QWQ-32b, Deepseek R1 | GROQ_API_KEY |
| Local/Self-hosted | Any OpenAI-compatible endpoint | LOCAL_ENDPOINT |
Per-Agent Model Assignment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"provider": "anthropic",
"models": {
"coder": {
"provider": "anthropic",
"model": "claude-sonnet-4-6"
},
"task": {
"provider": "groq",
"model": "llama-4-maverick-17b-128e"
},
"title": {
"provider": "groq",
"model": "llama-3.3-70b-versatile"
}
}
}
Use Claude for the main coding agent (precision), Llama on Groq for sub-tasks (fast + cheap), and the cheapest model for session titles.
Key Features
TUI with Vim Keybindings
| Shortcut | Action |
|---|---|
i |
Focus text editor |
Esc |
Unfocus editor |
Ctrl+O |
Switch model mid-session |
Ctrl+A |
Switch session |
Ctrl+K |
Command palette |
Built-in Tools
bash, glob, grep, ls, view, write, edit, patch, diagnostics (LSP), fetch, sourcegraph, agent (sub-tasks).
LSP Integration
Connects to language servers and exposes diagnostics to the AI. When the AI makes a change, it automatically gets linting errors and type check failures.
MCP Support
Full MCP (Model Context Protocol) support with stdio and SSE transports.
OpenCode vs Claude Code vs Copilot CLI
| Dimension | OpenCode / Crush | Claude Code | Copilot CLI |
|---|---|---|---|
| License | MIT (open source) | Proprietary | Proprietary |
| Multi-provider | 10+ providers + local | Anthropic only | GPT/Claude/Gemini |
| Local models | Yes | No | No |
| Per-agent model routing | Yes (works today) | N/A | In spec, ignored in CLI |
| LSP integration | Yes | No | No |
| Session persistence | SQLite, multi-session | File-based | No |
| Cost | Free + API keys | $20/month or API | Copilot subscription |
| Maturity | Early (v0.x) | Production | Production |
When to Choose What
| Scenario | Best Tool |
|---|---|
| Deep multi-file reasoning | Claude Code |
| GitHub-native workflows | Copilot CLI |
| Multi-provider flexibility, self-hosted models | OpenCode / Crush |
| Air-gapped / regulated environment | OpenCode / Crush |
| Cost-sensitive (API keys only) | OpenCode / Crush |
The OpenCode to Crush Transition
| Aspect | OpenCode | Crush |
|---|---|---|
| Status | Archived (June 2025) | Active development |
| Maintainer | Kujtim Iihoxha (solo) | Charmbracelet team (company-backed) |
| Platform | macOS, Linux | macOS, Linux, Windows, FreeBSD |
Migration: If your team is on OpenCode, migrate to Crush. Config format and workflow are nearly identical.