What Is OpenCode? The Open-Source Terminal AI Agent (2026)
Last verified: June 16, 2026 · Format: Breakdown
OpenCode is an open-source AI coding agent for your terminal. You describe a task in plain language, type "find where we validate the signup form and add a test for the empty-email case," and the agent reads the relevant files, makes the edits, runs the test, and shows you what changed before anything is saved. No browser tab, no separate editor window, no copy-pasting from a chat box. So if you have been wondering what is OpenCode in practical terms, the short version is this: a coding agent that lives in the terminal, is open source, and lets you bring your own model.
The rest of this page is a practitioner's breakdown: who maintains the project, the core features that define it, how its bring-your-own-key model works, what it costs (and what it does not), how it handles your data, who it fits, and the honest limitations worth knowing first. Counts such as stars and contributors are reported by the project and were checked on June 16, 2026. Confirm anything that matters to you against the OpenCode documentation before you commit.
What Is OpenCode
OpenCode is an open-source AI coding agent that runs primarily as a terminal application, sometimes described as a TUI, a text-based user interface. In practical terms it is a program you launch in your project directory and talk to in plain language: you describe a task, and the agent searches your codebase, edits files, runs commands, and works through multi-step changes, pausing for you to review.
It is released under the permissive MIT license, which means the code is open for anyone to read, fork, and self-host. Beyond the terminal, OpenCode also ships a desktop app (in beta) and an IDE extension, so the same agent can meet you where you already work. A defining design choice is that it is privacy-first: the project states it does not store your code or context data.
The distinction worth drawing is between an autocomplete plugin and an agent. Plenty of tools suggest the next line as you type. The answer to what is OpenCode is closer to the second idea: it is built around handing over a whole task. Because it supports the Model Context Protocol, it can connect to external tools and data sources through a shared open standard rather than one-off integrations. For where OpenCode sits among other developer AI tools, see the AI Tools Hub.
Who Maintains OpenCode
OpenCode is built and maintained by Anomaly, with development happening in the open on GitHub. Because it is an open-source project under the MIT license, the code, issue tracker, and release history are all public, which is a different transparency posture than a closed commercial editor where you see only the finished product.
The project reports community-scale adoption: roughly 175,000 GitHub stars and around 940 contributors, with the project citing on the order of millions of monthly developers. Treat these as vendor-reported figures, checked on June 16, 2026. Stars and contributor counts are useful signals of momentum and community interest, but they are not independent measurements of production usage or code quality, so read them as a popularity indicator rather than a benchmark.
One detail worth flagging for anyone already using another agent: OpenCode can read configuration files written for Claude Code, including the .claude directory, CLAUDE.md, and skills, unless you disable that behavior with the relevant environment variables. That makes it easier to try OpenCode without rebuilding your project conventions from scratch.
Core Features at a Glance
The terminal agent is the headline, but OpenCode is several connected pieces. Here is what each one does and why it matters in day-to-day work.
The terminal TUI
OpenCode runs as a text-based interface in your terminal. You can press Tab to switch agents, drag and drop images into the prompt, and step backward or forward through changes with /undo and /redo. Because it lives in the terminal, it fits naturally into existing shell, SSH, and remote-server workflows rather than asking you to move into a new editor.
Built-in and custom agents
OpenCode ships with three agents you switch between: build is the default with full access to edit and run; plan is read-only, useful when you want analysis without changes; and general works as a subagent. You can also define your own with opencode agent create to encode a team's preferred behavior.
LSP awareness and AGENTS.md
OpenCode is LSP-enabled: it auto-loads the relevant language servers, which is the same machinery your editor uses to understand types, definitions, and errors, so the agent works with real language intelligence rather than plain text. On first use it initializes an AGENTS.md file in the repository, a place to record project conventions the agent should follow.
Multiple sessions and MCP
You can run multiple sessions, continue or fork a session with --continue and --fork, and export or import sessions as JSON to share or resume work. OpenCode supports the Model Context Protocol through opencode mcp add and opencode mcp list, so it can connect to external tools and data sources over a shared open standard.
Install paths
The quickest install is a single curl script, but OpenCode is also available through npm, Bun, pnpm, and Yarn, Homebrew via the OpenCode tap, and Arch via paru. On Windows the recommended path is WSL, with Chocolatey, Scoop, Mise, and Docker also documented. The desktop app is in beta on macOS, Windows, and Linux. Confirm the current install options in the documentation, since package availability changes over time.
Providers and Models: Bring Your Own Key
OpenCode does not ship its own model. Instead it is bring-your-own-API-key: you connect the model provider you already use, and OpenCode routes requests to it. It uses the AI SDK together with Models.dev to reach more than 75 providers, alongside fully local models, so you are not locked to one vendor.
| Connection type | Examples (as of June 16, 2026) |
|---|---|
| Hosted API providers | Anthropic, OpenAI, DeepSeek, Google Vertex AI, Amazon Bedrock, Groq |
| Local models | Ollama, LM Studio, llama.cpp |
| Existing subscriptions | ChatGPT Plus / Pro, GitHub Copilot, GitLab Duo (linked at no extra cost) |
| OpenCode-curated | OpenCode Zen (tested coding models, pay-as-you-go); default helper model gpt-5-nano |
Two practical notes. First, you connect a provider either with /connect inside the TUI or opencode auth login, and your keys are stored locally (in ~/.local/share/opencode/auth.json), with configuration in opencode.json or ~/.config/opencode/opencode.jsonc. Second, because you can run local models through Ollama or LM Studio, it is possible to use OpenCode entirely offline against a model on your own machine. For a deeper look at choosing a provider, see OpenCode providers explained.
What OpenCode Costs
Cost is the part of what is OpenCode that trips people up most, because it works differently from a flat-fee editor. The OpenCode software is free and open source. There is no license fee and no subscription for the tool itself. What you pay for is the model: OpenCode is bring-your-own-key, so your only model cost is whatever your chosen LLM provider charges you directly. Connect a low-cost model and your bill is low; connect a frontier model and run it hard and your bill follows your usage.
- Open source, MIT licensed
- Terminal TUI, desktop beta, IDE extension
- You pay your model provider directly
- No flat subscription for the software
- 75+ providers via Models.dev
- Anthropic, OpenAI, DeepSeek, and more
- Or run local models at no API cost
- Cost tracks your own usage
- Curated, tested coding models
- Pay-as-you-go pricing
- Default helper model gpt-5-nano
- Use it only if you want a managed option
- Low-cost subscription option
- Alternative to per-token billing
- Optional, not required to use the tool
- Confirm current terms on the site
If you already pay for ChatGPT Plus or Pro, GitHub Copilot, or GitLab Duo, OpenCode lets you link those existing accounts at no extra cost, so you can reuse a subscription you are already paying for rather than buying new model access.
The cost model in one line: the software is free, but it is not the whole bill. Because OpenCode is bring-your-own-key, it has no inherent model cost; every token of model usage is billed by your provider. Do not expect a single flat monthly fee like a closed editor. If predictable cost matters, choose a fixed-price model option or run a local model, and check your provider's pricing before you run heavy workloads.
How OpenCode Handles Your Data
For anyone working on proprietary code, the question is simple: where does my code go? OpenCode's stated answer is that it is privacy-first and does not store your code or context data. Your provider keys are kept locally on your machine rather than on a central service.
It is worth being precise about the edge, though. "OpenCode does not store your code" is a claim about OpenCode itself. The moment you send a request to a hosted model provider, that provider's data and retention policies apply to whatever you send. If your compliance posture is strict, the cleanest path is to run a local model through Ollama or LM Studio, which keeps both the tool and the model on your own hardware. Otherwise, read the data policy of the specific provider you connect, because that is where your code actually travels.
Who OpenCode Is For
OpenCode fits a particular kind of developer well, and is a weaker fit for others. Here is how the main groups line up.
People who already live in the shell, work over SSH, or manage remote servers. A terminal-native agent slots into that workflow without pulling you into a separate editor window.
Best fit: strongDevelopers who already pay for an API or subscription and want to reuse it, or who want to switch models freely across 75+ providers rather than being tied to one vendor's model.
Best fit: strongTeams that need to keep code on their own hardware. Open-source code plus local models through Ollama or LM Studio make a fully on-machine setup possible.
Best fit: strong (with local models)Developers who prefer a polished graphical editor and one-click setup. The desktop app is still in beta, so the terminal remains the primary experience, which is a steeper start for some.
Consider: a GUI-first editorHonest Limitations
OpenCode is a capable tool, and the points below are not reasons to avoid it. They are reasons to use it with clear eyes.
The software costs nothing, but every model request is billed by your provider. A frontier model run hard across a large codebase can produce a real bill. This is the most common surprise with bring-your-own-key tools, so set a budget with your provider and watch your usage, especially early on.
If you are used to a graphical editor, a text-based terminal interface takes adjustment. The desktop app exists but is in beta, so for now the most complete experience is in the terminal. Factor in some ramp-up time.
OpenCode states it does not store your code, but once a request reaches a hosted model, that provider's retention policy governs it. The tool's privacy promise does not extend to third-party APIs. For strict requirements, run a local model rather than assuming the hosted route is private.
Star counts, contributor totals, and monthly-developer figures come from the project, not an independent audit. They signal momentum, not production quality or reliability. Treat any single number, including the ones in this article, as a snapshot to re-check rather than a guarantee.
Frequently Asked Questions
Go Deeper
Resources from across Tech Jacks Solutions
AI Tools Hub
Browse every AI tool we have reviewed, by vendor and use case
AI Glossary
Plain-language definitions for AI and developer terms used here
FREEAI Governance Charter
Set rules for AI coding tools before they scale across your team
EU AI Act Overview
How AI regulation frames code generation and developer tooling