OpenCode

Terminal coding agent for developers who want any model and a read-only plan mode

The open source coding agent.

Category
AI agents & assistants
Audience
Developers
Language
TypeScript
Licence
MIT

Updated

OpenCode is an open source AI coding agent that runs in your terminal and works with whatever model you point it at. It is aimed at developers who already spend the day in a shell and want an assistant that can read a repository, change files and run commands in place, rather than a chat window bolted onto one vendor's model. The project is written in TypeScript, released under the MIT license, and has gathered more than 204,000 stars and 26,000 forks on GitHub since it first appeared in April 2025.

What it does

OpenCode gives you a terminal interface to an agent that works on the repository you are standing in. You describe a task in plain language, and the agent reads the relevant code, edits files and runs commands while the output scrolls past in front of you.

Two decisions set the shape of the tool:

  • Any model. The project's central pitch is that you are not locked into a single model. You choose the one that drives the agent.
  • Two built-in agents. A build agent and a plan agent ship with the tool, and one key switches between them.

Build mode is the working mode: it codes freely and makes real changes to your files. Plan mode is deliberately narrower — it only reads code, so it can look around and sketch an approach without touching anything. That split matters more than it sounds. The common complaint about coding agents is the surprise edit, and a mode that is structurally incapable of writing is a cheaper safeguard than reading every diff twice.

The tool itself is free and the source is public under the MIT license, so none of it sits behind a subscription.

How it works

The workflow is the terminal one. You install the agent, open a repository, and give it a task in the same window you would otherwise be typing git commands into. Because it operates on the working directory rather than on an uploaded copy of your code, edits and command runs happen live and land where you expect them.

Mode switching is a single keystroke, which suggests a natural two-step rhythm: start in plan mode so the agent can explore an unfamiliar area and describe what it would change, then switch to build mode once the plan looks right. The work stays visible as it proceeds — you see the files it touches and the commands it runs as they happen, not in a summary afterwards.

Beyond that, this entry sticks to what the project itself documents. The repository points to opencode.ai for full documentation and to a Discord server for discussion, and those are the places to look for model configuration, flags and the rest of the surface.

Getting started

Installation is a single terminal command, and the agent is published to npm as the opencode-ai package, so a Node-based install is the path of least resistance for most people. After that you change into any repository and start giving it real tasks; no separate project setup step is described beyond opening the directory.

The README is translated into more than twenty languages, which is a small but real signal of how wide the user base has become. The documentation site and the Discord invite both sit at the top of that README, alongside the npm and build-status badges.

When to use it / when not

Reach for OpenCode when:

  • you work primarily in a terminal and would rather not move into a separate application to get agent help;
  • you care about model choice, either because you have a preferred one or because you want to switch as new ones arrive;
  • you want a read-only pass over a codebase before anything is allowed to change it;
  • you need a permissive license, since MIT lets you use and modify the code inside a commercial setting.

It is a weaker fit if you want a graphical, editor-embedded experience: the materials here describe a terminal interface and nothing else. It is also not the choice if you want one vendor to handle model access, billing and support as a single package. A bring-your-own-model design puts that decision back on you, and the project's own materials do not cover provider setup or what running a given model costs.

More than 200,000 stars on a project a little over a year old is the kind of number that invites suspicion, but the design underneath it is simple enough to explain in a sentence and easy enough to test in an afternoon: an agent in your terminal, a model of your choosing, and a mode that cannot write. Developers who already work from the command line should take it seriously, and so should teams that do not want their assistant welded to a particular model vendor. If you want a graphical assistant, or a supported product with an account and a support contract behind it, this is not that — but as a free, MIT-licensed, actively pushed piece of infrastructure for day-to-day coding, it is worth an hour of your time.

More in AI agents & assistants

All of AI agents & assistants →