This repository contains the configuration for OpenCode, an open source AI coding agent.
OpenCode is a terminal-based AI coding assistant that provides intelligent code completion, analysis, and development workflows. This configuration is customized with specific providers, models, and keybindings.
- Small Model:
deepseek/deepseek-chat - ** Provider: MIMO:
- Model:
mimo-v2-flash - Context Limit: 262,144 tokens
- Output Limit: 65,536 tokens
- Model:
- Auto-update: Enabled
- Share Mode: Manual
- Theme: GitHub
- TUI:
- Scroll speed: 3
- Scroll acceleration: Enabled
- all-in-mcp: Enabled
- Command:
pipx run all-in-mcp - Environment:
APAPER: falseGITHUB_REPO_MCP: true
- Command:
Application
Ctrl+C, <leader>q- Exit app<leader>e- Open editor<leader>t- Theme list<leader>b- Toggle sidebar<leader>s- Status view
Sessions
<leader>n- New session<leader>l- Session list<leader>g- Session timeline<leader>x- Export session<leader>c- Compact session<leader>+right- Next child<leader>+left- Previous child
Messages
PageUp- Page upPageDown- Page downCtrl+U- Half page upCtrl+D- Half page downCtrl+G, Home- First messageCtrl+Alt+G, End- Last message<leader>y- Copy message<leader>u- Undo<leader>r- Redo<leader>h- Toggle conceal
Models & Agents
<leader>m- Model listF2- Cycle model forwardShift+F2- Cycle model backward<leader>a- Agent listTab- Cycle agent forwardShift+Tab- Cycle agent backward
Input
Ctrl+C- Clear inputCtrl+V- PasteEnter- SubmitShift+Enter, Ctrl+J- New lineUp/Down- History navigation
OpenCode loads configuration from multiple locations (merged together):
- Global:
~/.config/opencode/opencode.json - Project:
./opencode.json(in project root or nearest git directory) - Custom path:
OPENCODE_CONFIG=/path/to/config.json - Custom directory:
OPENCODE_CONFIG_DIR=/path/to/config-dir
-
Add more providers for model diversity:
- OpenAI for GPT models
- Anthropic for Claude models
- OpenRouter for access to many models
-
Create specialized agents:
- Code reviewer (read-only)
- Test writer
- Documentation writer
- Bug fixer
-
Add useful MCP servers:
- Context7 for documentation search
- GitHub for repository management
- Filesystem for file operations
-
Configure permissions for safety:
- Set
bashto"ask"for production environments - Use
"deny"for sensitive operations
- Set
-
Add custom commands:
/test- Run test suite/lint- Run linter/deploy- Deploy command
-
Use the Claude token counter:
- Run
python3 script/claude-token-counter.pyto analyze Claude conversation logs
- Run
-
Set up instructions:
- Add CONTRIBUTING.md
- Add coding standards
- Add project-specific guidelines
For complete documentation: