Files
opencode-config/README.md
T
chaos ab7c909dc8 Add USAGE.md: per-plugin and per-MCP usage guide
Documents what each of the 8 plugins and 14 MCP servers does, how to use it
(auto vs slash commands/tools), and prerequisites. Links it from the README
and adds enable/disable instructions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 23:13:23 +08:00

4.0 KiB

Opencode Config Sync

Cross-machine synchronization for opencode AI configuration.

One-Click Install

Windows (PowerShell)

iwr -useb https://git.nomsg.cn/chaos/opencode-config/raw/branch/master/install.ps1 | iex

Or manually:

git clone https://git.nomsg.cn/chaos/opencode-config.git $env:USERPROFILE\opencode-config
cd $env:USERPROFILE\opencode-config
.\install.ps1

macOS / Linux

curl -fsSL https://git.nomsg.cn/chaos/opencode-config/raw/branch/master/install.sh | bash

Or manually:

git clone https://git.nomsg.cn/chaos/opencode-config.git ~/.config/opencode-config
cd ~/.config/opencode-config
chmod +x install.sh
./install.sh

Prerequisites

  • Node.js & npm
  • Python 3 (for git MCP)
  • Git
  • opencode CLI installed

Environment Variables

Set these before running install, or the script will prompt you:

Variable Description Required
OPENCODE_API_KEY Your AI provider API key Yes
BRAVE_API_KEY Brave Search API key No (brave-search MCP will be disabled if not set)
PROJECTS_PATH Path to your projects directory No (defaults: Windows=D:\Projects, Unix=~/projects)

Setting Env Vars (Windows)

[Environment]::SetEnvironmentVariable("OPENCODE_API_KEY", "sk-...", "User")
[Environment]::SetEnvironmentVariable("BRAVE_API_KEY", "BSA...", "User")

Setting Env Vars (Unix)

echo 'export OPENCODE_API_KEY=sk-...' >> ~/.bashrc
echo 'export BRAVE_API_KEY=BSA...' >> ~/.bashrc

What's Synced

  • 8 Plugins - oh-my-openagent, opencode-mem, opencode-pty, dynamic context pruning, command-inject, notify, agent-identity, tokenscope
  • 32 Skills - Coding standards, frontend/backend patterns, security review, etc.
  • 3 Agents - explorer, reviewer, docs-researcher
  • 14 MCP Servers - codegraph, brave-search, playwright, github, context7, exa, etc.
  • Model Config - Kimi K2.6 + 14 other models via @ai-sdk/openai-compatible

Usage

See USAGE.md for what every plugin and MCP server does, how to use it, and its prerequisites — plus how to enable/disable each one.

Updating

cd ~/opencode-config
git pull
# Re-run install if templates changed
./install.ps1  # or ./install.sh

Security Notes

  • API keys are never committed to git
  • opencode.json is generated locally from template
  • Use a private GitHub repository

Troubleshooting

MCP not loading?

  • Restart opencode after install
  • Check opencode.json syntax with python -m json.tool ~/.config/opencode/opencode.json

CodeGraph not working?

  • Run npm install -g @colbymchenry/codegraph on new machine
  • Run codegraph init in your project directory

Git MCP fails?

  • Install Python package: pip install mcp-server-git

opencode hangs on startup (no output)?

  • The opencode-rag-plugin was removed because its startup probes a local embedding backend (Ollama on localhost:11434 by default) with no timeout — if Ollama isn't running, opencode hangs after loading plugins.
  • To re-enable it, first start a backend (ollama serve + ollama pull embeddinggemma, or configure an OpenAI/Cohere embedding key), then add "opencode-rag-plugin" back to the plugin array in opencode.json.template.
  • Diagnose plugin hangs with opencode run --pure "ok" (runs without external plugins).

Structure

opencode-config/
├── opencode.json.template    # Config template with placeholders
├── USAGE.md                  # Per-plugin & per-MCP usage guide
├── agents/                   # Agent definitions
│   ├── explorer.md
│   ├── reviewer.md
│   └── docs-researcher.md
├── skills/                   # 32 reusable skills
│   ├── coding-standards/
│   ├── frontend-patterns/
│   └── ...
├── install.ps1              # Windows installer
├── install.sh               # macOS/Linux installer
├── README.md
└── USAGE.md