opencode-cli
Use when working with OpenCode CLI commands, TUI interface, server mode, SDK client, ACP editor integration, GitHub Actions integration, Zen models, or installation/setup.
| Model | Source |
|---|---|
| sonnet | pack: opencode |
Overview
Section titled “Overview”OpenCode runs as a TUI (default), headless server, ACP agent, or GitHub bot. Go-based, client/server architecture, 75+ LLM providers. Current version: v1.2.10 (Feb 2026).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Full Reference
OpenCode CLI & Interfaces
Section titled “OpenCode CLI & Interfaces”Overview
Section titled “Overview”OpenCode runs as a TUI (default), headless server, ACP agent, or GitHub bot. Go-based, client/server architecture, 75+ LLM providers. Current version: v1.2.10 (Feb 2026).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Install | curl -fsSL https://opencode.ai/install | bash |
| Also via | npm, Homebrew, Scoop, Chocolatey, Pacman, Mise, Docker |
| Start TUI | opencode |
| Start server | opencode serve --port 4096 |
| Start web UI | opencode web |
| SDK package | npm install @opencode-ai/sdk |
| ACP command | opencode acp |
| GitHub bot trigger | /opencode or /oc in issue/PR comment |
| Zen model prefix | opencode/model-name |
| API docs | http://localhost:4096/doc |
| Upgrade | opencode upgrade |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CLI Commands
Section titled “CLI Commands”| Command | Purpose |
|---|---|
opencode (tui) | Interactive TUI — default |
opencode run | Non-interactive, exits after completion |
opencode serve | Headless HTTP server |
opencode web | Server + web interface |
opencode attach | Connect TUI to remote server |
opencode agent create|list | Manage agents |
opencode auth login|list|logout | Provider credentials |
opencode mcp add|list|auth|logout|debug | MCP server management |
opencode models [provider] | List available models |
opencode session list | Session management |
opencode stats | Token usage and costs |
opencode export [id] | Export session as JSON |
opencode import <file|url> | Import from JSON or share URL |
opencode github install|run | GitHub Actions setup |
opencode acp | Start ACP agent for editors |
opencode upgrade [target] | Update OpenCode |
opencode uninstall | Remove OpenCode |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Reference Index
Section titled “Reference Index”| Topic | File | What’s inside |
|---|---|---|
| Installation & upgrade | reference/installation.md | All package managers, Docker, Windows notes, uninstall flags |
| CLI commands & TUI | reference/commands.md | All commands with full flag tables, slash commands, keybindings, debugging |
| Server mode | reference/server-mode.md | Architecture, auth env vars, full API endpoint catalog |
| SDK | reference/sdk.md | Node.js setup, all client methods, structured output, Python SDK |
| ACP editor integration | reference/acp.md | Zed, JetBrains, Neovim configs, supported features, troubleshooting |
| GitHub Actions | reference/github.md | Triggers, manual setup, workflow YAML, usage patterns |
| Zen models | reference/zen.md | Pricing, model format, Black tier, when to use vs direct provider |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.
Announcement
Section titled “Announcement”┏━ 💻 opencode-cli ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ CLI commands, TUI, server mode, SDK, ACP, and GitHub Actions for OpenCode ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