OpenCode: The Open-Source AI Coding Agent Explained (2026)
June 25, 2026
OpenCode is an open-source, MIT-licensed AI coding agent that runs in your terminal, IDE, or a desktop app. Unlike a chat assistant, it reads and edits files, runs shell commands, and tests its own work. It is model-agnostic, supporting 75+ LLM providers including Claude, GPT, Gemini, and local models.12
TL;DR: OpenCode has crossed 178,000 GitHub stars and is used by more than 7.5 million developers every month, making it one of the most-starred open-source developer tools of 2026.12 It is free and open source (MIT), works with almost any model through a single interface, and is built privacy-first — it does not store your code or context. You pay only for model usage, or use the free models that ship with it. This guide explains what OpenCode is, who builds it, how it works, how to install it, and how it compares to Claude Code and Cursor.
What You'll Learn
- What OpenCode is and who maintains it
- The numbers behind its rapid 2026 growth
- How its agents, model support, and surfaces work
- How to install OpenCode and run your first session
- How OpenCode compares to Claude Code and Cursor
- Whether OpenCode is actually free
What is OpenCode?
OpenCode is an open-source agent that helps you write code in your terminal, IDE, or desktop.1 The defining difference from a traditional chat assistant is agency: when you give OpenCode a goal in natural language, it breaks the goal into steps, reads your file structure, creates and edits files, installs packages, runs terminal commands, and interprets the output to fix its own mistakes — without you approving every individual step.
It is licensed under the permissive MIT license and is written primarily in TypeScript.1 That detail has a backstory worth knowing: the original "opencode" was a Go project. After a 2025 split, that Go codebase was archived and continues today under the name Crush (developed by the Charm team and the original author), while the SST/Anomaly team kept the OpenCode name and rebuilt it in TypeScript.3 When developers say "OpenCode" in 2026, they almost always mean this TypeScript project — the one with 178K stars maintained at github.com/sst/opencode.1
The project is maintained by Anomaly, the team formerly known as SST (Serverless Stack). Visiting the original sst/opencode repository now redirects to anomalyco/opencode, reflecting that rebrand.1
The numbers behind OpenCode's 2026 growth
OpenCode's traction is the reason it keeps showing up in "best AI coding agent" roundups. According to its own project data and GitHub:
- 178,000 GitHub stars and 21,800 forks as of June 2026, per the live GitHub repository (OpenCode's own marketing site rounds this to "160K+").1
- 900 contributors and more than 14,000 commits.1
- More than 7.5 million developers every month, per OpenCode's official site.2
- The project shipped 827 releases, with v1.17.10 landing on June 24, 2026 — a release cadence measured in days, not months.1
OpenCode's founder put the monthly figure even higher, telling BetaKit in a June 2026 interview that the agent had reached 8 million users within roughly a year of launch, and that its hosted-model service was on track for around $25 million in annualized revenue.4 We lead with the 7.5M figure published on OpenCode's own site, and treat the 8M number as the founder's more recent claim.
How OpenCode works
Built-in agents: build and plan
OpenCode ships with two agents you switch between using the Tab key.1 The build agent is the default, full-access mode for development work. The plan agent is read-only: it denies file edits by default and asks permission before running shell commands, which makes it ideal for exploring an unfamiliar codebase or planning a change before touching anything. A general subagent also handles complex searches and multi-step tasks internally, and can be invoked with @general.1
Model support: bring any model
OpenCode is not coupled to any single provider. Through Models.dev, it connects to 75+ LLM providers, including Claude, GPT, Gemini, and local models.2 Free models ship with it via OpenCode Zen — a handpicked set the team tests and benchmarks specifically for coding agents — so you can start without any API key.2 If you already pay for AI elsewhere, you can log in with a GitHub Copilot account or an OpenAI ChatGPT Plus/Pro account and use that instead of a separate API key.2
Where it runs
OpenCode is available as a terminal interface (its original TUI), a desktop app (in beta on macOS, Windows, and Linux), and an IDE extension.12 Other built-in features include LSP support (it loads the right language server for the model automatically), multi-session (run several agents in parallel on the same project), and share links for any session. It is also built privacy-first: OpenCode states it does not store your code or context data, so it can run in privacy-sensitive environments.2
How to install OpenCode and run your first session
The fastest install is the one-line script:1
# Install via the official script
curl -fsSL https://opencode.ai/install | bash
# Or with a package manager
npm i -g opencode-ai@latest # npm (also bun/pnpm/yarn)
brew install anomalyco/tap/opencode # macOS and Linux (recommended)
Once installed, start a session by running opencode inside a project directory, which launches the terminal UI:
cd my-project
opencode
On first run, OpenCode asks you to pick a model provider. You can choose one of the included free Zen models, paste an API key for a provider like Anthropic or OpenAI, or log in with an existing GitHub Copilot or ChatGPT subscription.1 From there, describe what you want in plain language — the practical tip from experienced users is to talk to it the way you would brief a junior developer: enough context to remove ambiguity, but not a line-by-line script. Press Tab to drop into plan mode first if you want OpenCode to outline its approach before it edits anything.
OpenCode vs Claude Code vs Cursor
These three tools take fundamentally different approaches. The table below focuses on the structural differences that don't change week to week, rather than headline prices, which shift frequently.
| Dimension | OpenCode | Claude Code | Cursor |
|---|---|---|---|
| License | Open source (MIT) | Proprietary | Proprietary |
| Primary surface | Terminal, desktop, IDE extension | Terminal | AI-native IDE (VS Code fork) |
| Model support | 75+ providers, any model1 | Anthropic's Claude models | Multiple, vendor-managed |
| Tool cost | Free (pay only for model usage; free models included) | Subscription / usage-based | Subscription (free tier + paid tiers) |
| Vendor lock-in | Minimal — swap models freely | Tied to Anthropic | Tied to Cursor's platform |
The practical takeaway: reach for OpenCode when you want to experiment across models, prototype on a budget, or work where vendor lock-in is unacceptable. Many developers use Claude Code for deep, Anthropic-model planning work, and Cursor for inline edits and visual, IDE-centric workflows. Because OpenCode is model-agnostic, you can also point it at the same Claude or GPT models the other tools use — the difference is in the harness, not necessarily the underlying model.
Is OpenCode really free?
Yes — the tool itself is free and open source under the MIT license,1 and you can run it with the free models bundled through OpenCode Zen at no cost.2 Beyond that, your only spend is model usage: either pay-as-you-go API tokens from a provider you choose, or an existing subscription you already hold (Copilot, ChatGPT Plus/Pro) that OpenCode can authenticate against.2 There is no mandatory subscription to use OpenCode, which is a core reason it spread so quickly among cost-sensitive and open-source-minded developers.
The bottom line
OpenCode has become one of the most-starred open-source developer tools of 2026 by doing something deliberately unglamorous: giving developers a free, model-agnostic agent that runs where they already work and doesn't lock them into a vendor.2 With 178K stars, 7.5M+ monthly developers, MIT licensing, and 75+ supported model providers, it is a credible default for anyone who wants agentic coding without a subscription or a walled garden. If you have ever wanted to try the same task against Claude, GPT, and a local model without rewiring your toolchain, OpenCode is the lowest-friction way to do it.
For more on the broader shift this represents, see our deep dives on AI coding agents and autonomous dev workflows, Claude Code, and the Cursor AI editor.
Footnotes
-
OpenCode README and GitHub repository, github.com/sst/opencode → github.com/anomalyco/opencode (178,000 stars, 21,800 forks, 900 contributors, 14,398 commits, 827 releases, release v1.17.10 dated June 24, 2026, MIT license, TypeScript, build/plan/general agents, install commands), accessed June 25, 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20
-
OpenCode official site, opencode.ai (75+ model providers via Models.dev, free models via Zen, GitHub Copilot and ChatGPT Plus/Pro login, terminal/desktop-beta/IDE surfaces, LSP/multi-session/share links, privacy stance, 7.5M+ monthly developers; the site advertises "160K+" GitHub stars), accessed June 25, 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15
-
OpenCode (original Go project), github.com/opencode-ai/opencode (Go 99.2%; repository archived September 18, 2025; README states the project continued under the name Crush, developed by the Charm team and the original author), accessed June 25, 2026. ↩
-
BetaKit, "Q&A: OpenCode's founder on how the AI agent went from zero to 8 million users in a year," June 2026. ↩