OpenCode
A free open-source terminal AI coding agent with a native TUI.
Open-Source Self-Host Has API Open-Source Editorial Pick 229.6k GitHub Stars
Overview
OpenCode is an open-source coding agent that runs in your terminal with a keyboard-driven interface, session sharing, and support for dozens of model providers through the Model Context Protocol.
The MIT-licensed client is free forever. Optional hosted accounts exist for managed access, but every provider key and local model works without them.
Capability Matrix
Pricing, Free Tier, Open-Source, Self-Host, API Access and Privacy Summary for OpenCode.
| Pricing | Free and unlimited; optional hosted tiers exist but the client is MIT licensed |
|---|---|
| Free Tier | Full client is free; you pay your own model provider or run a local model |
| Open-Source | Yes |
| Self-Host | Yes |
| API Access | Yes |
| Privacy | Runs locally; prompts go only to the model provider you configure |
Strengths & Caveats
Strengths
- Completely free with your own API key or a local Ollama model
- Native TUI with sessions, snapshots and shareable session links
- MCP support lets you wire in tools without leaving the terminal
Caveats
- Feature set still moves fast, so plugins and configs can break between releases
- No built-in hosted fallback when your provider rate-limits
Verified links
- OpenCode website — HTTPS link verified by the liveness checker.
- OpenCode source repository — 229.6k GitHub Stars