trinity-config
v1.5.2
Published
一键把 Trinity API 接入 Claude Code、Codex、OpenCode、OpenClaw、ZCode、CodeBuddy、CC Switch;用 --name 安装 Memory / Vision MCP 插件
Maintainers
Readme
trinity-config
一键接入 Trinity API,或安装 Trinity MCP 插件(--name 区分)。
两类用法(不要混在一条命令)
| 目的 | 命令 |
| --- | --- |
| 接 API | npx -y trinity-config --type <客户端> -k xh-… --model <code> |
| 装插件 | npx -y trinity-config --name <memory\|vision> --type <客户端> [-k xh-…] |
# ① 接 API
npx -y trinity-config --type claude -k xh-你的key --model gpt-5.4
# ② 装插件(--name 选插件)
npx -y trinity-config --name memory --type claude
# 已接过 API 时可省略 -k,自动复用并写入 Vision
npx -y trinity-config --name vision --type claude
npx -y trinity-config --name vision --type claude -k xh-你的key
npx -y trinity-config --name memory,vision --type claude -k xh-你的key
# CC Switch
npx -y trinity-config --type ccswitch --app claude -k xh-你的key
npx -y trinity-config --type ccswitch --app claude,codex -k xh-你的key --print-only| --name | 插件 | 说明 |
| --- | --- | --- |
| memory | Trinity Memory | 代码知识图谱;可不传 -k |
| vision | Trinity Vision | 识图;Key 写入插件 TRINITY_API_KEY(优先 -k,否则复用该客户端已配置 Key);会先 npm i -g @trinity-mcp/trinity-vision,MCP command 写 trinity-vision(不用每次 npx) |
别名:trinity-memory / trinity-vision。旧参数 --memory / --vision 仍可用,但会提示改用 --name。
| 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(直连) |
| codebuddy | ~/.codebuddy/.mcp.json(插件) |
| ccswitch | ccswitch://v1/import Deep Link |
接 API 时:协议按 GET /v1/models/{code} 的 capabilities.text.interfaces 自动择优;模型列表来自该 Key 的 GET /v1/models?modality=text。
CC Switch 注意
- 必填
--app:claude/codex/opencode/openclaw(不支持gemini/ Universal) - 与直连
--type claude等不要混用同一工具,以免互相覆盖 --print-only:只生成链接,不唤起应用
License: MIT
