OpenCode: The open-source coding agent that's taking on the big players in the terminal

A quick intro — and why it matters right now

Every AI coding tool in 2026 wants to own your terminal. Claude Code wants you on Anthropic. Codex CLI wants you on OpenAI. Cursor wants you in their editor. And so on.

OpenCode chose a different fight: to be the only tool that works with all of them, open-source, and living full-time in the terminal.

The numbers say devs took the bait. 146,000+ stars on GitHub, 850 contributors, and 6.5 million monthly developers in April 2026 — growing approximately 4.5x faster than Claude Code in star velocity. On March 20th of this year, OpenCode hit #1 on Hacker News with 1,099 points and 546 comments, and the thread became the year’s reference discussion on vendor lock-in in AI coding tools.

The pitch is simple and hits hard in 2026: you shouldn’t have to choose your coding agent based on which company you trust more not to change their pricing next quarter.

Growth and traction

OpenCode is built by Anomaly, the same team that made terminal.shop, and includes several contributors from the Charm ecosystem — the people who gave us Bubble Tea, the TUI framework in Go that quietly powers half of the modern terminal apps you use every day.

This matters. Because OpenCode isn’t a weekend project that went viral: it’s a terminal tool built by people who treat the terminal as a product surface, not as a fallback.

The growth curve is almost absurd. From around 100K stars in February 2026 to 147K by mid-April. At one point it was about 18,000 stars in two weeks — a speed more typical of viral frameworks than of a CLI tool. The HN thread in March was the inflection point. Some comments praised the model-agnostic approach. Others complained that the TUI eats 1GB of RAM. Another noted that the TypeScript codebase is larger and more complex than it needs to be. All true, and honestly it’s all fine, because when a tool grows this fast and is open-source, the community has the power to push it in whatever direction it wants.

Compared to the numbers of direct competitors — OpenHands hovering around 68K stars, Cline near 59K, Aider around 30K — OpenCode isn’t just ahead: it’s in another league.

The alliance that says more than a press release

OpenCode doesn’t have a big “strategic alliance” Silicon Valley-style — no joint keynote or eight-figure investment. But it has something that speaks louder.

On March 7th, 2026, OpenAI launched the Codex Open Source Fund: six months of free ChatGPT Pro plus elevated API quotas for maintainers of prominent open-source projects. And they explicitly said the offer extends to developers using third-party tools like OpenCode, Cline, or OpenClaw.

Translation: OpenAI sees the OpenCode ecosystem as part of its own developer community. Not a competing tool — a distribution channel. For a project that could have been positioned as a rival to Codex CLI, it’s a strong signal that the model-agnostic approach isn’t a marketing gimmick: the model providers themselves are treating it as infrastructure.

Key features

This is where things click if you’re coming from Claude Code or Codex CLI.

75+ model providers ready to go. OpenAI, Anthropic, Google Gemini, Groq, Mistral, NVIDIA NIM, Alibaba, Ollama for local models, and their own “Zen” layer of handpicked models optimized for coding agents. Switch models with a single /models command mid-session, no config reload, no restarts.

Native TUI in Bubble Tea. Fast, keyboard-first, and — this is key — well-designed for long sessions. vim-style editing, diff view, side-by-side panels. It’s the first coding agent that feels like it respects that you can have the terminal open for 8 hours straight.

Built-in agents with Tab switching. build is the default — full access, writes code, runs commands, makes commits. plan is read-only — analysis and exploration without risk of touching files. Tab switches between the two. There’s also an invocable general subagent with @general for complex multi-step searches.

LSP integration. OpenCode speaks Language Server Protocol, which means you get the same semantic understanding of code that your editor has. In v1.14.21 (released today, April 23rd), they added Roslyn for C# and better pull diagnostics for Kotlin.

MCP (Model Context Protocol) support. The same protocol Claude Code uses. All the existing MCP servers in the ecosystem — Linear, Notion, GitHub, your company’s private ones — work directly with OpenCode.

Persistent sessions via SQLite daemon. Sessions survive between restarts, and you can pin OpenCode to a specific transcript with the --session flag. A separate process keeps everything synced without blocking the TUI.

Recent updates (April 2026)

OpenCode ships fast. Sometimes too fast — it’s one of the recurring criticisms on HN — but the speed means fixes arrive quickly too.

v1.14.21 (April 23rd, 2026) — released the same day this article is being written. The highlights:

  • Roslyn Language Server for C# instead of csharp-ls (big jump in quality for .NET devs)
  • Improved session compaction — long threads retain more useful context when old history gets summarized
  • UTF-8 BOM preservation when editing files via tools (sounds minor, breaks a ton of pipelines on Windows when it doesn’t work)
  • Fixed bare git repos and worktrees detection
  • fail-fast on invalid or missing sessions instead of launching the TUI in a broken state

v1.14.20 — Experimental HTTP API with GET /config, plugin loading fixes on Windows, several permission and prompt control refinements. The HTTP API is interesting because it opens the door to remote automation and CI integration.

v1.14.19 — NVIDIA added as built-in provider, preserve_recent_tokens setting for compaction, protection against parallel edits of the same file stepping on each other, ripgrep bundled for Windows ARM64.

Three versions in less than two weeks. That’s the pace of a project in full momentum.

Installation

OpenCode works on macOS, Linux, and Windows. Pick your flavor:

The one-liner (macOS/Linux):

curl -fsSL https://opencode.ai/install | bash

With npm (any OS):

