📋 Table of Contents
- 1. What is OpenCode?
- 2. Four Installation Forms
- 3. Free Model Configuration
- 4. Core Feature Highlights
- 5. Skills Migration
- 6. MCP Configuration
- 7. Oh My Open Code (OMO) Super Plugin
- 8. Other Useful Features
- 9. Summary and Recommendations
- 10. Hands-on Record: Installing Oh My OpenAgent
- Appendix: Troubleshooting Notes
1. What is OpenCode?
OpenCode is currently the hottest AI programming tool, essentially an open-source version of Claude Code. It has replicated almost all core features of Claude Code while solving common pain points for Chinese users such as rate limiting and account bans.
Comparison with Claude Code
| Dimension | Claude Code | OpenCode |
|---|---|---|
| Open Source | ❌ Closed source | ✅ Open source |
| Free models | ❌ Paid API required | ✅ Built-in free models |
| China-friendly | ⚠️ Rate limit/ban risk | ✅ No restrictions |
| Skills/MCP | ✅ Supported | ✅ Fully compatible |
| Session parallelism | ❌ | ✅ Core highlight |
Core Positioning
- Open-source Claude Code: Nearly all features, China-friendly, no rate limits or bans
- Free models: Out-of-the-box GLM-4.7, MiniMax-2.1 and other free models, zero configuration needed
- Top-tier model integration: Free access to Gemini 3 Pro and Claude 4.5 Opus via Antigravity plugin; GPT Codex via
/connect - Killer features: Session parallelism, Timeline rollback, Share, Ultra Work multi-agent collaboration
- Plugin ecosystem: Oh My Open Code (OMO) with seven programming agents + three MCP Servers + various tools
2. Four Installation Forms
⭐ 1. Command Line Version (Primary Recommendation)
The most stable and feature-complete way to use it.
|
|
Prerequisite: Node.js must be installed (download from nodejs.org)
2. Desktop Client (Beta)
Download the client from the official website, install it, and select your project folder.
⚠️ Currently in Beta testing phase with more bugs — not recommended as your primary tool yet.
3. VS Code Plugin Version
Prerequisite: OpenCode CLI must be installed. The plugin’s core value lies in seamless IDE integration, letting AI directly perceive your code context.
- Search for OpenCode in the VS Code Extensions marketplace and install it
- Shortcut
Ctrl + Shift + P→ typeopen opencodeand press Enter - The plugin automatically associates with code files open in the left panel
- Select code and press
Ctrl + Alt + Kto quickly paste into the OpenCode chat window
4. Cloud Runtime Environment (GitHub Actions)
Perfect for automated Issue fixing in open-source projects:
- Upload your project to a public GitHub repository
- Configure API Key in the repository (Settings → Secrets and Variables → Actions)
- Type
/opencode+ requirement description in an Issue comment - GitHub Actions automatically runs the OpenCode workflow
- Automatically creates a Pull Request upon completion
3. Free Model Configuration
View Available Models
|
|
Recommended Free Models
| Model | Features |
|---|---|
| GLM-4.7 | Strong programming ability, zero configuration |
| MiniMax-2.1 | Excellent programming skills, fast response |
💡 These two free models are more than enough for beginners practicing AI programming.
Connect Top-tier Models
Method 1: Antigravity Plugin (Free Gemini + Claude Access)
Antigravity is Google’s AI programming IDE, generously providing Gemini 3 Pro and Claude 4.5 Opus for free.
- Paste the installation prompt in OpenCode (copy from the Antigravity GitHub homepage)
- Wait for AI to complete the installation automatically
- Open a new terminal and run the login command, select Google → Antigravity login
- Log in to your Google account, paste the generated URL
- Restart OpenCode — Gemini 3 Pro and Claude 4.5 Opus will appear in
/models
Method 2: GPT Codex (Official OpenAI Partnership)
OpenAI has officially partnered with OpenCode, enabling direct ChatGPT Codex integration.
|
|
Prerequisite: ChatGPT Plus subscription or higher required.
Method 3: OpenRouter (Universal Connector)
OpenRouter provides access to virtually every major model available, and Chinese users can easily obtain credits.
|
|
OpenCode supports 75 AI integration methods, covering almost all model providers.
4. Core Feature Highlights
1. Clarifying Questions Before Coding
Before starting to code, OpenCode will ask you a series of questions:
- Do you just need a code sample, or a complete runnable program?
- Which features are must-haves?
- Which model should be used?
- How should environment variables be stored?
This “ask first, act later” mechanism significantly reduces rework.
2. Command Line Code Diff Interface
OpenCode’s command line diff display is considered the best among all command line programming tools, making code changes clear at a glance.
⭐ 3. Session Parallel Processing
This is OpenCode’s most distinctive feature — multiple Sessions running in parallel:
|
|
The spinning symbol indicates a Session is running in the background. Two tasks can be developed in parallel without interfering with each other.
4. Timeline Checkpoint Rollback
|
|
Select any historical node:
- Revert: Roll back both code and chat content to that point in time
- View: See what modifications the AI made at that time
Like a “time machine” for programming, allowing you to boldly try different approaches.
5. Share
|
|
After sharing, a web link is generated displaying the complete conversation history and code modification process, convenient for collaboration or demonstration.
5. Skills Migration
OpenCode is fully compatible with Claude Code’s Skills directory structure, making migration extremely easy:
|
|
Steps
- Create a new
.opencodefolder in the project root directory - Create a
skillsfolder inside.opencode - Copy the skill folders from
.claude/skills/directly into it - Restart OpenCode — the AI will recognize and call these Skills
Each Skill is essentially an instruction manual with its own directory, telling the AI how to complete tasks in a specific domain.
6. MCP Configuration
OpenCode supports two MCP (Model Context Protocol) modes:
Local MCP
Executed via local commands. Configure in ~/.config/opencode/opencode.json:
|
|
Remote MCP
Called remotely via URL. Using Context7 as an example:
|
|
After configuration, restart OpenCode and enter /mcp to view configured MCP Servers.
7. Oh My Open Code (OMO) Super Plugin ⭐
OMO is the most popular programming plugin for OpenCode, essentially a bundled package of Tools + MCP + Programming Agents.
Seven Programming Agents
| Agent | Role | Recommended Model |
|---|---|---|
| 🧠 Sisyphus | Main agent, planning & orchestration | Claude 4.5 Opus / GPT 5.2 |
| 🔮 Prophet | Architecture design, code review | — |
| 📚 Librarian | Literature review, document retrieval | — |
| 🔍 Explorer | Web search | — |
| 🎨 Frontend Engineer | Frontend development | Gemini 3 Pro |
| 📝 Document Writer | Document generation | — |
| 🖼️ Multimodal | Image/PDF understanding | — |
Each agent is assigned the most suitable model for its work. The author reportedly spent $24,000 worth of Tokens to find the optimal combination.
Three MCP Servers
- Web Search: Web search
- Context7: Access latest technical documentation
- Grep App: Fast code search across GitHub repositories
Integrated Tools
- LSP Advanced: Helps AI quickly locate code through language syntax and semantics
- AST Tool: Related search through code syntax trees
- LOC Tool: Understand images and PDFs via multimodal vision
- Delegate Task / Background Task: Agent task assignment and background scheduling
Installation and Usage
Configuration file location: C:\Users\<username>\.config\opencode\oh-my-opencode.json
- Copy the
installprompt from the OMO GitHub homepage - Paste it into OpenCode and answer configuration questions (subscription status, etc.)
- Installation completes automatically
Two Core Usage Patterns
① @ Designate Specific Agent
|
|
② Ultra Work Mode (Magic Word ULW)
|
|
In Ultra Work mode, Sisyphus as the main agent will:
- Break down tasks into a Todo List
- Launch multiple background tasks running in parallel
- Orchestrate all agents from the center
- Deliver the complete project
Ralph Loop Mode
Forces AI to work in continuous loops, suitable for extremely difficult tasks:
|
|
Example: “Refactor the entire project using the latest Spring Boot 4 standards until all test cases pass” — can run for hours until the task is complete.
8. Other Useful Features
/init — Project Knowledge Initialization
Let AI read through the entire project folder, generating an agents.md file as a system prompt to help AI quickly understand the project.
/compact — Context Compression
Refine previous conversations into a concise summary, freeing up the model’s context window to avoid Token overflow.
Custom Commands
Create .md files under ~/.config/opencode/commands/ to define custom commands:
|
|
Usage: /Run Tests to trigger.
Custom Agents
Create .md files under ~/.config/opencode/agents/:
|
|
- Primary Agent: Switch with Tab key, use directly in conversation
- Sub Agent: Automatically dispatched by the main agent in the background
9. Summary and Recommendations
Use Cases
| Scenario | Rating | Notes |
|---|---|---|
| Beginner AI programming | ⭐⭐⭐⭐⭐ | Free models, zero-cost start |
| Daily development assistance | ⭐⭐⭐⭐⭐ | Session parallelism + Timeline rollback |
| Complex project development | ⭐⭐⭐⭐⭐ | OMO plugin multi-agent collaboration |
| Open-source project maintenance | ⭐⭐⭐⭐ | GitHub Actions cloud automation |
| Skills/MCP practice | ⭐⭐⭐⭐⭐ | Fully compatible with Claude Code ecosystem |
Recommended Configuration Path
|
|
OpenCode breaks down the high barriers of AI programming tools, allowing everyone to explore the infinite possibilities of AI-assisted programming at zero cost. Especially for Chinese users, there’s no longer any need to worry about rate limits and bans — you can “build freely, experiment freely.”
10. Hands-on Record: Installing Oh My OpenAgent
Below is the complete conversation record from personally installing Oh My OpenAgent (formerly Oh My Open Code), in a Windows + PowerShell environment.
Environment Check
|
|
Installation Process
Tell AI directly in an OpenCode conversation:
“Install and configure oh-my-openagent by following the instructions here: https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/refs/heads/dev/docs/guide/installation.md"
AI will first ask about your model subscriptions:
| Subscription | My Status |
|---|---|
| Claude Pro/Max | ❌ None |
| OpenAI / ChatGPT Plus | ❌ None |
| Gemini | ❌ None |
| GitHub Copilot | ✅ Student certified |
| OpenCode Zen | ✅ Free available |
| Z.ai Coding Plan | ❌ None |
| OpenCode Go | ❌ None |
| Kimi for Coding | ❌ None |
| Vercel AI Gateway | ❌ None |
⚠️ AI will prompt “Without a Claude subscription, the Sisyphus agent might not work ideally” — but GitHub Copilot will automatically take over as a fallback model.
After confirming subscriptions, AI automatically executes the installation command:
|
|
Successful installation output:
|
|
Post-Installation Configuration Files
Main configuration file ~/.config/opencode/opencode.json:
|
|
Agent model configuration ~/.config/opencode/oh-my-openagent.json:
AI automatically assigned models based on GitHub Copilot subscription:
| Agent | Assigned Model |
|---|---|
| Sisyphus (Main agent) | github-copilot/claude-opus-4.7 |
| Oracle (Prophet) | github-copilot/gpt-5.5 (medium) |
| Other Agents | Auto-selected from Copilot available models |
Authentication Configuration
After installation, you need to manually authenticate GitHub Copilot:
|
|
Interactive steps:
- Use arrow keys to select GitHub Copilot
- Press Enter to confirm
- Browser opens automatically, log in to your GitHub student account
- Authorization complete, terminal shows successful authentication
How to Reconfigure Agent Models?
Method 1: Tell AI Directly
“Change Sisyphus’s model to claude-sonnet-4.6” “Oracle use gpt-5.5”
Method 2: Manually Edit Configuration File
Directly modify the model field for the corresponding agent in ~/.config/opencode/oh-my-openagent.json.
Additional Configuration: Add OpenCode Zen as Fallback
The free OpenCode Zen was missed during installation (--opencode-zen=no). In a new OpenCode conversation, ask AI to fix it:
“I also have your free OpenCode Zen, but I’ve already logged into GitHub Copilot — help me modify it”
AI’s first attempt set OpenCode Zen as primary (opencode/claude-opus-4-7), making GitHub Copilot the fallback. The actual need was the opposite:
“No, GitHub Copilot should be primary, and OpenCode Zen’s built-in free model as fallback”
After AI corrected it, the final configuration strategy:
|
|
Key configuration snippet (using Sisyphus as example):
|
|
💡 Tip: When describing configuration needs, make the primary/secondary relationship clear — “XX as primary, YY as fallback” — to avoid AI getting it reversed.
Usage Tips
After installation, type opencode in the terminal to get started:
- Include
ultraworkorulwin your prompt to trigger automatic parallel processing - Press
Tabto enter Prometheus (planner) mode - Run
/start-workto execute full orchestration
Appendix: Troubleshooting Notes
| Issue | Solution |
|---|---|
doctor command timeout (30s) |
Some checks may hang; add --verbose to troubleshoot, or skip — it doesn’t affect usage |
PowerShell if syntax errors |
OpenCode’s bash commands need syntax conversion under PowerShell |
| Sisyphus performance drops with non-Claude models | This is a known limitation; experience is best with a Claude subscription |
| AI swaps primary/fallback models | State the primary/secondary relationship clearly: “XX as primary, YY as fallback” — don’t just say “add YY for me” |
📚 Sources: Tech Shrimp - OpenCode Detailed Guide, Oh My OpenAgent Installation Guide