What OpenCode is

An open-source coding agent that runs in your terminal, reads and edits your files, runs commands, and stays model-agnostic.

An agent in the terminal

OpenCode is an open-source AI coding agent that runs as a terminal interface inside your project directory. It does not suggest the next line - it reads files, plans a change, edits several files at once, and runs shell commands such as your test suite.

  • Model-agnostic: point it at a hosted provider or at a local model server, and switch per project.
  • File-aware: it searches the repository itself instead of relying on whatever you paste into a chat box.
  • Action-capable: it can run builds, tests and git commands, and show you the resulting diff.
  • Configurable: project settings live in one JSON file, and standing rules live in a markdown file the agent reads every session.
{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "permission": {
    "edit": "ask",
    "bash": "ask"
  },
  "mcp": {
    "context7": { "type": "remote", "url": "https://mcp.context7.com/mcp" }
  }
}

Where it sits next to autocomplete

Tool shapeWhat you give itWhat you get backGood for
Inline autocompletea cursor positionthe next few linesBoilerplate you could already write
Chat panela file, a paste, a questionan explanation or a snippetQuestions, drafts, code review
Agent in the terminala task stated in your repositoryan edited working tree and a diffMulti-file changes, migrations, test fixes
💡
The important shift is that an agent changes files. Your safety net is therefore version control: commit before a large session and read the diff before you keep it.

FAQ

Is OpenCode tied to one model provider?
No. It is model-agnostic: you authenticate with whichever provider you prefer, and a local model server works too, which matters for private or offline code.
How is it different from inline completion?
Inline completion proposes text at a cursor. OpenCode is an agent: it plans and performs multi-step edits and command runs, then reports what it changed.

Install and first session Workflow tips and limits

Last refreshed 2026-09-18.