opencode-claude-client
v0.0.6
Published
Claude CLI provider bridge for OpenCode model routing.
Readme
opencode-claude-client
opencode-claude-client is a custom OpenCode provider bridge that routes model-picker selections through your local Claude CLI (claude). It exists so OpenCode can use a provider-native path (claude_cli/<model>) instead of legacy tool routing, while keeping authentication fully auth-agnostic and delegated to whatever Claude CLI auth mode you already use. This repository includes a default project config at opencode.json, so local usage in this repo does not require extra global provider setup.
Prerequisites
- Claude Code CLI is installed and available on
PATHasclaude. - Claude CLI is already authenticated on your machine.
- OpenCode is installed and using your normal config location.
Use It (Sample OpenCode Prompt)
Config is optional when working in this repository because opencode.json is already included. Paste this prompt into OpenCode if you want an agent to set it up in another project or in your global config:
Install and configure opencode-claude-client as a custom provider in my OpenCode config.
Requirements:
- add plugin entry: opencode-claude-client
- do not add manual provider.claude_cli block unless needed for older compatibility
- default model: claude_cli/opus
After editing config, verify with: opencode models claude_cliExample Config
Use plugin-only config (recommended):
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-claude-client"],
"model": "claude_cli/opus"
}The plugin injects default provider.claude_cli settings from the packaged opencode.json.
Model Alias Mapping
| Picker alias | Claude CLI model |
| --- | --- |
| sonnet | claude-sonnet-4-5 |
| opus | claude-opus-4-6 |
| haiku | claude-haiku-4-5 |
If an alias is not recognized, the value is passed through directly to claude --model.
