What Is OpenCode? The Free Open-Source AI Coding Agent That Works With Any Model

What Is OpenCode? The Free Open-Source AI Coding Agent That Works With Any Model

Imagine opening a terminal, typing in plain English — "Add a login page to my website, with a password reset link" — and watching your machine read your code, write the new files, run the tests, fix the errors it finds, and show you exactly what it changed. No subscription to one company's AI, no locked-in tool, no sending your code to a server you did not choose.

That is OpenCode: a free, open-source AI coding agent that lives in your terminal. It is published by Anomaly (the company formerly known as SST) in the repository listed as anomalyco/opencode, under the MIT licence, and as of 14 November 2026 it has 226,726 stars. It connects to more than 75 model providers, including free models on your own computer, and its newest release, v2.3.0, shipped on 13 November 2026.




What Is OpenCode, in Plain Words?

OpenCode is a coding agent: a program that uses an AI model to do programming work for you. You describe what you want in ordinary language, and the agent reads your project, edits files, runs commands, and checks its own work. It is not a chatbot that only writes snippets for you to copy and paste — it works inside your project folder, and you can watch every step and undo anything you do not like.

It is terminal-first: its main home is the command line, which works on any computer and never needs a heavy graphical program. There is also a desktop app (still in beta), a web interface, and an extension for Visual Studio Code — but the terminal is where OpenCode feels most at home.

It costs nothing to use. OpenCode itself is free and open source under the MIT licence, so anyone can read its code, change it, and use it for work without paying Anomaly anything. What you pay for is the AI model behind it — and even there, OpenCode lets you choose who sends the bill, including free models and models running on your own machine.

The project is young and moves very fast: created on 30 April 2025, it had already shipped more than 200 releases by November 2026. The team also builds the SST framework, OpenNext, OpenAuth and OpenTUI. In January 2026 the company renamed itself from SST to Anomaly, and the repository moved from sst/opencode to anomalyco/opencode.

First, the Name Trap: This OpenCode Is Not the Other One

First, a warning about the name: it can lead you to the wrong project entirely.

There was an earlier, separate project also called OpenCode, written in Go, published under the name opencode-ai/opencode. That project was archived on 18 September 2025, and its README says it has continued under the name Crush, developed by its original author and the Charm team. Crush is a different project, made by different people, with around 14,000 stars — not the 226,726-star project this article is about.

The OpenCode in this article — more than 226,000 stars, written in TypeScript, published by Anomaly — is a separate project that kept the name after the original author moved on. Its history starts on 30 April 2025, when the anomalyco/opencode repository was created. Do not mix the two histories: Crush's story is not OpenCode's story.

If a search result or tutorial mentions OpenCode and something does not add up — the wrong language, the wrong install command — check which project it is talking about first. The test is the repository name: anomalyco/opencode is the project in this article; opencode-ai/opencode is the archived one, now Crush.

Why Is Everyone Talking About OpenCode?

The short answer is the numbers. As of 14 November 2026, the OpenCode repository has 226,726 stars and 30,708 forks, and its last code change landed the same morning this article was written. A project that ships this often is becoming infrastructure for developers.

The second reason is the timing. OpenCode 2.0, a full rewrite, shipped in September and October 2026, turning the coding agent into a background service that the terminal, web and desktop clients all connect to. Version 2.3.0 followed on 13 November 2026, making subagents run in the background by default. The project is visibly accelerating, not slowing down.

The third reason is the price model — or rather, the lack of a forced one. Most AI coding tools tie you to one company's model and subscription. OpenCode does the opposite: it connects to more than 75 providers, and you bring your own key, subscription, or computer. For developers in Pakistan, where paying for a foreign subscription in dollars can be awkward, that matters: start with free models, run a local model through Ollama at no cost, and only pay for a commercial model when you need one.

The fourth reason is the licence. MIT means the code belongs to everyone: you can read it, fork it, change it, and use it at work without asking permission or paying a fee. If Anomaly ever changed direction, the community could keep the project alive on its own.

What Can OpenCode Actually Do? Its Functions Explained

OpenCode's functions fall into a few clear groups. Here is what each one means in plain language.

