Install
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/filesclaude mcp add ccman -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/files{
"mcpServers": {
"ccman": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/files"
]
}
}
}Install command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →ccman
一个用于 Codex / Claude Code / Gemini CLI / OpenCode 的 API 服务商配置管理工具,支持 CLI + Desktop,并提供 MCP 服务器管理与 WebDAV 同步。
✨ 功能概览
- 一键切换服务商:Codex / Claude Code / Gemini CLI / OpenCode
- 内置预设模板:提供常用模板(Desktop 支持自定义预设)
- 安全写入:关键配置覆盖前自动备份(
.bak,权限600) - MCP 管理:集中管理 MCP 服务器(可在 Desktop 选择同步到 Claude/Gemini,Codex 暂不支持)
- WebDAV 同步:Codex / Claude / Gemini 配置备份、下载、合并
- 导入/导出:仅支持 Codex / Claude 配置
- Claude 历史清理:分析并清理
~/.claude.json
✅ 支持的工具与配置路径
| 工具 | 主要配置文件 | 说明 |
|---|---|---|
| Codex | ~/.codex/config.toml + ~/.codex/auth.json |
auth.json 使用 OPENAI_API_KEY |
| Claude Code | ~/.claude/settings.json |
另有历史文件 ~/.claude.json |
| Gemini CLI | ~/.gemini/settings.json + ~/.gemini/.env |
.env 使用 GOOGLE_GEMINI_BASE_URL / GEMINI_API_KEY / GOOGLE_API_KEY / GEMINI_MODEL |
| OpenCode | ~/.config/opencode/opencode.json |
写入 provider 配置与模型变体 |
| ccman | ~/.ccman/{codex,claude,gemini,opencode,mcp}.json + ~/.ccman/config.json |
保存服务商与 MCP 配置,WebDAV 同步配置存放在 config.json |
📦 内置预设
Claude Code
- Anthropic Official:
https://api.anthropic.com - GMN:
https://ai.gmncode.com - GMN1:
https://gmncode.cn
Codex
- OpenAI Official:
https://api.openai.com/v1 - GMN:
https://ai.gmncode.com - GMN1:
https://gmncode.cn
Gemini CLI
- Google Gemini (API Key):官方默认(无需设置 baseUrl)
- GMN:
https://ai.gmncode.com - GMN1:
https://gmncode.cn
OpenCode
- GMN:
https://ai.gmncode.com(npm:@ai-sdk/openai) - GMN1:
https://gmncode.cn(npm:@ai-sdk/openai)
🧭 CLI 使用速览
交互式入口
ccman
执行效果(主菜单):
$ ccman
? 请选择操作:
❯ 🔷 Claude 管理
🔶 Codex 管理
💎 Gemini 管理
🧩 OpenCode 管理
🔄 WebDAV 同步
📦 预置服务商管理
❌ 退出
Codex / Claude / Gemini / OpenCode 服务商管理
ccman cx add|list|use|current|edit|remove|clone
ccman cc add|list|use|current|edit|remove|clone|clean:analyze|clean
ccman gm add|list|use|current|edit|remove|clone
ccman oc add|list|use|current|edit|remove|clone
常用命令支持参数模式,适合非交互执行:
ccman cx add --name work --base-url https://api.example.com --api-key sk-xxx --switch
ccman cc add --preset GMN --api-key sk-xxx --switch
ccman gm edit default --new-name personal --base-url '' --api-key ''
ccman oc remove old-provider --yes
交互式工具菜单(以 Codex 为例):
$ ccman cx
? 🔶 Codex 操作:
❯ ➕ 添加服务商
🔄 切换服务商
📋 列出所有服务商
👁️ 查看当前服务商
✏️ 编辑服务商
🔁 克隆服务商
🗑️ 删除服务商
⬅️ 返回上级
下面补充每个命令的执行效果示例(交互式流程与输出与源码一致)。
Codex 命令执行效果
add
$ ccman cx add
📝 添加 Codex 服务商
? 选择配置来源:
❯ 📦 使用预置服务商
✏️ 自定义配置
? 选择预置服务商:
OpenAI Official - OpenAI 官方 API
GMN - GMN 服务 (OpenAI/Codex 兼容)
使用预设: GMN - GMN 服务 (OpenAI/Codex 兼容)
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…