What Is OpenCode? The Open Source AI Coding Agent Explained

OpenCode is an open source AI coding agent for the terminal, desktop, and IDE. Here is what it does, how it installs, how AGENTS.md works, and when it makes sense over Claude Code.

March 28, 2026 · 2 min read

Short Answer

OpenCode is an open source AI coding agent. The official docs describe it as a coding agent that runs in your terminal, and is also available as a desktop app and IDE extension. It installs with a one-line script, can initialize projects with an AGENTS.md file, and supports multiple model providers rather than forcing a single vendor stack.

Open Source
Official product positioning
3
Surfaces: terminal, desktop, IDE
/init
Creates AGENTS.md
Multi-provider
Model strategy

Why this query matters

This search intent is not really pricing intent. It is category-definition intent. People want a practical answer to whether OpenCode is a real coding agent, what makes it different, and whether it is genuinely open source.

What OpenCode Is

OpenCode is Anomaly’s take on the AI coding agent. The official docs call it an open source AI coding agent. The official site adds the positioning more plainly: terminal-first, open source, and flexible about which models you use.

That matters because many coding tools blur together. Some are editor autocomplete. Some are cloud PR bots. Some are chat interfaces with a file picker bolted on. OpenCode is closer to the current terminal-agent class: you point it at a repository, initialize the project context, then ask it to plan, edit, explain, or undo work.

Terminal-native

The terminal interface is the primary workflow in the official docs, not an afterthought.

Desktop and IDE surfaces

OpenCode also ships a desktop app and IDE extension, so the terminal is not the only entry point.

Open source positioning

The docs and official site explicitly position OpenCode as open source rather than source-available or closed.

Provider-flexible

You can configure your own model providers instead of being locked to one foundation model vendor.

Project memory

The `/init` flow creates an AGENTS.md file so the agent can keep project-specific instructions.

Agent customization

The docs expose skills, agents, tools, plugins, and LSP support as first-class primitives.

How OpenCode Works

The core workflow is simple. You install OpenCode, connect a provider, move into a repo, runopencode, and initialize project context. After that, you either ask questions about the codebase or switch into a plan-first workflow before making edits.

Minimal OpenCode flow

curl -fsSL https://opencode.ai/install | bash

cd /path/to/project
opencode

/init

The docs also make a useful distinction between planning and building. The intended workflow is not “fire one vague prompt and hope.” It is closer to “ask for a plan, iterate on the plan, then approve implementation.”

Installation and Setup

OpenCode’s install surface is broad. The docs list the curl installer first, then Node-based installation, Bun, Homebrew, Arch packages, Windows package managers, Docker, and WSL guidance.

MethodCommand / GuidanceBest For
Curl installercurl -fsSL https://opencode.ai/install | bashFastest default path
npmnpm install -g opencode-aiNode-heavy environments
Bunbun install -g opencode-aiBun users
Homebrewbrew install anomalyco/tap/opencodemacOS/Linux package-manager workflows
WindowsWSL recommended; Chocolatey/Scoop also documentedWindows teams
Dockerghcr.io/anomalyco/opencodeEphemeral or containerized usage

Windows guidance is explicit

The official docs recommend WSL for the best Windows experience. That is a useful signal about the product’s center of gravity: OpenCode is clearly optimized around Unix-like development flows.

AGENTS.md, Skills, and Tools

One of the clearest tells that OpenCode belongs in the modern coding-agent category is the/init behavior. The docs say OpenCode analyzes your project and creates anAGENTS.md file in the repo root, and explicitly recommend committing it.

OpenCode’s docs also document skills that can be discovered from.opencode/skills, .claude/skills, and .agents/skills. That compatibility layer matters if your team already uses Claude-compatible or agent-compatible repository conventions.

OpenCode skills discovery paths from the official docs

Project config: .opencode/skills/<name>/SKILL.md
Global config: ~/.config/opencode/skills/<name>/SKILL.md
Project Claude-compatible: .claude/skills/<name>/SKILL.md
Global Claude-compatible: ~/.claude/skills/<name>/SKILL.md
Project agent-compatible: .agents/skills/<name>/SKILL.md
Global agent-compatible: ~/.agents/skills/<name>/SKILL.md

That is a practical detail, not marketing fluff. It means OpenCode is designed to fit into the same repository instruction ecosystem many teams already use for Claude Code and agent frameworks.

OpenCode vs Claude Code

The overlap is real: both are coding agents, both are terminal-friendly, and both rely on persistent project instructions. But the product posture is different.

Decision AreaOpenCodeClaude Code
Licensing postureOpen source positioningPublic repo, but commercial terms
Provider modelMulti-provider by designAnthropic-first, with third-party provider support
Project instruction fileAGENTS.mdCLAUDE.md
Primary workflowTerminal-first with desktop and IDE optionsTerminal, IDE, desktop, web
Best fitTeams that want openness and provider flexibilityTeams that want first-party Claude integration

If you already know you want Anthropic’s ecosystem, start with Claude Code. If you care more about open source posture, provider flexibility, and a terminal agent you can shape more aggressively, OpenCode is the more interesting object.

Who Should Use OpenCode

OpenCode makes the most sense if you fit one of three profiles:

  • You want an open source coding agent, not just a hosted assistant.
  • You want provider choice instead of committing to one model vendor.
  • You already work from the terminal and want the agent to meet you there.

It is less compelling if what you want is a first-party Anthropic workflow with the least integration thinking required. In that case, the smoother path is still Claude Code.

FAQ

Is OpenCode a real coding agent or just a chat wrapper?

It is a real coding agent. The official docs describe planning, building, project initialization, undo and redo commands, provider configuration, and agent customization features.

Does OpenCode only run in the terminal?

No. The official docs say it is available in the terminal, desktop app, and IDE extension.

What file does OpenCode use for project memory?

AGENTS.md. The docs recommend committing it so OpenCode can understand project structure and coding patterns.

Can OpenCode use Bun?

Yes. The official installation docs include bun install -g opencode-ai.

Need the apply layer behind your coding agent?

Open source agents still need deterministic file merging. Morph Fast Apply turns lazy model edits into real merged files at 10,500+ tokens per second.