1. The Build Agent: It Writes and Changes Your Code

You tell OpenCode what to build — "add a search box to the homepage" — and the build agent reads the relevant files, writes the change, and runs your tests to check it. It has full access to your project folder: it can create files, edit them, and run shell commands. Press Tab to switch agents; the build agent is the one that does the actual work.

2. The Plan Agent: It Thinks Before It Touches Anything

The second built-in agent is the plan agent, and it is read-only: it can look at your code and explore your project, but it cannot change a single file. Use it when you want analysis first — "find out why this page loads slowly" — without the risk of an edit going wrong. Switching to plan mode before a big change is one of the best habits a new user can build.

3. Subagents: Helpers That Work in the Background

OpenCode can spin up subagents — smaller helpers for a piece of a job, such as a complex search across the codebase. Call the general subagent with @general. Since v2.3.0 (13 November 2026), subagents run in the background by default: they return immediately, keep working while you carry on, and report back when they go idle.

4. More Than 75 Model Providers — Including Your Own Computer

OpenCode is not tied to any single AI company. It connects to more than 75 providers, including Anthropic, OpenAI and Google, plus local models through an OpenAI-compatible endpoint — which is how Ollama, LM Studio and llama.cpp plug in. Pick the model per session. From v2.2.3, a Claude subscription works again through the Claude Agent provider, and v2.2.7 (10 November 2026) added GitHub Copilot Auto.

5. LSP, Clients and MCP: It Understands Code and Plugs Into Tools

OpenCode bundles LSP — the Language Server Protocol behind code completion in editors like VS Code — so the agent understands symbols and references. OpenCode 2 runs as one background service with several clients: the terminal, the desktop app (beta), a web interface, and a Visual Studio Code extension. Version 2.3.0 also added "Jump to message" in the desktop app. It supports MCP too, so it can connect to external tools such as databases. And because an agent that edits files is powerful, OpenCode asks before risky actions, and you can review and undo every change.

FunctionWhat it doesExample in daily use
Build agentReads, edits and creates files; runs commands"Add a contact form to the site"
Plan agentRead-only analysis and exploration"Why does this page load slowly?"
SubagentsBackground helpers for searches and multi-step jobs@general to explore a whole codebase
75+ providersAny model, any company, or a local modelFree model for drafts, strong model for hard bugs
LSP, clients, MCPUnderstands code; terminal, desktop, web, IDE; external toolsFind every use of a function before renaming it

How OpenCode Works, Step by Step

Follow one request through the system: you type "Add a dark mode toggle to the settings page" in a project folder. First, OpenCode reads your project — the folder structure, the settings page and its styles — and, using LSP, works out which files are involved. The plan agent can do this part without changing anything.

Second, the build agent makes the change: it edits the settings page, adds the dark-mode styles, and wires the toggle up so the choice is remembered. Each edit is shown to you, and you can review or undo it. Third, it checks its own work — it runs your test suite or build, reads the result, and if the build fails, it sees the error and tries a fix. This loop — edit, run, read the error, fix — is where a coding agent earns its keep. And if the job is big, subagents help in the background while you keep working.

How to Install OpenCode

Installing OpenCode is quick, but there are two version lines to understand first, because mixing them up is the most common beginner mistake.




The current line is v2, published on npm as @opencode/cli. The latest release is v2.3.0, published on 13 November 2026; the previous release, v2.2.7, came out on 10 November 2026, with eight v2 releases between v2.2.0 (27 October) and v2.2.7. The older line is v1: its latest release is v1.19.5, published on 28 October 2026, and it is still patched. V2 tags do not appear on the Releases page in the same way, which is why that page can still read 1.19.x even though v2 is the current line.

On macOS, Windows or Linux, the simplest install is the one-line command from the official site — curl -fsSL https://opencode.ai/v2/install | bash — or, if you use Node.js, npm i -g @opencode/cli. There is also a Homebrew tap and an Arch Linux package. Once installed, open a terminal, go into a project folder, and type opencode. Press Tab to switch between the build and plan agents, type your request in plain language, and press Enter. Before your first real job, connect a model: a ChatGPT, GitHub Copilot or Claude subscription, an API key, or one of the free models OpenCode ships with.

