| marp | true |
|---|---|
| theme | tessl-cheatsheet |
| paginate | false |
| size | 1400px 1200px |
curl -fsSL https://opencode.ai/install | bash
opencodeAlso: brew install opencode or npm i -g opencode-ai
| Command | Description |
|---|---|
opencode |
Start interactive TUI |
opencode -p "prompt" |
Non-interactive mode |
opencode -p "..." -q |
Quiet mode (scripting) |
opencode auth |
Manage credentials |
opencode models |
List available models |
opencode update |
Update to latest |
opencode agent new # Create custom agent
opencode agent list # List all agents
opencode mcp add # Add MCP server
opencode mcp list # List MCP servers| Agent | Description |
|---|---|
| build | Full dev agent (read/write/exec) |
| plan | Analysis & exploration (read-only) |
| @general | Complex multi-step subagent |
Switch agents with Tab in TUI.
| Key | Action |
|---|---|
Tab |
Switch agent |
Enter |
Send message |
Ctrl+C |
Cancel/interrupt |
Esc |
Exit menu |
Ctrl+L |
Clear screen |
Config: ~/.opencode/config.json
Project: .opencode/ folder or OPENCODE.md
# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI
export OPENAI_API_KEY="sk-..."
# Google
export GOOGLE_API_KEY="..."Supports: OpenAI, Anthropic, Google, AWS Bedrock, Groq, Azure, OpenRouter
opencode github # Run GitHub agent for CIFor automated PR reviews and issue triage.
- Interactive TUI (Bubble Tea)
- Multi-provider support
- Vim-like editor bindings
- Session persistence (SQLite)
- LSP integration
- MCP server support
- Use plan agent for exploration first
- Switch to build agent to implement
- Use
-qflag for scripting - Use
@generalfor complex searches
Tessl · OpenCode Cheat Sheet · __VERSION__