runwhere CLI
完整命令参考
runwhere CLI 的核心命令、常用命令、高级命令和全局选项。
| 选项 | 说明 |
|---|
--help | 显示帮助信息。 |
--version | 显示 CLI 版本。 |
--json | 输出结构化 JSON,适合脚本和 CI。 |
--explain | 显示平台默认值填充过程,主要用于 submit 排查。 |
全局选项写在子命令前:
runwhere --json get jobs
runwhere --explain submit -f train.yaml
--json 输出示例:
{"data": [{"id": "job-efa79e36", "job_id": "job-efa79e36", "name": "claude-cli-docs-verify", "job_type": "training", "platform": "aliyun", "status": "running", "url": null, "gpu_count": 1, "sku_key": "ecs.gn7i.2xlarge", "offer_key": "aliyun/cn-hangzhou/cn-hangzhou-i/on_demand/ecs.gn7i.2xlarge", "node_id": "node-1f661ea4", "price_per_hour": "36.4400", "estimated_cost": "0.0000", "final_cost": null, "billed_seconds": 0, "created_at": "2026-07-25T00:24:38+00:00", "started_at": null, "ended_at": null}], "total": 1}
| 命令 | 说明 |
|---|
runwhere login --endpoint <url> | 登录并缓存 endpoint/token。 |
runwhere whoami | 显示当前用户、组织和 workspace 地址。 |
非交互登录:
echo "$RUNWHERE_TOKEN" | runwhere login --endpoint https://api.runwhere.ai
| 命令 | 说明 |
|---|
runwhere sync -f <yaml> | 增量同步代码,并准备环境和模型。 |
runwhere sync -f <yaml> --status | 查看最近一次同步状态。 |
runwhere submit -f <yaml> | 提交 Training、Inference 或 Notebook。 |
runwhere logs <name> | 查看历史日志。 |
runwhere logs <name> -f | 实时跟随日志和平台事件。 |
| 命令 | 说明 |
|---|
runwhere price summary | GPU 型号、价格范围和库存概览。 |
runwhere price list --gpu-type <type> | 查看指定 GPU 的 SKU 列表。 |
runwhere price list --gpu-type <type> --provider <name> | 按厂商筛选。 |
runwhere price list --gpu-type <type> --billing-model <model> | 按计费模式筛选。 |
runwhere price recommend -f <yaml> | 基于 YAML 推荐资源方案。 |
runwhere price recommend -f <yaml> --top <n> | 控制推荐数量。 |
runwhere price recommend -f <yaml> --no-spot | 不使用竞价资源。 |
runwhere price recommend -f <yaml> --max-price <price> | 设置最高预算,单位元/小时。 |
| 命令 | 说明 |
|---|
runwhere get jobs | 列出作业。 |
runwhere get jobs --status running | 按状态筛选。 |
runwhere get jobs --kind Training | 按类型筛选。 |
runwhere describe job <name> | 查看作业详情。 |
runwhere stop job <name> | 停止作业并释放计算资源。 |
runwhere resume <name> | 恢复训练或 Notebook。 |
runwhere resume <name> --from-step <n> | 从指定训练 step 恢复。 |
runwhere delete job <name> | 删除作业记录。 |
runwhere delete job <name> --force | 强制删除运行中的作业记录。 |
| 命令 | 说明 |
|---|
runwhere get usage | 查看当前周期用量。 |
runwhere get usage --from YYYY-MM-DD --to YYYY-MM-DD | 查看指定日期范围。 |
| 退出码 | 含义 |
|---|
0 | 成功。 |
2 | 用户输入错误,例如 YAML 文件不存在或参数错误。 |
3 | 服务端错误,例如未登录、认证失败或 API 返回错误。 |
4 | 网络错误,例如连接超时或 DNS 失败。 |
1 | 其他错误。 |
runwhere login --endpoint https://api.runwhere.ai
runwhere whoami
runwhere price recommend -f train.yaml --top 3
runwhere sync -f train.yaml
runwhere submit -f train.yaml
runwhere logs <name> -f
runwhere get jobs
runwhere describe job <name>
runwhere stop job <name>
runwhere delete job <name>