crabbox
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCrabbox
Crabbox
Use Crabbox when OpenClaw needs remote Linux proof on owned capacity, a large
runner class, reusable warm state, or a Blacksmith alternative.
当OpenClaw需要在自有算力、大规格运行器类、可复用预热状态下进行远程Linux验证,或需要替代Blacksmith时,可使用Crabbox。
Before Running
运行前准备
- Run from the repo root. Crabbox sync mirrors the current checkout.
- Prefer local targeted tests for tight edit loops.
- Prefer Blacksmith Testbox when the task explicitly asks for Blacksmith or a Blacksmith-specific CI comparison.
- Use Crabbox for broad OpenClaw gates when owned AWS/Hetzner capacity is the right remote lane.
- Check for repo defaults before adding flags.
.crabbox.yaml - Sanity-check the selected binary before remote work. OpenClaw scripts prefer
when present; the user PATH shim can be stale:
../crabbox/bin/crabbox.command -v crabbox; ../crabbox/bin/crabbox --version; ../crabbox/bin/crabbox --help | sed -n '1,90p' - Install with ; auth is required before use:
brew install openclaw/tap/crabbox.printf '%s' "$CRABBOX_COORDINATOR_TOKEN" | crabbox login --url https://crabbox.openclaw.ai --provider aws --token-stdin - On macOS the user config is ; it must include
~/Library/Application Support/crabbox/config.yaml,broker.url, and usuallybroker.token.provider: aws
- 从仓库根目录运行。Crabbox同步会镜像当前的检出内容。
- 在频繁的编辑循环中,优先使用本地定向测试。
- 当任务明确要求使用Blacksmith或需要与Blacksmith特定CI进行对比时,优先选择Blacksmith Testbox。
- 当自有AWS/Hetzner算力是合适的远程渠道时,使用Crabbox进行全面的OpenClaw关卡测试。
- 在添加参数前,先查看中的仓库默认配置。
.crabbox.yaml - 在进行远程操作前,先检查所选二进制文件是否正常。OpenClaw脚本优先使用(如果存在);用户PATH中的shim可能已过期:
../crabbox/bin/crabbox。command -v crabbox; ../crabbox/bin/crabbox --version; ../crabbox/bin/crabbox --help | sed -n '1,90p' - 使用进行安装;使用前需完成认证:
brew install openclaw/tap/crabbox。printf '%s' "$CRABBOX_COORDINATOR_TOKEN" | crabbox login --url https://crabbox.openclaw.ai --provider aws --token-stdin - 在macOS上,用户配置文件路径为;该文件必须包含
~/Library/Application Support/crabbox/config.yaml、broker.url,通常还需设置broker.token。provider: aws
OpenClaw Flow
OpenClaw 流程
AWS/owned-capacity flow for tests:
pnpmsh
pnpm crabbox:warmup -- --idle-timeout 90m
pnpm crabbox:warmup -- --provider aws --class beast --market on-demand --idle-timeout 90m
pnpm crabbox:hydrate -- --id <cbx_id-or-slug>
pnpm crabbox:run -- --id <cbx_id-or-slug> --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed"Blacksmith-backed Crabbox flow can delegate setup to the Testbox workflow:
sh
pnpm crabbox:run -- --provider blacksmith-testbox --blacksmith-org openclaw --blacksmith-workflow .github/workflows/ci-check-testbox.yml --blacksmith-job check --blacksmith-ref main --idle-timeout 90m --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed"Stop boxes you created before handoff:
sh
pnpm crabbox:stop -- <cbx_id-or-slug>基于AWS/自有算力的pnpm测试流程:
sh
pnpm crabbox:warmup -- --idle-timeout 90m
pnpm crabbox:warmup -- --provider aws --class beast --market on-demand --idle-timeout 90m
pnpm crabbox:hydrate -- --id <cbx_id-or-slug>
pnpm crabbox:run -- --id <cbx_id-or-slug> --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed"基于Blacksmith的Crabbox流程可将配置工作委托给Testbox工作流:
sh
pnpm crabbox:run -- --provider blacksmith-testbox --blacksmith-org openclaw --blacksmith-workflow .github/workflows/ci-check-testbox.yml --blacksmith-job check --blacksmith-ref main --idle-timeout 90m --timing-json --shell -- "env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed"在交接前停止你创建的实例:
sh
pnpm crabbox:stop -- <cbx_id-or-slug>Useful Commands
实用命令
sh
crabbox status --id <id-or-slug> --wait
crabbox inspect --id <id-or-slug> --json
crabbox sync-plan
crabbox history --lease <id-or-slug>
crabbox logs <run_id>
crabbox results <run_id>
crabbox cache stats --id <id-or-slug>
crabbox ssh --id <id-or-slug>Use on when measuring sync timing.
Use on warmup, hydrate, and run when comparing AWS and
blacksmith-testbox timings.
Use on AWS warmup or one-shot run when testing quota
or capacity behavior without changing .
--debugrun--timing-json--market spot|on-demand.crabbox.yamlsh
crabbox status --id <id-or-slug> --wait
crabbox inspect --id <id-or-slug> --json
crabbox sync-plan
crabbox history --lease <id-or-slug>
crabbox logs <run_id>
crabbox results <run_id>
crabbox cache stats --id <id-or-slug>
crabbox ssh --id <id-or-slug>在命令中添加参数以测量同步计时。
在warmup、hydrate和run命令中添加参数,用于对比AWS和blacksmith-testbox的计时。
在AWS的warmup或一次性run命令中使用参数,可在不修改的情况下测试配额或算力行为。
run--debug--timing-json--market spot|on-demand.crabbox.yamlHydration Boundary
初始化边界
.github/workflows/crabbox-hydrate.ymlDo not add OpenClaw-specific setup to Crabbox. Put repo setup in the hydration
workflow and generic lease/sync behavior in Crabbox.
.github/workflows/crabbox-hydrate.yml不要在Crabbox中添加OpenClaw特定的配置。将仓库配置放在初始化工作流中,通用的租约/同步逻辑放在Crabbox中。
Cleanup
清理工作
Crabbox has coordinator-owned idle expiry and local lease claims, so OpenClaw
does not need a custom ledger. Default idle timeout is 30 minutes unless config
or flags set a different value. Still stop boxes you created when done.
If prints , treat it as an operator
review hint; do not delete machines without checking provider and
coordinator state.
crabbox listorphan=no-active-leasekeep=trueCrabbox由协调器管理空闲过期时间和本地租约声明,因此OpenClaw不需要自定义账本。默认空闲超时为30分钟,除非配置或参数设置了其他值。使用完毕后仍需停止你创建的实例。
如果输出,可将其视为需要运维人员检查的提示;在未确认提供商和协调器状态前,不要删除标记为的机器。
crabbox listorphan=no-active-leasekeep=true