trinity-config
v1.3.2
Published
一键把 Trinity API 接入 Claude Code、Codex、OpenCode、OpenClaw、ZCode、CC Switch
Maintainers
Readme
trinity-config
一键接入 Trinity:Claude Code / Codex / OpenCode / OpenClaw / ZCode / CC Switch。
协议按 GET /v1/models/{code} 的 capabilities.text.interfaces 自动择优(Anthropic → Responses → Completions),再与工具能力求交。
写入客户端的模型列表来自该 API Key 的 GET /v1/models?modality=text(Call Allowlist 内生文/多模态;不含生图/生视频,也不含无权限模型)。
npx -y trinity-config --type zcode -k xh-你的key --model gpt-5.4
# CC Switch:按 App 槽位生成 Deep Link(非 Universal)
npx -y trinity-config --type ccswitch --app claude -k xh-你的key
npx -y trinity-config --type ccswitch --app codex -k xh-你的key --model gpt-5.4
npx -y trinity-config --type ccswitch --app claude,codex -k xh-你的key --print-only| type | 配置方式 |
| --- | --- |
| claude | ~/.claude/settings.json(直连) |
| codex | ~/.codex/config.toml + auth.json(直连) |
| opencode | ~/.config/opencode/opencode.json(直连) |
| openclaw | ~/.openclaw/openclaw.json(直连) |
| zcode | ~/.zcode/v2/config.json(直连) |
| ccswitch | ccswitch://v1/import Deep Link;落盘 ~/.cc-switch/trinity-imports/ |
CC Switch 注意
- 必填
--app:claude/codex/opencode/openclaw(不支持gemini/ Universal) - 与直连
--type claude等不要混用同一工具,以免互相覆盖 - Claude:Anthropic Messages,Endpoint 不带
/v1 - Codex:
wire_api=responses,Endpoint 带/v1,关闭 Needs Local Routing --print-only:只生成链接,不唤起应用
Anthropic Base 不带 /v1;Responses / Completions 带 /v1。
License: MIT
