ROCK CLI(命令名 rockcli 或 rc)是操作 ROCK 平台的命令行工具,v2.7 指南覆盖沙箱、agent 评估、实验、镜像与数据集管理。
安装与认证:安装命令为 bash -c "$(curl -fsSL http://xrl.alibaba-inc.com/install.sh)",升级用 rockcli update。认证支持环境变量 ROCK_API_KEY、全局参数 --api-key、配置文件 ~/.rock/setting.json,也可用 rc login --api-key <key> 保存凭据,rc whoami 查看身份。
主要能力:沙箱方面可 start/stop/restart/status/exec/upload/download/attach/history/replay,支持指定 --memory、--cpus、--disk,递归上传须用 --recursive(-r 无效),含隐藏文件加 -a,attach 中 /exit 断开保留会话、/close 永久关闭。Agent 评估用 rockcli agent run,支持 --config YAML、--bench 模板、--async、--quiet、--pre;查看用 agent view(-E/-e/-j、--trajectory 等),文件操作用 agent fs ls/cat/download/artifacts。实验沙箱用 rc expr 查看与批量停止(--dry-run、-y、--concurrency)。镜像用 rc image mirror/build 及 rc image task list/status/delete。数据集用 rc datasets list/detail/splits/tasks/upload,支持从 Hugging Face 导入及 fs 文件操作。Windows 沙箱用 rc sandbox start --image-os windows。
限制:agent 评估需 Python >= 3.11;沙箱状态流转为 pending→alive→stopping→stopped,attach 需 alive 状态;部分参数与详细说明见 references 目录文档。其余未在资料中说明的内容暂未提供。