Using OpenCode With Ollama: Free AI on Your Own Computer

This is the combination that makes OpenCode genuinely free to run, and it is the reason this post follows yesterday's Ollama post on Tech Know. Ollama is a free program that downloads AI models and runs them on your own computer, with no subscription and no data leaving your machine. OpenCode can use that local model as its brain.

The setup is short. Install Ollama and download a model — our Ollama post on Tech Know, published 13 November 2026 ("What Is Ollama? How to Run AI on Your Own Computer, Free and Private"), walks through the whole thing, including which model sizes fit which computer. Then start Ollama and tell OpenCode to use the local endpoint. From that point, your coding agent runs entirely on your own hardware: your code never leaves your machine, and there is no per-message bill. The trade-off: a local model on an ordinary laptop is not as clever as the biggest commercial models, and it answers more slowly. Many developers use both — the free local model for everyday work, a paid model switched on only when the job is hard.

What Does OpenCode Cost?

OpenCode itself costs nothing: free and open source under the MIT licence. What you pay for is the model behind it. Free: use the free models OpenCode ships with, or run a local model through Ollama, LM Studio or llama.cpp. Bring your own subscription: log in with a ChatGPT, GitHub Copilot or Claude subscription you already pay for. Bring your own API key: pay a model provider directly, per token used.

Anomaly also sells its own model services. OpenCode Go costs $10 a month, and Go Plus $40 a month, for a curated roster of open-weight models tested for agentic coding, with per-model usage limits resetting every five hours, weekly and monthly. Neither is required. OpenCode Zen is pay-as-you-go: top up $20 at a time (plus a $1.23 card fee per top-up, according to independent reviews). Prices were checked on 11–14 November 2026 and can change. The honest summary: the client is $0, and the model is where the bill lives.

RouteCostBest for
Free models / local Ollama$0Learning, small jobs, full privacy
Your own subscriptionWhat you already payChatGPT, Copilot or Claude subscribers
Your own API keyPer-token, provider ratesFull control over spend
OpenCode Go$10/monthPredictable cost on tested open models
OpenCode Go Plus$40/monthHigher limits, larger projects

Which Model Should You Use With OpenCode?

The choice of model matters more than the choice of agent, because the model does the actual thinking. If you are learning, start free: a local model through Ollama, or one of OpenCode's free models. You will learn the workflow — plan first, build second, review every change — without spending anything.

If you are doing real work, use a strong commercial model: the best coding models from Anthropic, OpenAI or Google, through your own key or subscription, or through OpenCode Go's curated roster. A strong model writes better code, catches its own mistakes more often, and needs fewer rounds of fixing. If privacy matters most, use a local model: your code never leaves your machine — just remember the trade, since the strongest local models need a good graphics card and plenty of memory. Match the model to the job: a cheap or free model for explanations and small edits, a strong model for architecture changes, tricky bugs and big refactors. OpenCode lets you switch per session.

Who Should Use OpenCode — and Who Should Not

OpenCode suits developers who want a coding agent without being locked into one company's model or subscription: freelancers who switch between clients and models, students who want a free way to learn agentic coding, open-source contributors who like tools they can read and fork, and anyone whose code must stay private. It also suits people who live in the terminal: if your working day already happens in a terminal window, OpenCode feels like a natural extension of it.

It is less suited to people who want a polished, click-and-go assistant with zero setup. OpenCode's strength is flexibility, and flexibility has a price: you choose the model, manage the keys, and keep it updated. If you want the simplest possible experience and already pay for one AI subscription, that company's own coding tool may feel easier. It is also not the right choice if you never touch a terminal and do not want to start: the desktop app and IDE extension help, but the terminal is still the heart of the tool.

OpenCode vs Claude Code, Codex and Cursor: What Is the Difference?

OpenCode is often compared with Claude Code, OpenAI's Codex CLI and Cursor's agent, because all four do the same job: an AI that edits your code. The difference is the model, not the work. Claude Code is Anthropic's own agent, running on Anthropic's models — currently the strongest coding models many developers have used — but it is tied to a Claude subscription. Codex CLI is OpenAI's equivalent, tied to OpenAI. Cursor is a full editor with an agent built in, tied to its own plans.

