AgenticFrameworksMCPSkills

OpenCode Documentation — Open-Source AI Coding Agent

by Anomaly (SST)

IntermediateDocumentationFreeSelf-paced reference; ~2-3 hours to read the core docs and configure your first custom agent

The reference for running a provider-agnostic coding agent you configure, permission and extend yourself.

Start LearningAdded Sep 1, 2026 · Updated Sep 1, 2026

Overview

OpenCode is an open-source, provider-agnostic coding agent from Anomaly (the SST team), distributed as a terminal UI, a desktop app, an IDE extension, a web surface and a headless server. The documentation is organised as a reference rather than a tutorial: an Intro and install path (curl script, npm/bun/pnpm/yarn, Homebrew, Chocolatey/Scoop, Mise, Docker), usage surfaces (TUI, CLI, Web, IDE, GitHub and GitLab integrations, Share, and the curated OpenCode Zen provider tier), a large configuration section covering Tools, Rules, Agents, Models, Themes, Keybinds, Commands, Formatters, Permissions, Policies, LSP Servers, MCP servers, ACP support, Agent Skills, References and Custom Tools, and a development section covering the SDK, the server, plugins and the wider ecosystem. The agent model is the part worth studying closely: two built-in primary agents — build, with full tool access, and plan, which gates file edits and bash behind approval — plus three subagents (general, explore, scout), each definable in JSON config or a markdown file under ~/.config/opencode/agents/ or .opencode/agents/, with its own model, temperature, step budget, system prompt and per-tool permission map of allow, ask or deny, including glob-style bash rules such as "git *": "ask". Subagents run automatically or on an @mention. The underlying repository is MIT-licensed TypeScript with 202.9k GitHub stars and over 15,000 commits on its dev branch.

At a Glance

Topic
Agentic
Level
Intermediate
Format
Documentation
Cost
Free
Duration
Self-paced reference; ~2-3 hours to read the core docs and configure your first custom agent
Provider
Anomaly (SST)
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • Configure one coding agent across Anthropic, OpenAI, Google and local models
  • Define custom primary agents and subagents in JSON config or markdown files
  • Gate tool access with allow/ask/deny permissions, including glob-based bash command rules
  • Wire MCP servers and LSP servers into an agent's available tool surface
  • Extend the harness with Agent Skills and custom tools instead of forking it
  • Drive OpenCode headlessly through its server, SDK and plugin APIs for automation
  • Split work between a restricted plan agent and a full-access build agent

Highlights

  • Provider-agnostic by design: the docs treat Anthropic, OpenAI, Google, local runners and the paid Zen tier as interchangeable, unlike vendor-locked coding CLIs
  • 202.9k GitHub stars, MIT licence and 15,000+ commits — the documentation tracks a codebase that ships daily
  • Permissions and policies are first-class configuration, so you can read exactly what an agent may run before you let it run
  • Its Hacker News launch thread (1,274 points, 618 comments) is the most honest available review and is worth reading alongside the docs
  • Honest caveats from that thread: a very high release cadence that breaks things, a TypeScript TUI that can use ~1GB RAM against ~80MB for the Rust Codex CLI, and reports of session-title generation reaching the network even in local-only setups

Who It’s For

Best For

  • Engineers evaluating an open-source alternative to Claude Code or Codex CLI
  • Teams that must run coding agents against self-hosted or local models
  • Platform engineers writing agent permission policies for a shared repository
  • Developers building plugins, custom tools or MCP servers for a coding harness

Prerequisites

  • Comfort in a terminal and with a git-based development workflow
  • An API key for at least one model provider, or a local runner such as Ollama or LM Studio
  • Basic JSON configuration editing

FAQ

What is OpenCode Documentation — Open-Source AI Coding Agent?

The official documentation for OpenCode, an MIT-licensed open-source coding agent that runs as a terminal UI, desktop app, IDE extension or headless server and works against any model provider rather than a single vendor. Read it to configure custom primary agents and subagents, lock down tool permissions, attach MCP and LSP servers, and drive the agent from its SDK or plugin API instead of the interactive TUI.

Is OpenCode Documentation — Open-Source AI Coding Agent free?

OpenCode Documentation — Open-Source AI Coding Agent is free to access.

What level is OpenCode Documentation — Open-Source AI Coding Agent for?

OpenCode Documentation — Open-Source AI Coding Agent is aimed at a intermediate audience. Recommended background: Comfort in a terminal and with a git-based development workflow, An API key for at least one model provider, or a local runner such as Ollama or LM Studio, Basic JSON configuration editing.

How long does OpenCode Documentation — Open-Source AI Coding Agent take?

Expect roughly Self-paced reference; ~2-3 hours to read the core docs and configure your first custom agent. Most learners work through it at their own pace.

What will I learn from OpenCode Documentation — Open-Source AI Coding Agent?

You'll learn: Configure one coding agent across Anthropic, OpenAI, Google and local models; Define custom primary agents and subagents in JSON config or markdown files; Gate tool access with allow/ask/deny permissions, including glob-based bash command rules; Wire MCP servers and LSP servers into an agent's available tool surface; Extend the harness with Agent Skills and custom tools instead of forking it; Drive OpenCode headlessly through its server, SDK and plugin APIs for automation; Split work between a restricted plan agent and a full-access build agent.

Topics

coding agentsopencodeclimcpagent permissions

Sources

This page was written from 4 sources, 2 on domains other than opencode.ai.

  1. 1.opencode.aidocsvendor
  2. 2.opencode.aiagentsvendor
  3. 3.github.comopencode
  4. 4.news.ycombinator.comitem