OpenCode: The Open-Source AI Coding Agent at 178K Stars
Reviews 5 min read intermediate

OpenCode: The Open-Source AI Coding Agent at 178K Stars

OpenCode is an open-source (MIT), terminal-native AI coding agent with 178K GitHub stars. It is model-agnostic, connecting to 75+ providers (Anthropic, OpenAI, Google, Ollama) with bring-your-own keys. LSP integration feeds compiler diagnostics back to the model; built-in build and plan agents plus a general subagent. Runs locally/air-gapped, ships frequently (v1.17.9, 826 releases), and now has a desktop beta. Trade-offs: a terminal learning curve, you pay your own API bills, and quality depends on the model you plug in.

Marcus Rivera
Marcus Rivera
Jun 24, 2026

Most AI coding tools want to own your workflow: a proprietary editor, a metered subscription, a model you don't choose, and your code routed through a vendor's servers. OpenCode is the loudest rejection of that bargain to date — and with 178,000 GitHub stars and a top spot among 2026's coding agents, developers are clearly buying the pitch.

It is a terminal-native, fully open-source coding agent under the MIT license that connects to the model you pick, runs where you run it, and keeps your code under your control. After a week of living in it across two real codebases, here's an honest read on whether the hype holds up.

What OpenCode actually is

OpenCode is not an editor and not a chatbot bolted onto one. It's an agent that lives in your terminal, reads your repository, and edits files in place — closer in spirit to Claude Code than to Cursor. You install it, point it at a project, and talk to it.

The headline design choice is that it's model-agnostic. Rather than locking you to one provider, OpenCode connects to 75+ AI providers — Anthropic, OpenAI, Google, AWS Bedrock, Azure, Groq, OpenRouter, and local models via Ollama — and you switch between them with a flag. You bring your own API keys. There is no OpenCode subscription standing between you and the model.

That matters more than it sounds. The single most expensive mistake in AI tooling right now is betting your workflow on one lab's model and pricing. OpenCode treats the model as a swappable component, which is exactly how it should be treated.

The features that earn their keep

A few things separate OpenCode from the pile of "AI in your terminal" wrappers.

LSP integration. OpenCode hooks into the Language Server Protocol, the same machinery your editor uses for autocomplete and error squiggles. After the agent makes an edit, the language server feeds real compiler diagnostics back to the model. The practical effect: the agent catches its own type errors and undefined references instead of confidently handing you broken code. This is the difference between a toy and a tool.

Two built-in agents, switchable with Tab:

Agent Access Best for
build Full read/write Active development, refactors, fixes
plan Read-only; denies edits, asks before bash Exploring an unfamiliar codebase, scoping a change

The plan agent is the underrated one. Pointing a read-only agent at a repo you've never seen and asking "how does auth work here?" is genuinely useful, and the inability to touch files means you can let it run without babysitting. There's also a general subagent (invoked with @general) for multi-step searches.

Local and air-gapped operation. Because you can route everything through Ollama, OpenCode runs entirely offline. For regulated industries — finance, healthcare, defense — where source code legally cannot leave the building, this isn't a nice-to-have, it's the whole reason the tool is on the table.

It moves fast. The project shipped v1.17.9 on June 21, 2026, and sits at 826 releases with over 14,000 commits. The codebase is ~69% TypeScript. A desktop app is now in beta for macOS, Windows, and Linux, for those who want a GUI over the terminal experience.

Getting started

Installation is refreshingly boring, which is a compliment:

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

# Or via package managers
npm i -g opencode-ai@latest          # npm/bun/pnpm/yarn
brew install anomalyco/tap/opencode  # macOS and Linux
scoop install opencode               # Windows

Point it at a repo, pick your model, and start talking. The docs at opencode.ai/docs are solid, and configuration is a single file rather than a settings labyrinth.

Where it falls short

This is a review, not a press release.

The terminal-first experience has a learning curve. If you live in a GUI and have never touched a CLI agent, the first hour is disorienting. The desktop app is still in beta and not yet a full substitute.

Bring-your-own-key is a double-edged sword. Freedom from subscription lock-in means you eat the API bills, and a chatty agent on a frontier model can run up costs fast. There's no managed free tier cushioning your experiments.

Quality is only as good as the model you plug in. OpenCode's intelligence is borrowed. Pair it with a weak or heavily quantized local model and the results disappoint — the agent's plumbing is excellent, but it can't out-think the model behind it.

And while 178k stars signals real momentum, an agent that edits your files autonomously demands trust. The read-only plan agent and per-command bash permissions are the right instincts, but you should still review diffs rather than rubber-stamp them.

Who should use it

OpenCode is the right call if you want to choose your own model, refuse subscription lock-in, work in regulated or air-gapped environments, or simply prefer the terminal. It's a weaker fit if you want a polished GUI with hand-holding, or a managed free tier to experiment on without watching a meter.

The Bottom Line

OpenCode is the most credible open-source answer yet to the closed, subscription-gated coding agents that dominate the market. The model-agnostic design is the right architecture for a moment when no single lab stays on top for long, the LSP integration makes it genuinely useful rather than merely impressive, and the MIT license plus local execution make it the obvious pick for anyone who can't or won't ship their code to a vendor's cloud. It asks more of you — a terminal, your own API keys, your own judgment on diffs — but in exchange it hands back the one thing most AI tools quietly take: control. For developers who value that, OpenCode isn't just worth trying. It's the new default to beat.