Skip to main content

OpenCode

Connect OpenCode to ShuYou and access Claude, GPT, and Gemini models from one terminal UI.

Prerequisites

  1. A modern terminal (Windows Terminal, iTerm2, etc.).
  2. A ShuYou API key from the console.

Step 1: Install OpenCode

Or: brew install anomalyco/tap/opencode

Step 2: Configure ShuYou

Register a custom provider:
  1. Select other in the provider list.
  2. Provider ID: shuyou-anthropic (repeat for shuyou-openai / shuyou-google if needed).
  3. Token: any placeholder (the real key goes in opencode.json).
Edit ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json):
Replace YOUR_SHUYOU_API_KEY and add model slugs from the ShuYou model catalog.

Step 3: Verify

In the TUI, run /models and select a ShuYou provider model.

FAQ

401 / 403: Check apiKey in opencode.json and model slugs on ShuYou. Config path: ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\). Switch models: Use /models inside OpenCode.
Use OpenCode only in project folders you trust. Validate JSON syntax before saving.