█▀█ █▀█ █▀▀ █▄░█ █▀▀ █▀█ █▀▄ █▀▀ █▄█ █▀▀ ██▄ █░▀█ █▄▄ █▄█ █▄▀ ██▄
[news] v0.42 — terminal sessions are now resumable

The open source AI coding agent built for the terminal.

OpenCode runs as a TUI in any shell. Plan, edit, and ship code with the model of your choice — no IDE, no browser, no telemetry. Bring your own key. Bring your own LSP. Bring your own agent.

Get started with Zen Read docs → macOS · Linux · Windows · v0.42
curl -fsSL https://opencode.ai/install | bash
Build Claude Opus 4.7 OpenCode Zen
plan add exponential backoff to queue.ts
read src/queue.ts 42 lines
grep "retry" across 184 files
propose patch queue.ts:32-48
run pnpm test --filter queue
PASS src/queue.test.ts 18 tests · 1.4s
PASS src/retry.test.ts 6 tests · new
commit "queue: retry with exponential backoff"
staged 2 files · 38 insertions(+), 4 deletions(-)
tabswitch agent ctrl-pcommands ctrl-rresume session ?help

What is OpenCode?

A 100% open source, terminal-native AI coding agent. Runs as a TUI in any shell. Auto-loads the right LSPs. Plans, edits, runs tests, opens PRs. Works with Claude, GPT, Gemini, local models, or your own. No IDE plugin. No browser. Nothing leaves your machine unless you tell it to.

Fig 1. 150K GitHub Stars
Fig 2. 850 Contributors
Fig 3. 6.5M Monthly Devs

Built for privacy first

[+] LSP enabled Automatically loads the right LSPs for the language you opened. TypeScript, Go, Rust, Python — out of the box.
[+] BYO model Claude, GPT, Gemini, Llama, or any OpenAI-compatible endpoint. Your key, your provider, your spend.
[+] Resumable sessions Quit your terminal mid-task. The agent picks up exactly where it left off — context, tool calls, partial diffs intact.
[+] No telemetry Zero outbound network traffic that isn't your model call. We don't see your code. We don't see your prompts.
[-] No cloud lock-in Self-host the agent. Self-host the model. The whole stack runs offline if your weights do.
[x] MIT licensed Fork it. Sell it. Embed it. Read the source — every commit is public.

Pricing

OpenCode itself is free. Zen is the managed routing layer that load-balances across providers and gives you one bill instead of five.

OSS

$0 forever
The full agent, MIT licensed. Bring your own key.
  • Full TUI + LSP integration
  • BYO model (Claude, GPT, local)
  • Resumable sessions
  • Community Discord

Zen

$20 / mo
Managed routing across every provider. One key. One bill.
  • Everything in OSS
  • Smart model routing
  • Usage dashboard + caps
  • Priority on rate limits

Enterprise

Talk to us
On-prem deployment, audit logs, SAML SSO, and a contract that survives procurement.
  • Self-hosted control plane
  • SAML SSO + SCIM
  • Audit logs + DLP hooks
  • SLA + named support

FAQ

Is OpenCode actually free?

Yes. The agent, the TUI, the LSP integration — all MIT. Zen is the optional managed routing tier. You never need it.

+
Does it work offline?

If your model does, yes. Point it at a local llama.cpp endpoint and the whole stack runs without an internet connection.

+
Will my code leave my machine?

Only the prompt you send to the model you chose. We don't run an inference layer. We don't proxy. We don't log.

+
How is this different from Cursor or Warp?

Those are editors and terminals with an AI panel. OpenCode is the inverse — an agent that lives in the terminal you already use, with no UI of its own beyond the TUI.

Design System

A single-font system. Berkeley Mono carries every text role; here it's substituted by JetBrains Mono and IBM Plex Mono. Warm cream canvas. 4px radius on interactive elements only. 0px everywhere else. ASCII brackets are the icons. Source — DESIGN.md.

Color

[ink] — the only "brand color"

ink / primary
#201d1d
ink-deep
#0f0000
canvas / on-primary
#fdfcfc

[surface] — cream is the only body background

canvas
#fdfcfc
surface-soft
#f8f7f7
surface-card
#f1eeee
surface-dark
#201d1d

[text] — 4-tier neutral ladder

ink
#201d1d
charcoal
#302c2c
body
#424245
mute
#646262
stone
#6e6e73
ash
#9a9898

[semantic] — reserved for the in-product TUI only

accent
#007aff
warning
#ff9f0a
danger
#ff3b30
success
#30d158

Typography

Berkeley Mono → JetBrains Mono / IBM Plex Mono fallback. One face. One mood. The page IS a man page.

display-xl38 · w700 · 0 · 1.5
The open source AI coding agent
heading-md16 · w700 · 0 · 1.5
What is OpenCode?
body-md16 · w400 · 0 · 1.5
Default paragraph copy across the page.
body-strong16 · w500 · 0 · 1.5
Inline emphasis and nav links.
button-md16 · w500 · 0 · 2.0
Download · Get started with Zen
caption-md14 · w400 · 0 · 2.0
Footer link · copyright · Fig 1.

Radius — only two values

none0 · containers
sm4 · interactive
full∞ · avatars

Components

[buttons] — 4px radius. Interactive elements only.

[inputs] — surface-soft default · canvas + ink border on focus

[badges] — small chips, ASCII brackets, 4px radius

[news] v0.42 [beta] Zen [stable]

[card variants] — flat-on-cream · the dark card is the only "elevated" surface

[+] feature-row

Bracket marker + bold key + body description. Sits in a flat list with a hairline rule beneath it.

[#] chart-tile

Sparse inline SVG plot. Caption underneath: Fig N. label. Never specific data points — the chart is decorative type.

[•] tui-mockup

The single dark surface. Reserved for the hero TUI preview — never used as chrome treatment elsewhere.

View DESIGN.md ↗