Cc Portkey — AI skill for Claude Code
A CLI tool for quickly switching Claude Code between different model providers (Claude, DeepSeek, GLM, MiniMax, etc.
How to install Cc Portkey
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open NanmiCoder/cc-portkey and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cc Portkey does
A CLI tool for quickly switching Claude Code between different model providers (Claude, DeepSeek, GLM, MiniMax, etc.)
Alternatives in AI
- Bot On Anything — A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) i 4.2k ★
- EchoBird — One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code 3.1k ★
- WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
README
cc-portkey

[English](./README_EN.md) | 中文
一个用于快速切换 Claude Code 模型服务商的命令行工具(支持 Claude、DeepSeek、GLM、MiniMax 等)
**为什么叫 Portkey?**
Portkey(门钥匙)是《哈利·波特》中的魔法物品——碰一下就能瞬间传送到另一个地方。
这个工具也一样:敲一个命令,就能把 Claude Code 瞬移到另一个模型服务商。
功能特性
- 一条命令切换不同的 API 服务商
- 支持环境变量引用 (
${VAR_NAME}) - 快捷别名命令 (
ccc,ds,glm,mm) 秒切 - 跨平台支持 (Windows, macOS, Linux)
- 切换时保留现有的 Claude Code 配置
安装
下载预编译二进制
从 [Releases](https://github.com/NanmiCoder/cc-portkey/releases) 下载对应平台的二进制文件,放到 PATH 目录中。
从源码编译(所有平台)
需要 [Go 1.21+](https://go.dev/dl/)
# 克隆仓库
git clone https://github.com/NanmiCoder/cc-portkey.git
cd cc-portkey
# 编译
go build -o cc-portkey ./cmd/cc-portkey/
# 移动到 PATH 目录
# Linux/macOS:
sudo mv cc-portkey /usr/local/bin/
# Windows (管理员 PowerShell):
Move-Item cc-portkey.exe C:\Windows\System32\
快速开始
# 1. 初始化(自动创建配置 + 快捷命令)
cc-portkey init
# 2. 编辑配置,添加你的 API Keys
cc-portkey edit
# 3. 一键启动(切换 + 启动 Claude Code)
ds # DeepSeek
glm # GLM (智谱)
mm # MiniMax
ccc # Claude (官方)
配置说明
配置文件位置
- cc-portkey 配置:
~/.cc-portkey/config.json - Claude 配置:
~/.claude/settings.json(由 cc-portkey 修改)
配置文件结构
{
"current": "claude",
"profiles": {
"claude": {
"display_name": "Claude (官方)",
"base_url": "",
"api_key": "${ANTHROPIC_API_KEY}",
"timeout_ms": 120000,
"models": {}
},
"deepseek": {
"display_name": "DeepSeek",
"base_url": "https://api.deepseek.com/anthropic",
"api_key": "${DEEPSEEK_API_KEY}",
"timeout_ms": 600000,
"models": {
"default": "deepseek-chat",
"small_fast": "deepseek-chat"
}
},
"glm": {
"display_name": "GLM (智谱)",
"base_url": "https://open.bigmodel.cn/api/anthropic",
"api_key": "${GLM_API_KEY}",
"timeout_ms": 3000000,
"models": {
"opus": "glm-4.6",
"sonnet": "glm-4.6",
"haiku": "glm-4.5-air"
}
},
Related Skills
Agent Network
助力搭建你的数字 AI 员工军团 — 多 Agent 一行命令组网协作。Claude Code / Claude Agent SDK / Codex / Grok Build 4 runtime + 8+ 家 LLM(A
AI Consultants:Consult
Consult AI experts (Gemini, Codex, Mistral, Kimi, Qwen, GLM, Grok, DeepSeek, MiniMax) for coding questions. Us
OmniCopilot
1200+ AI models in your GitHub Copilot Chat — free & forever free. VS Code extension powered by OmniRoute: 340
Cognition Claude Proxy
Use Devin CLI's model catalog (SWE-2, GLM-5.2, DeepSeek, 200+) with Claude Code as the backend
Kitty Bridge
Universal LLM bridge for AI agents. Use Claude Code with MiniMax, Codex with GLM, or Gemini CLI with OpenRoute
onWatch
Open-source Go CLI that tracks AI API quota usage across 7 providers (Synthetic, Z.ai, Anthropic, Codex, GitHu
Related Agents
AI LLM Expert
AI/LLM specialist. Use PROACTIVELY for model selection, prompt engineering, or RAG architecture. MUST BE USED
Auth Wiring Specialist
Use when wiring auth into a new project, switching auth providers, or adding role/org features. Carries the fa
ChatGPT On Wechat
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页