Skip to content

Menu

OpenCode logo

OpenCode

Published

AI Coding

At a glance

What it is
OpenCode is an open-source AI coding agent that works in your terminal, as a desktop app, as an IDE extension and on the web.
Price from
Open source, usage-based pricing Details
Best for
Developers who want an open-source alternative to Claude Code or Codex CLI; People who want to switch freely between model providers
Official site
opencode.ai
Last checked
November 2026
Watch out for
Version 1 and version 2 share a command name, which can cause confusion when installing.

OpenCode is an open-source AI coding agent that works in your terminal, as a desktop app, as an IDE extension and on the web. It is one of the most popular open-source developer tools of the moment, with about 225,000 stars and 950 contributors on GitHub, and the project credits the company Anomaly. The code is released under the MIT licence.

The main draw is that OpenCode is not tied to one AI company. It supports more than 75 language model providers through Models.dev, including OpenAI, Anthropic and xAI, as well as local models, and you can sign in with an existing GitHub Copilot or ChatGPT Plus or Pro subscription to use the models you already pay for. It also offers some free models that need no account, though its docs warn that some providers of free models may retain your data or use it for training, and you can switch those off.

Day to day, it feels much like other terminal agents. You add a provider with /connect, run /init to create an AGENTS.md file describing your project, and switch with the Tab key between Build mode, which edits files, and Plan mode, which only suggests how it would make a change. Typing @ fuzzy-searches files, you can drop images into the terminal, and /undo and /redo revert or reapply changes. The docs also cover LSP servers, MCP servers and GitHub and GitLab integration. One thing to watch: OpenCode 1 and OpenCode 2 both install as the opencode command and some package managers default to different versions, so check which one you have before following a guide.

Key features

Terminal, desktop, IDE and web
The same open-source agent across four interfaces.
Any model provider
75+ providers through Models.dev, local models, and GitHub Copilot or ChatGPT sign-in.
Build and Plan modes
Switch with Tab between making changes and only proposing them.
Project context
/init creates an AGENTS.md file; @ searches files; images can be dropped in.
Undo and redo
Revert or reapply the agent's changes.
Optional paid models
A pay-as-you-go console with curated, tested models and team budgets.

Pricing

As of November 2026, OpenCode itself is free and open source under the MIT licence; you pay your chosen model provider, use an existing Copilot or ChatGPT subscription, or use the free models offered for a limited time. Its optional console charges per request at listed per-token prices, for example $2 per million input tokens and $10 per million output tokens for Claude Sonnet 5, with a processing fee of 4.6 percent plus $0.31 on each credit purchase and no other markup stated. A subscription called OpenCode Go with included usage is also offered; its price is on a separate page.

Best for

  • Developers who want an open-source alternative to Claude Code or Codex CLI
  • People who want to switch freely between model providers
  • Users who already pay for GitHub Copilot or ChatGPT and want a terminal agent
  • Privacy-conscious developers running local models

Limitations

  • Version 1 and version 2 share a command name, which can cause confusion when installing.
  • Quality depends heavily on which model you connect.
  • Some free models may retain or train on your data.
  • Windows users are advised to run it through WSL.

Verdict

OpenCode is the leading open-source terminal coding agent, and its provider flexibility is unmatched. If you want Claude Code-style workflows without being tied to one model company, it is the first thing to try. Pick your model deliberately, and avoid free models for sensitive code.

Sources

Written from the vendor's own site and documentation, checked November 2026. We have no paid relationship that affects what this page says.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…