OpenCode Documentation
Community-maintained documentation for OpenCode, the open-source coding agent. Install the tool, connect a model, and configure MCP, permissions, and project rules. For the official project and downloads, visit opencode.ai (opens in a new tab) or GitHub (opens in a new tab).
Quick Start
Free Download
OpenCode is completely open source and free. You can install it via:
# 使用 Homebrew(macOS / Linux)
brew install anomalyco/tap/opencode
# 使用 npm
npm install -g opencode-ai
Costs and data handling
OpenCode is open-source software you can install for free. Model providers may charge per token or require a subscription; free model availability and limits can change. With a cloud model, prompts and relevant code context are sent to the selected provider. Check that provider’s data policy.
Resolve a setup problem
- Model connection checklist: authentication, timeouts, model availability, and rate limits.
- Windows / WSL setup: platform-specific installation steps.
- Proxy and certificates: connect from a restricted network.
- Project rules and permissions: control how the agent works.
Popular guides:
- Best AI for coding in 2026 — 9 agents ranked
- OpenCode vs Claude Code — the full comparison
- OpenCode vs Cursor — terminal agent or AI IDE?
- Claude models in OpenCode — Opus 5, Fable 5 & Sonnet 5 compared
- How to use Claude Fable 5 in OpenCode — plus Sonnet 5 & GPT-5.6
- All OpenCode guides
Documentation
Getting Started
- Introduction - OpenCode Overview
- Configuration - Basic Configuration
- Provider Setup - Configure AI Providers
- Network Settings - Proxy and Network Configuration
Usage
- TUI Interface - Interactive Terminal UI
- CLI Commands - Command Line Tool
- IDE Integration - Editor Integration
Advanced
- Custom Tools - Extend Functionality
- Agent Skills - AI Agent Capabilities
- MCP Servers - Model Context Protocol
This is a community-maintained documentation site, not official. For official documentation, visit opencode.ai (opens in a new tab)