OpenCode is the open alternative: the same kind of agent, but free, open source, and able to use any of those companies' models — or a free or local one instead. It will not be cleverer than Claude Code running on the same model, because the model is what does the thinking. What it offers instead is choice: the same agent, any model, no lock-in, and a licence that means nobody can take it away from you. One more difference: because OpenCode moves fast, it sometimes ships rough edges that a big company's polished tool would not.

The Honest Downsides

No honest article about OpenCode should skip its weak points. First, it moves very fast: more than 200 releases since April 2025, and eight v2 releases in two weeks at the end of October and start of November 2026, means the tool you install today can look slightly different next week. Second, you are the administrator: updates, API keys and model choices are all your job. A high-severity security issue, CVE-2026-22812, was reported in 2026 and fixed in v1.18.33 — a reminder to keep the tool updated.

Third, the agent can make mistakes: it can edit the wrong file, misunderstand a request, or write code that looks right and fails in a subtle way. The plan agent, the review step and the undo option exist for exactly this reason — use them, especially on code you care about. Never let an agent run commands on a production server or a live database without understanding what it is about to do. Fourth, background subagents need care: since v2.3.0 they run in the background by default, but a background helper can also change files while you edit the same files in the parent session. Fifth, a local model is not a flagship model: expect slower answers and more mistakes on hard problems. That is the model's limit, not OpenCode's.

Frequently Asked Questions

Is OpenCode really free?

Yes. OpenCode is free and open source under the MIT licence. You only pay for the AI model behind it, and you can avoid even that with free models or a local model on your own computer.

Is OpenCode the same as Crush?

No. Crush is the continuation of a different, older project — opencode-ai/opencode, written in Go — archived on 18 September 2025 and now developed by the Charm team. The OpenCode in this article is anomalyco/opencode, written in TypeScript, published by Anomaly.

Which version should I install, v1 or v2?

Install v2. The current release is v2.3.0, published 13 November 2026, available on npm as @opencode/cli or through the one-line installer. The v1 line (latest v1.19.5, 28 October 2026) is still patched.

Can I use OpenCode with Ollama on my own computer?

Yes. OpenCode connects to local models through an OpenAI-compatible endpoint, which is how Ollama, LM Studio and llama.cpp plug in. Install Ollama, download a model, and point OpenCode at the local endpoint — see our Ollama post on Tech Know (13 November 2026).

Do I need to be a programmer to use OpenCode?

OpenCode is a tool for people who write code — but you do not need to be an expert. If you can open a terminal, move into a project folder and describe what you want in plain language, you can use it.

Which computers can run OpenCode?

macOS, Windows and Linux. The tool itself is light — it is the model that needs the power. A local model needs enough memory and ideally a graphics card, but with a cloud model, OpenCode runs happily on an ordinary laptop.

Can OpenCode replace Claude Code or Cursor?

It can replace them for many jobs, especially if you value freedom over polish: the same kind of agent, any model you choose, no lock-in, no charge for the tool. Many developers keep both — a polished tool for their main work, OpenCode for everything else.

Is my code private with OpenCode?

It depends on the model you choose. OpenCode itself is open source and runs on your machine, but with a cloud model your code is sent to that provider. If privacy matters, use a local model through Ollama: then nothing leaves your computer.

The Bottom Line

OpenCode is the most interesting coding agent of 2026 for one simple reason: it takes a powerful idea — an AI that writes, edits and checks your code — and removes the lock-in. It is free, open source under the MIT licence, written in TypeScript, and it works with more than 75 model providers, including free and local models. With 226,726 stars as of 14 November 2026 and v2.3.0's background subagents landing just yesterday, it is the fastest-moving project in its category.

It is not for everyone: it moves fast enough that guides go stale, it asks you to manage your own models and keys, and its agent can make mistakes that you must catch. But if you want a coding agent that is yours — free, open, and working with whatever model you choose — there is no better place to start. Install v2, connect a model, open a project folder, and ask it to do one small job.

By Umar Farooq, Tech Know.

Post a Comment

0 Comments