CLI 命令参考
claudex [COMMAND]不带命令运行时,如果已配置 profile 则启动 TUI 仪表盘,否则显示欢迎信息。
使用指定的提供商 profile 运行 Claude Code。
claudex run <PROFILE> [PROMPT] [-m MODEL] [--print] [--dangerously-skip-permissions] [ARGS...]| 参数 | 说明 |
|---|---|
PROFILE | Profile 名称,或 auto 启用智能路由 |
PROMPT | 可选的 prompt,用于非交互(一次性)执行 |
-m, --model MODEL | 临时覆盖默认模型 |
--print | 输出响应后退出(非交互模式) |
--dangerously-skip-permissions | 跳过所有权限提示(配合 --print 用于 CI/CD) |
ARGS... | 传递给 claude 的额外参数 |
# 使用 Grok(交互模式)claudex run grok
# 指定模型claudex run grok -m grok-3-mini-beta
# 智能路由claudex run auto
# 非交互一次性执行claudex run grok "Explain this codebase" --print
# CI/CD 流水线用法(无提示、无权限确认)claudex run grok "Fix lint errors" --print --dangerously-skip-permissions
# 传递额外参数给 claudeclaudex run grok -- --verboseprofile
Section titled “profile”管理提供商 profile。
profile list
Section titled “profile list”claudex profile list列出所有已配置的 profile 及其状态。
profile add
Section titled “profile add”claudex profile add交互式向导,引导完成提供商选择、API 密钥输入(支持 keyring 存储)、模型选择和连通性测试。
profile show
Section titled “profile show”claudex profile show <NAME>显示指定 profile 的详细信息。
profile remove
Section titled “profile remove”claudex profile remove <NAME>从配置中移除 profile。
profile test
Section titled “profile test”claudex profile test <NAME|all>测试指定 profile 或所有 profile 的连通性。
管理提供商 OAuth 订阅认证。
auth login
Section titled “auth login”claudex auth login <PROVIDER>使用 OAuth 登录指定提供商。支持的提供商:claude、openai、google、qwen、kimi、github。
OpenAI 从 Codex CLI 配置(~/.codex/auth.json)读取 token。Claude 从 ~/.claude 读取。其他提供商使用本地回调服务器或设备码流程。
# 登录 OpenAI(从 Codex CLI 读取)claudex auth login openai
# 登录 Claude(从 ~/.claude 读取)claudex auth login claude
# 登录 Googleclaudex auth login googleauth status
Section titled “auth status”claudex auth status [PROVIDER]显示当前认证状态。不指定提供商时,显示所有已配置 OAuth profile 的状态。
# 检查所有 OAuth profileclaudex auth status
# 检查特定提供商claudex auth status openaiauth refresh
Section titled “auth refresh”claudex auth refresh <PROVIDER>手动刷新指定提供商的 OAuth token。token 过期时代理也会自动刷新。
auth logout
Section titled “auth logout”claudex auth logout <PROVIDER>移除指定提供商的已存储 OAuth token。
管理翻译代理服务器。
proxy start
Section titled “proxy start”claudex proxy start [-p PORT] [-d]| 参数 | 说明 |
|---|---|
-p, --port PORT | 覆盖代理端口(默认:配置文件中的值) |
-d, --daemon | 以后台守护进程运行 |
proxy stop
Section titled “proxy stop”claudex proxy stop停止代理守护进程(发送 SIGTERM)。
proxy status
Section titled “proxy status”claudex proxy status显示代理是否运行及监听端口。
dashboard
Section titled “dashboard”claudex dashboard启动 TUI 仪表盘,实时监控和快速启动。
config
Section titled “config”claudex config [--init]| 参数 | 说明 |
|---|---|
--init | 在当前目录创建新配置文件 |
不带 --init 时,显示已加载的配置文件路径和搜索顺序。
update
Section titled “update”claudex update [--check]| 参数 | 说明 |
|---|---|
--check | 仅检查更新,不安装 |
不带 --check 时,下载并安装最新版本。