OpenCode CLI Commands
Common OpenCode CLI commands and how Oh My OpenCode works with them
OpenCode is the open source AI coding agent that runs from the command line. Oh My OpenCode is a plugin that adds orchestration (agents, hooks, MCPs) on top. This page lists common OpenCode CLI commands and how they interact with Oh My OpenCode.
Essential Commands
opencode
Launch OpenCode in the current directory. Oh My OpenCode attaches automatically if installed. The default agent (Planner-Sisyphus) and hooks are available.
opencode init
Initialize OpenCode configuration. Creates or updates config. Oh My OpenCode config lives in oh-my-opencode.json (project: .opencode/oh-my-opencode.json, user: ~/.config/opencode/oh-my-opencode.json).
opencode --version
Print OpenCode version. Use OpenCode 1.0.133 or newer for Oh My OpenCode to work correctly.
opencode --agent <name>
Run with a specific agent. Oh My OpenCode provides agents like sisyphus (default), librarian, explore, oracle. See the agents page for details.
Oh My OpenCode Plugin Commands
Oh My OpenCode is installed as a plugin. After installation via bunx oh-my-opencode install or npm install -g oh-my-opencode, you still use the opencode CLI. The plugin augments OpenCode with agents, hooks, and MCPs—no separate CLI.
Where to Learn More
- Installation — Install OpenCode and Oh My OpenCode
- OpenCode Tutorial — Step-by-step from zero to first session
- Agents — Sisyphus, Librarian, Explore, Oracle
- Configuration — oh-my-opencode.json and options
- FAQ — Common questions about CLI and config