Using FishXCode with OpenCode
Install OpenCode
bash
npm install -g opencode-ai@latestbash
brew install opencodebash
scoop install opencodeConfigure FishXCode
- Get your API Key from https://fishxcode.com/console/token
- Set the environment variable:
bash
export FISHXCODE_TOKEN=sk-xxxpowershell
$env:FISHXCODE_TOKEN="sk-xxx"- Create
opencode.jsonin your project root or~/.config/opencode/:
json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"fishxcode-anthropic": {
"npm": "@ai-sdk/anthropic",
"name": "fishxcode-anthropic",
"options": {
"baseURL": "https://fishxcode.com/v1",
"apiKey": "{env:FISHXCODE_TOKEN}"
},
"models": {
"claude-sonnet-4-6": {
"name": "claude-sonnet-4-6"
}
}
},
"fishxcode-openai": {
"npm": "@ai-sdk/openai-compatible",
"name": "fishxcode-openai",
"options": {
"baseURL": "https://fishxcode.com/v1",
"apiKey": "{env:FISHXCODE_TOKEN}"
},
"models": {
"gpt-5.2-codex": {
"name": "gpt-5.2-codex"
}
}
}
}
}Important
Replace sk-xxx with your actual Token from the FishXCode console.
Launch
bash
cd my-project
opencodeOnce launched, select a model under the FishXCode provider to start coding.