
opencode
The open source coding agent.
The Lens
By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.
Updated Sep 2026
opencode is an open-source AI coding agent that lives in your terminal. It is built by Anomaly, the team behind SST, and it is the project now hosted at opencode.ai (the old sst/opencode repo redirects here). Bring any model provider, Anthropic, OpenAI, Google, GitHub Copilot, or a local model, and it reads, writes, and edits files and runs shell commands from a clean TUI. MIT licensed.
The design choice that sets it apart is a two-agent flow: a plan agent that only reads and analyzes, and a build agent that actually makes changes, so you review the plan before anything touches your code. It pulls in LSP diagnostics as it works. Install is trivial through npm, Homebrew, or a one-line script, with no Docker and no GPU. Supply an API key for a hosted model, or point it at a local one and run for nothing.
The agent is still free and there are still no feature gates, but Anomaly now sells model access too. Zen is their gateway of models they have benchmarked for coding agents: pay per token with no subscription, several models free for now, GPT 5.6 Luna at $0.20 in and $1.20 out per million tokens under 272K of context, Claude Opus 5 at $5.00 and $25.00, GPT 5.5 Pro at $30.00 and $180.00. Balances auto-reload $20 when they drop below $5, and card processing of 4.4% plus $0.30 is passed through at cost. There is an enterprise track as well. Solo developers with existing API access should keep using it exactly as before.
The catch is the model bill and the terminal-first workflow. opencode is free, but the models it drives are not, and heavy use adds up the same way a subscription would. For a graphical editor experience this is not it. It is a TUI first, with a desktop app still in beta.
Free vs Self-Hosted vs Paid
fully freeFree (Open Source)
- MIT licensed agent, the entire thing, no feature gates
- Two-agent flow: a read-only plan agent and a separate build agent
- LSP diagnostics pulled in during editing
- Any provider: Anthropic, OpenAI, Google, GitHub Copilot, OpenRouter or a local model
- Optional client/server split so the agent runs on one box and you drive it from another
- Some Zen models are currently free while the team gathers feedback, though they are explicitly time-limited
Paid
Nothing for the agent. Anomaly sells opencode Zen, a curated model gateway:
- Pay per token, no subscription and no seat fee. Add credits and spend them
- GPT 5.6 Luna: $0.20 per 1M input, $1.20 per 1M output at 272K context or below. $0.40 and $1.80 above it. Most models are banded this way
- Claude Opus 5: $5.00 per 1M input, $25.00 per 1M output
- GPT 5.5 Pro: $30.00 per 1M input, $180.00 per 1M output
- Auto-reload adds $20 when the balance falls below $5, and both thresholds are adjustable
- Workspace-level monthly spending limits
- Card processing fees of 4.4% plus $0.30 per transaction are passed through at cost
- A separate enterprise track exists, priced on request
Self-Hosted Costs
$0 for the software. It is a CLI and TUI on your own machine, no server and no GPU required. The only bill is inference, and running a local model through Ollama or similar takes even that to zero.
When to Pay
Never for the agent. Use Zen when you want models pre-vetted for coding-agent behavior and a single balance instead of separate provider accounts, and note the 4.4% card fee makes it slightly more expensive than going direct. If you already hold an Anthropic or OpenAI key, keep using it. Compare against Cursor and GitHub Copilot at roughly $20 per seat per month: opencode plus metered tokens usually costs less for light use and more for heavy use.
The agent is MIT and completely free. Anomaly now also sells opencode Zen, a pay-per-token model gateway with no subscription, ranging from free models to $30 per 1M input on GPT 5.5 Pro.
What to do by team size
- Solo
- free; bring your own API key or run a local model for nothing
- Small team
- free agent plus metered tokens, which usually undercuts per-seat Copilot or Cursor
- Medium team
- free agent; Zen workspace spending limits help if you want one capped bill
- Large team
- free agent, but talk to the enterprise track before rolling it out broadly
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
Similar Tools

an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM

Lightweight coding agent that runs in your terminal

An open-source AI coding agent that lives in your terminal.

⌥ AI Coding agent for the terminal: hash-anchored edits, optimized tool harness, LSP, Python, browser, subagents, and more

Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.

DeepSeek + MiMo coding agent in terminal
A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores
Trust Signals
License: MIT License
Use freely, including commercial. Just keep the license.
Commercial use: ✓ Yes
About
- Owner
- Anomaly (Organization)
- Stars
- 207,472
- Forks
- 27,223
Also by Anomaly
Explore Further
More tools in the directory
openclaw
Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞
389.7k ★everything-claude-code
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
258.6k ★hermes-agent
The agent that grows with you
245.6k ★Featured in The Open Source Drop #7