OpenCode is an open-source, terminal-based AI coding assistant in the same family as Claude Code and Gemini CLI. It lets you talk to LLMs right in your terminal to write, debug, and refactor code.
Unlike traditional IDE plugins, OpenCode lives in the terminal, which makes it a natural fit for servers and remote development. It also plugs into a wide range of model providers, so you’re free to pick whatever AI model suits you best.
This guide takes you from a clean machine to a working OpenCode setup: installing and configuring it, getting familiar with everyday usage and common commands, and then introducing advanced plugins like oh-my-openagent to unlock the full potential of AI-assisted coding.
Pick the “Starter Poké Ball” plan and enter the promo code 耿鬼 (it’s free — 0 CNY)
Download the proxy client as the page instructs, then click “Import Subscription”
Once downloaded, open the proxy client, switch the mode to “Rule-based Proxy”, and turn the proxy on
Open your browser and visit Google — if it loads, the proxy is working
To use the proxy in a terminal: open the proxy client’s settings, find the “Copy Environment Variables” option, switch to the PowerShell flavor, and paste the copied text into your PowerShell terminal. Any downloads you run in that terminal will go through the proxy
macOS: choose the bash or zsh terminal type and paste into Terminal
Windows (under WSL): choose the bash terminal type and paste into your WSL terminal
Tip: every new terminal window needs the environment variables pasted again before the proxy takes effect.
VS Code (best option — IntelliSense + schema autocompletion)
Terminal window
1
code~/.config/opencode/opencode.jsonc
Prerequisite: VS Code installed inside WSL, or VS Code on Windows with the Remote-WSL extension
Vim
Terminal window
1
vim~/.config/opencode/opencode.jsonc
Edit directly from Windows Explorer (no need to enter WSL)
Type \\wsl$\Ubuntu\home\<your-wsl-username>\.config\opencode in the address bar (replace Ubuntu with your distro name, e.g. Ubuntu-22.04), then open opencode.jsonc with Notepad or Notepad++
gpt-latest points to the newest GPT model — currently GPT-5.4
gpt-codex-latest points to the newest GPT Codex model — currently GPT-5.3-codex
The token in parentheses after each model name is its reasoning effort level, one of low, medium, high, or xhigh. Higher levels are more capable, but burn more tokens and respond more slowly
oh-my-openagent (OMO for short, formerly oh-my-opencode) is the most popular multi-agent plugin in the OpenCode ecosystem. It upgrades OpenCode from a single AI assistant into a highly autonomous AI team: a Sisyphus master coordinator dispatches specialist sub-agents working in parallel, automating complex software engineering tasks to the point where you can hand off a task, go grab a coffee, and come back to it done.
The flagship execution mode. Type ulw + a task description and every agent activates at once — planning, executing in parallel, and self-correcting, running continuously until the task is done with no manual intervention.
Ralph Loop (/ulw-loop)
A self-referential execution loop that pairs with Ultra Work. The agent keeps iterating until the goal is fully met — ideal for complex tasks that need multiple rounds of edits and verification.
Deep Initialization (/init-deep)
Automatically generates a hierarchy of AGENTS.md files across your project tree, giving every agent layered, scoped context — saving tokens while improving each agent’s understanding of the project.
Planning Mode (/start-work)
An interview-style planning flow driven by the Prometheus agent. Before writing any code, it asks you questions, clarifies requirements, and nails down scope like a real engineer would, then produces a detailed execution plan.
Analyzes what the user actually means before classifying or executing an action, guarding against literal misreadings of a prompt.
Hashline (hash-anchored edits)
Every line the agent reads gets tagged with a content hash (e.g. 11#VK|); edits reference these tags, and any change with a mismatched hash is rejected outright — preventing file corruption at the source. Per the official report, edit success rate went from 6.7% to 68.3%.
Todo Enforcer
Automatically pulls agents back on track when they drift, ensuring the current task never gets dropped or forgotten.
Comment Checker
Blocks low-quality AI-generated comments, keeping code comments professional and readable.
AST-Grep: pattern-aware search and rewrite across 25 languages
Built-in MCP Services
Exa — web search
Context7 — official documentation lookup
Grep.app — GitHub code search
Skill-Embedded MCPs
Each skill can carry its own MCP servers, spun up on demand and torn down after use so they never eat into your context window. Built-in skills include playwright (browser automation), git-master (atomic commits / rebases), and frontend-ui-ux (design-first UI development).
Tmux Integration
Full interactive terminal support — run REPLs, debuggers, and TUI apps inside agent sessions.
Smart Model Routing
Automatically picks the best model for the task type (e.g. Claude for planning, GPT Codex for coding), routing by category rather than by specific model to stay efficient while saving tokens.
Full Claude Code Compatibility
Existing Hooks, Commands, Skills, MCPs, and plugins all work as-is, no changes needed.
oh-my-openagent ships with official GPT, Claude, and Gemini models configured by default. Since we’re using the CPA provider, the config file needs a manual edit.
Open the oh-my-opencode config:
macOS:
Terminal window
1
code~/.config/opencode/oh-my-opencode.json
Windows (under WSL):
Terminal window
1
code~/.config/opencode/oh-my-opencode.json
You can substitute nano or vim for code — see section 4 above for editing options.
Note: this config assigns the two available models based on each agent’s and category’s role. Roles needing deep reasoning (planning, architecture, review) get gpt-latest + xhigh; deep-coding roles get gpt-codex-latest + xhigh; lightweight search and quick tasks get gpt-codex-latest + high (cheaper); general coordination and execution roles get gpt-latest + high.
Code and doc search, explaining existing code, writing documentation
explore
Fast codebase scout
Lightweight, fast models
Rapid scans and greps to locate change points and gather contextual evidence
multimodal-looker
Multimodal / visual analyst
Multimodal models
Handles images, UI mockups, and screenshots, turning them into code or suggestions
metis
Pre-planning analyst
High-reasoning models
Works with Prometheus to surface risks, edge cases, dependencies, and trade-offs
momus
Harsh reviewer / quality critic
High-reasoning models
Reviews code and plans, hunting bugs, security issues, and performance problems
atlas
Execution maestro / deployer
General models
Final integration, deployment, environment setup, production-readiness checks
Note: the “Recommended Model” column reflects the official ideal configuration. Since we’re on the CPA provider only, the actual config above uses cpa/gpt-latest throughout.
MCP (Model Context Protocol) is a standardized protocol that lets AI models reach external tools and data sources. With MCP configured, OpenCode can connect to local scripts, remote knowledge bases, or specialized services for extra capabilities.
Add an mcp field to your config file (macOS: ~/.config/opencode/opencode.jsonc, Windows: %USERPROFILE%\.config\opencode\opencode.jsonc). OpenCode supports two kinds of MCP services:
Remote: connects to a remote HTTP/HTTPS endpoint, nothing to install locally
Local: runs a local command or script as the MCP service
Skills are OpenCode’s plugin system for capabilities. Each skill bundles domain-specific instructions, embedded MCP services, and preset permissions, and activates automatically in relevant situations once installed — no manual invocation needed.
Scope: frontend projects only. This skill is built for frontend UI/UX work and doesn’t apply to backends, CLI tools, data processing, or anything without a UI. Skip it if your project has no interface work.
ui-ux-pro-max is a design-intelligence skill for frontend developers. Describe a UI need to the AI and it generates a complete design system first (colors, typography, layout, style, anti-pattern checks), then produces high-quality code built on that system.
Core Capabilities
Design system generator: describe the project in natural language and get a full design system — layout patterns, visual style, color schemes, font pairings, effect suggestions, and an anti-pattern checklist
161 industry reasoning rules: covering SaaS, fintech, e-commerce, healthcare, restaurants, gaming, Web3, and more; each rule includes recommended layouts, style priorities, color tones, and typography advice
67 UI styles: Glassmorphism, Neumorphism, Brutalism, Bento Grid, Liquid Glass, Cyberpunk UI, Aurora UI, and other mainstream and cutting-edge looks
57 curated font pairings: with Google Fonts links, ready to use
161 color schemes: matched to product type for industry-appropriate palettes
25 chart types: for dashboards and data analysis
Supported Tech Stacks
Category
Frameworks
Web (default)
HTML + Tailwind CSS
React ecosystem
React, Next.js, shadcn/ui
Vue ecosystem
Vue, Nuxt.js, Nuxt UI
Other web
Svelte, Astro
iOS
SwiftUI
Android
Jetpack Compose
Cross-platform
React Native, Flutter
Installation
Prerequisite: Python 3.x
Terminal window
1
# Install the CLI
2
npminstall-guipro-cli
3
4
# Initialize inside your project (select opencode as the AI tool)
5
cd/path/to/your/project
6
uiproinit--aiopencode
Usage
Nothing to do after installing. When you make a UI/UX-flavored request in OpenCode (anything like build, design, create, implement, review, fix, improve), the skill kicks in automatically and runs this flow:
Analyzes your request and matches it to a product type and industry rules
Generates the full design system (colors, fonts, layout, style)
Produces code based on that system, keeping colors, spacing, and best practices consistent
Checks for common anti-patterns before delivery
Tip: name your stack in the prompt (e.g. “with Next.js + shadcn/ui”) for more precise output. Without one, it defaults to HTML + Tailwind CSS.