Master OpenCode and Oh My OpenCode: The Ultimate Open‑Source AI Coding Assistant Guide
This guide walks you through installing and configuring OpenCode—a free, open‑source AI programming assistant supporting 75+ LLM providers—and its Oh My OpenCode plugin suite that adds specialized parallel agents, automatic model switching, and rich CLI commands, showing how they transform real‑world development workflows.
What Is OpenCode?
OpenCode is an open‑source AI programming assistant that offers three usage modes: a native terminal UI (TUI) with themable themes, a standalone desktop application, and IDE extensions for VS Code, JetBrains, and other editors.
Native TUI : responsive terminal UI with theme customization.
Desktop App : graphical interface for quick access.
IDE Extension : integrates with popular IDEs via LSP.
Key features include native TUI, LSP auto‑loading, multi‑session parallelism, shareable session links, support for 75+ LLM providers (including Anthropic, OpenAI, Google, Alibaba, and Zhipu), and a completely free, open‑source license.
Why Choose OpenCode?
OpenCode’s advantages are:
Open‑source & free : no paid subscription required for core features.
Broad model compatibility : works with dozens of providers.
IDE‑agnostic : flexible integration with any editor.
Existing subscriptions : can reuse Claude Pro, ChatGPT Plus, etc.
Installation & Configuration
macOS / Linux : curl -fsSL https://opencode.ai/install | bash Windows (Chocolatey) :
# Using Chocolatey
choco install opencodeWindows (Scoop) :
scoop bucket add extras
scoop install extras/opencodenpm (and alternatives) :
npm install -g opencode-ai
pnpm install -g opencode-ai
bun install -g opencode-ai
yarn global add opencode-aiAfter installation, run opencode to start the program.
Oh My OpenCode – The Plugin Suite
Oh My OpenCode extends OpenCode with seven specialized sub‑agents that mimic a real development team. The agents and their roles are:
Sisyphus – main coordinator that parses tasks and distributes work.
Oracle – architect for design, code review, and strategy.
Librarian – researcher for documentation, code lookup, and examples.
Explore – fast code‑base explorer and pattern matcher.
Frontend UI/UX Engineer – handles UI/UX implementation.
Document Writer – generates README, API docs, and guides.
Multimodal Looker – analyses PDFs, images, and charts.
The workflow is fully automated:
用户输入任务
↓
Sisyphus(主协调器)解析任务并制定执行计划
↓
Sisyphus 将任务分派给相应的专业子智能体
↓
子智能体在后台并行执行各自任务
↓
Sisyphus 汇总各子智能体的输出
↓
生成最终结果Users only need to type a prompt; the system decides which agents to invoke and which model to use.
Key Commands
/init– scans the project, analyses the tech stack, and creates AGENTS.md. /models – switches the active model. /new – starts a new session. /session – lists current sessions (Ctrl +D to delete). /share – shares a session link. /undo – undoes the last change. /exit – quits OpenCode.
Activating Full Features
Include the keyword ultrawork (or its short form ulw) in your prompt to enable all Oh My OpenCode capabilities, e.g.:
# Full activation
"帮我分析这个项目的架构,ultrawork"
# Short form
"重构这个模块,ulw"Direct Agent Calls
Use the @ symbol to call a specific agent, for example:
# Call the architect
"@oracle 审核这个设计并提出架构方案"
# Call the researcher
"@librarian 说明这是如何实现的——为什么行为总在变化?"
# Call the explorer
"@explore 查询这个功能的策略"Automatic Model Switching
When an agent is invoked, OpenCode automatically switches to the model configured for that agent. Example workflow:
User inputs: "帮我分析架构,ultrawork" Sisyphus parses and plans.
Sisyphus calls @oracle.
The system switches to the model assigned to oracle (e.g., grok-code).
Oracle executes and returns results.
Sisyphus aggregates and outputs the final answer.
Configuration Examples
Agent‑to‑model mapping (JSON):
{
"agents": {
"Sisyphus": {"model": "opencode/glm-4.7-free"},
"oracle": {"model": "opencode/glm-4.7-free"},
"explore": {"model": "google/gemini-3-flash"}
}
}Ralph Loop (continuous work mode) configuration:
{
"ralph_loop": {
"enabled": true,
"default_max_iterations": 100
}
}Background concurrency control (JSON):
{
"background_task": {
"defaultConcurrency": 5,
"providerConcurrency": {
"anthropic": 3,
"google": 5,
"opencode": 5,
"iflowcn": 8
},
"modelConcurrency": {
"opencode/glm-4.7-free": 8,
"google/gemini-3-flash": 5,
"iflowcn/glm-4.6": 10
}
}
}Model Performance Comparison
Grok‑code : ★★★★★ reasoning, ★★★ speed, free – best for complex tasks and architecture design.
GLM‑4.7 : ★★★★ reasoning, ★★★★ speed, free – good for code understanding and documentation.
Big Pickle : ★★★ reasoning, ★★★★★ speed, free – suited for quick exploration and simple tasks.
MiniMax M2.1 : ★★★ reasoning, ★★★★★ speed, free – excels at fast‑response tasks.
Customizing Agents
Edit ~/.config/opencode/oh-my-opencode.json to change models or add new agents. Example snippet:
{
"agents": {
"Sisyphus": {"model": "opencode/grok-code"},
"oracle": {"model": "opencode/grok-code"},
"librarian":{"model": "opencode/grok-code"},
"explore": {"model": "opencode/minimax-m2.1-free"},
"frontend": {"model": "opencode/glm-4.7-free"},
"document_writer": {"model": "opencode/glm-4.7-free"},
"multimodal": {"model": "opencode/grok-code"}
}
}Summary & Outlook
Claude Code is powerful but limited for Chinese users; OpenCode fills that gap with an open, free alternative that supports the same commands, agents, skills, MCP, and hooks, making migration easy.
While still maturing, OpenCode already offers multiple free models (GLM‑4.7, MiniMax M2.1, Grok) and a highly extensible architecture, lowering the entry barrier for developers who want to experiment and customize their AI‑assisted workflow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
