Opencode_
Learn Compare Recipes Ecosystem Source Code Docs
GitHub
🇺🇸 English 🇨🇳 简体中文 🇯🇵 日本語 🇰🇷 한국어

Source Code Analysis

Deep dive into the architecture and core modules of OpenCode.

New here? Follow the bottom-up learning path — 8 chapters from foundation to interface.

Start the guided course →

Foundation

1

Config

→

Configuration management, layered strategy

Read →
2

Provider

→

Interface design, model routing, fallback strategy

Read →
3

Permission

→

Permission system, security model

Read →

Integration

4

MCP

→

Model Context Protocol, toolchain integration

Read →
5

LSP

→

Language Server Protocol integration, code intelligence

Read →

Core

6

Agent

→

Decision loop, tool calling, context management

Read →

Interface

7

Command

→

Slash command system, command registration

Read →
8

CLI

→

Command-line entry point, interaction loop

Read →
Opencode_

The Open Source AI Coding Agent.

$ npm i -g opencode

Project

GitHub Documentation Recipes

Community

Discord Twitter Blog

© 2026 Anomaly Co. Open Source (Apache 2.0).