npm install -g opencode-ai
# or bun/pnpm/yarn, whatever you use

Homebrew (macOS/Linux):

brew install anomalyco/tap/opencode

Windows:

scoop install opencode
# or
choco install opencode

After installing, run opencode --version to verify it’s in your PATH. The first-run setup is straightforward: you configure your provider in ~/.config/opencode/opencode.jsonc (or config.toml depending on version), put your API keys in ~/.local/share/opencode/auth.json, and start.

But the most important step comes after: inside your project, run /init. That generates an AGENTS.md file in the root — the equivalent of Claude Code’s CLAUDE.md. It’s a file where you document the architecture, conventions, scripts, and context of your project so the agent doesn’t start each session from zero. Commit it. Your team will thank you for it.

Use cases

This is where OpenCode genuinely wins over the competition:

The solo dev who’s tired of paid subscriptions. If you’re a freelancer or indie dev, paying $20–$200/month for a proprietary tool feels bad. With OpenCode you use whatever API key you already have — or Ollama for local models if you have decent hardware — and only pay for the tokens you actually use.Polyglot teams. You’ve got backend in Python, frontend in TypeScript, mobile in Kotlin, and infra in Go. With OpenCode a single tool covers everything, and each dev can pick the model that works best for their stack without renegotiating a license at the company level.

Local/offline workflows via Ollama. For anyone working from unstable connections — and in Latin America this is real, not hypothetical — having the agent with a fallback to a local model is the difference between shipping and grinding to a halt. Ollama with Qwen 2.5 Coder or DeepSeek Coder on decent GPU won’t match Claude Opus, but it’s functional.

CI pipeline integration. The non-interactive mode lets you run OpenCode as a command-line tool without launching the TUI. Perfect for automated code review, test generation, or rubber-duck reviews before you merge a PR.

Enterprise teams that need self-hosted and auditable. OpenCode doesn’t store your code. It runs on your infrastructure. Every call goes to the provider you choose. For anyone working in finance, healthcare, government, or anywhere data sovereignty isn’t optional, this is a non-negotiable requirement.

OpenCode vs the rest of the field

Let’s be honest here, because OpenCode isn’t magic.

Where OpenCode wins:

  • Cost — you only pay for tokens, no fixed subscriptions
  • Model freedom — 75+ providers vs. 1–2 in locked-in tools
  • Privacy — zero code goes to OpenCode’s servers, ever
  • TUI polish — built by people who love the terminal, and it shows
  • Open-source — you can audit, fork, modify

Where it still lags:

  • Agentic maturity — Claude Code still has the edge on long-term tasks and autonomous planning, especially with Opus 4.7 as default
  • MCP ecosystem depth — supports MCP, but OpenCode’s specific ecosystem is smaller than Claude Code’s plugin network
  • Resource usage — that 1GB of RAM is real. If you’re on an 8GB laptop running Docker, Chrome with 40 tabs, and VSCode, you’ll feel it
  • Release cadence — three versions in two weeks is good for new features, but it also means occasional production bugs

Cursor 3 plays in a different league: IDE, not terminal. If you want the full modern IDE experience with AI integration, Cursor still wins. OpenCode is for the dev who lives in tmux + Neovim.

Codex CLI is the most direct comparable, but it’s locked to OpenAI. If all your code goes through GPT-5.4 anyway, Codex CLI is a bit more polished for that specific case. OpenCode wins the moment you want to switch providers.

What’s coming

The public roadmap isn’t super specific, but community signals are pretty clear:

  • More local-first capabilities — integration with Ollama and NVIDIA NIM will keep improving. The local-first bet is strategic
  • Stable HTTP API — the experimental GET /config is the first step. Everything points to a full API for automation and remote control
  • JetBrains adapter — it’s been in preview for a while, and once it’s stable it opens up the IntelliJ/PyCharm/GoLand world
  • Deeper enterprise policy — sandbox carve-outs, policy verification, reproducible builds. Signals that Anomaly is going after enterprise contracts

The underlying tension is interesting: OpenCode is open-source, but the model providers aren’t. Every time OpenAI or Anthropic changes their pricing or terms, the entire OpenCode ecosystem has to react. The project’s long-term sustainability depends on maintaining that healthy diversification — and honestly, on Anomaly finding a sustainable way to fund 850 contributors and 6.5M monthly users without selling out.

Conclusion — who should switch, and who should wait

Switch now if:

  • You’re paying for a proprietary coding tool and you feel every tweak in their pricing list
  • You work with multiple models depending on the task
  • You need self-hosted or offline for compliance or connectivity
  • You already live in the terminal and a polished TUI genuinely makes your life better

Wait if:

  • Your flow is already solid in Claude Code or Codex CLI and it works well — don’t fix what isn’t broken
  • You need maximum agentic reliability for long autonomous tasks (Claude Code with Opus 4.7 is still the benchmark there)
  • You don’t have budget to experiment with API tokens and you don’t have hardware for capable local models either

The open-source world won a real battle this year. For a long time, the narrative was “proprietary tools are always better because they have more resources.” OpenCode proved that when 850 contributors, a solid Bubble Tea foundation, and the right market timing align, an open-source project can go toe-to-toe — and sometimes win — against the giants.

If you haven’t installed it yet, the curl one-liner takes 30 seconds. The rest is up to you.


Question for the community: Are you already using OpenCode, or are you still on Claude Code / Codex CLI / Cursor? What made you choose — or stay away from — the open-source option? Tell us your experience in the comments.