CLI 命令参考
claudex [OPTIONS] [COMMAND]| 选项 | 说明 |
|---|---|
--config <PATH> | 覆盖配置文件路径 |
--version | 输出版本号 |
--help | 输出帮助信息 |
不带命令运行时,如果已配置 profile 则启动 TUI 仪表盘,否则显示欢迎信息。
使用指定的提供商 profile 运行 Claude Code。
claudex run <PROFILE> [PROMPT] [OPTIONS] [-- ARGS...]| 参数/选项 | 说明 |
|---|---|
PROFILE | Profile 名称,或 auto 启用智能路由 |
PROMPT | 可选的 prompt,用于非交互(一次性)执行 |
-m, --model MODEL | 临时覆盖默认模型 |
--hyperlinks | 强制启用 OSC 8 终端超链接 |
--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 --hyperlinks
# 非交互一次性执行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 密钥输入(可选密钥链存储)、模型选择和连通性测试。
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 的连通性。向提供商的 /models 端点发送轻量请求。
管理提供商 profile 的 OAuth 订阅认证。
auth login
Section titled “auth login”claudex auth login <PROVIDER> [OPTIONS]| 选项 | 说明 |
|---|---|
--profile <NAME> | 关联到特定 profile |
--enterprise-url <URL> | 自定义企业服务器 URL(用于自托管 GitLab 等) |
--headless | 使用无界面(Device Code)流程,跳过浏览器启动 |
使用 OAuth 登录指定提供商。支持的提供商:claude、openai、google、qwen、kimi、github、gitlab。
# 登录 OpenAI(从 Codex CLI 读取)claudex auth login openai --profile codex-sub
# 登录 Claude(从 ~/.claude 读取)claudex auth login claude
# 登录 Googleclaudex auth login google --profile gemini-sub
# 使用企业 URL 登录 GitLabclaudex auth login gitlab --enterprise-url https://gitlab.mycompany.com
# 无界面模式(无浏览器,仅 Device Code)claudex auth login github --headlessauth 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 [OPTIONS]| 参数 | 说明 |
|---|---|
-p, --port PORT | 覆盖代理端口(默认:配置文件中的值) |
-d, --daemon | 以后台守护进程运行 |
proxy stop
Section titled “proxy stop”claudex proxy stop停止代理守护进程(通过 PID 文件发送 SIGTERM)。
proxy status
Section titled “proxy status”claudex proxy status显示代理是否运行及监听端口。
dashboard
Section titled “dashboard”claudex dashboard启动 TUI 仪表盘,实时监控和快速启动。
config
Section titled “config”管理配置文件。
config show
Section titled “config show”claudex config show显示已加载的配置文件路径、搜索顺序和当前配置值。
config path
Section titled “config path”claudex config path仅输出解析后的配置文件路径。
config init
Section titled “config init”claudex config init从内置模板在当前目录创建新配置文件。
config recreate
Section titled “config recreate”claudex config recreate从 config.example.toml 重新创建配置文件,覆盖现有配置。
config edit
Section titled “config edit”claudex config edit在 $EDITOR(或 $VISUAL)中打开配置文件。
config validate
Section titled “config validate”claudex config validate验证配置语法、profile 引用(backup_providers、路由规则)和 OAuth 提供商设置。报告错误和警告。
config get
Section titled “config get”claudex config get <KEY>通过键路径获取特定配置值(例如 proxy_port、profiles.0.name)。
config set
Section titled “config set”claudex config set <KEY> <VALUE>通过键路径设置特定配置值。
config export
Section titled “config export”claudex config export将当前合并后的配置以 TOML 格式导出到标准输出。
管理配置集(可安装的规则、技能和 MCP 服务器包)。
sets add
Section titled “sets add”claudex sets add <PATH>从包含 manifest.json(或 manifest.yaml)的本地目录安装配置集。
sets remove
Section titled “sets remove”claudex sets remove <NAME>按名称移除已安装的配置集。
sets list
Section titled “sets list”claudex sets list列出所有已安装的配置集及其版本、描述和组件摘要。
sets update
Section titled “sets update”claudex sets update <NAME> <PATH>从新的清单路径更新已有的配置集。
sets show
Section titled “sets show”claudex sets show <NAME>显示已安装配置集的详细信息,包括所有组件。
update
Section titled “update”claudex update [OPTIONS]| 参数 | 说明 |
|---|---|
--check | 仅检查更新,不安装 |
不带 --check 时,从 GitHub Releases 下载并安装最新版本。