一键导入
crabbox
// Use Crabbox for OpenClaw remote Linux validation. Default to Blacksmith Testbox; includes direct Blacksmith and owned AWS/Hetzner fallback notes when Crabbox fails.
// Use Crabbox for OpenClaw remote Linux validation. Default to Blacksmith Testbox; includes direct Blacksmith and owned AWS/Hetzner fallback notes when Crabbox fails.
[HINT] 下载包含 SKILL.md 和所有相关文件的完整技能目录
| name | crabbox |
| description | Use Crabbox for OpenClaw remote Linux validation. Default to Blacksmith Testbox; includes direct Blacksmith and owned AWS/Hetzner fallback notes when Crabbox fails. |
Use Crabbox when OpenClaw needs remote Linux proof for broad tests, CI-parity checks, secrets, hosted services, Docker/E2E/package lanes, warmed reusable boxes, sync timing, logs/results, cache inspection, or lease cleanup.
Default backend: blacksmith-testbox. The separate blacksmith-testbox skill
has been removed; this skill owns both the normal Crabbox path and the direct
Blacksmith fallback playbook.
command -v crabbox
../crabbox/bin/crabbox --version
pnpm crabbox:run -- --help | sed -n '1,120p'
../crabbox/bin/crabbox desktop launch --help
../crabbox/bin/crabbox webvnc --help
../crabbox/bin/crabbox when present. The user PATH
shim can be stale..crabbox.yaml for repo defaults, but override provider explicitly.
Even if config still says AWS, maintainer validation should normally pass
--provider blacksmith-testbox.~/.profile and test only presence/length. If Crabbox
does not already have the key, copy only the exact needed key into the remote
process environment for that one command. Do not print it, do not sync it as a
repo file, and do not leave it in remote shell history or logs. If no
secret-safe injection path is available, say true live provider auth is
blocked instead of silently using a fake key.OPENCLAW_LOCAL_CHECK_MODE=throttled from the local shell is not permission
to move broad pnpm check:changed, pnpm test:changed, full pnpm test, or
lint/typecheck fan-out onto the laptop.OPENCLAW_LOCAL_CHECK_MODE=throttled|full when the user explicitly
asks for local proof in the current task. If Testbox is queued or capacity is
constrained, report the blocker and keep only targeted local edit-loop checks
running.Use these only when the task needs an existing non-Linux host. OpenClaw broad
validation still defaults to blacksmith-testbox.
Crabbox supports static SSH targets:
../crabbox/bin/crabbox run --provider ssh --target macos --static-host mac-studio.local -- xcodebuild test
../crabbox/bin/crabbox run --provider ssh --target windows --windows-mode normal --static-host win-dev.local -- pwsh -NoProfile -Command "dotnet test"
../crabbox/bin/crabbox run --provider ssh --target windows --windows-mode wsl2 --static-host win-dev.local -- pnpm test
target=macos and target=windows --windows-mode wsl2 use the POSIX SSH,
bash, Git, rsync, and tar contract.static.workRoot.crabbox actions hydrate/register are Linux-only today; use plain
crabbox run loops for static macOS and Windows hosts.../crabbox/bin/crabbox run --help, config/flag tests, and the Crabbox
Go test suite.Use this for pnpm check, pnpm check:changed, pnpm test,
pnpm test:changed, Docker/E2E/live/package gates, or anything likely to fan
out across many Vitest projects.
Changed gate:
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 \
--ttl 240m \
--timing-json \
--shell -- \
"env CI=1 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"
Full suite:
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 \
--ttl 240m \
--timing-json \
--shell -- \
"env CI=1 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"
Focused rerun:
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 \
--ttl 240m \
--timing-json \
--shell -- \
"env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test <path-or-filter>"
Read the JSON summary. Useful fields:
provider: should be blacksmith-testboxleaseId: tbx_...syncDelegated: should be truecommandMs / totalMsexitCodeCrabbox should stop one-shot Blacksmith Testboxes automatically after the run. Verify cleanup when a run fails, is interrupted, or the command output is unclear:
blacksmith testbox list
Use the smallest Crabbox lane that proves the reported user path, not just the touched code. Aim for one after-fix E2E proof before commenting, closing, or opening a PR for a user-visible bug.
Pick the lane by symptom:
scripts/e2e/*-docker.sh or package script. This proves npm packaging,
install paths, runtime deps, config writes, and container behavior.~/.profile, then inject the single needed key into Crabbox if needed. Scrub
unrelated provider env vars in the child command so interactive defaults do
not drift to another provider. If only a dummy key is used, label the proof
narrowly, e.g. "UI/install path only; live provider auth not exercised."Efficient flow:
Keep it efficient:
OPENCLAW_CURRENT_PACKAGE_TGZ with Docker/package lanes when testing a
candidate tarball; prefer the repo's package helper instead of direct source
execution when the bug might be packaging/install related.--timing-json on broad or flaky runs when command duration or sync
behavior matters.Interactive CLI/onboarding:
tmux send-keys; capture proof with
tmux capture-pane, redacted through sed.send-keys -l openai may not trigger filtering in a
tmux pane; inspect option order locally or on-box and send exact Down/Enter
sequences.OPENCLAW_STATE_DIR=$(mktemp -d). Plugin npm
installs live under that state dir (npm/node_modules/...), not under
OPENCLAW_CONFIG_DIR. Verify downloads by checking the state dir, package
lock, and installed package metadata.OPENCLAW_ALLOW_PLUGIN_INSTALL_OVERRIDES=1 plus
OPENCLAW_PLUGIN_INSTALL_OVERRIDES='{"plugin-id":"npm-pack:/tmp/plugin.tgz"}'.
Pack with npm pack, set an isolated OPENCLAW_STATE_DIR, and verify the
package under npm/node_modules. Overrides are test-only and must not be
treated as official/trusted-source installs.Installed Codex plugin, npm/node_modules/@openclaw/codex, and the
package-lock entry showing the bundled @openai/codex dependency. A dummy
OpenAI-shaped key can prove only UI/install behavior; it is not live auth.For most Blacksmith-backed Crabbox calls, one-shot is enough. Use reuse only when you need multiple manual commands on the same hydrated box.
If Crabbox returns a reusable id or you intentionally keep a lease:
pnpm crabbox:run -- --provider blacksmith-testbox --id <tbx_id> --no-sync --timing-json --shell -- "pnpm test <path>"
Stop boxes you created before handoff:
pnpm crabbox:stop -- <id-or-slug>
blacksmith testbox stop --id <tbx_id>
Prefer WebVNC for human inspection because the browser portal can preload the
lease VNC password and avoids a native VNC client's copy/paste/password dance.
Use native crabbox vnc only when WebVNC is unavailable, the browser portal is
broken, or the user explicitly wants a local VNC client.
Common desktop flow:
../crabbox/bin/crabbox warmup --provider hetzner --desktop --browser --class standard --idle-timeout 60m --ttl 240m
../crabbox/bin/crabbox desktop launch --provider hetzner --id <cbx_id-or-slug> --browser --url https://example.com --webvnc --open
Useful WebVNC commands:
../crabbox/bin/crabbox webvnc --provider hetzner --id <cbx_id-or-slug> --open
../crabbox/bin/crabbox webvnc --provider hetzner --id <cbx_id-or-slug> --daemon --open
../crabbox/bin/crabbox webvnc --provider hetzner --id <cbx_id-or-slug> --status
../crabbox/bin/crabbox webvnc --provider hetzner --id <cbx_id-or-slug> --stop
../crabbox/bin/crabbox screenshot --provider hetzner --id <cbx_id-or-slug> --output desktop.png
desktop launch --webvnc --open is usually the nicest one-shot: it starts the
browser/app inside the visible session, bridges the lease into the authenticated
WebVNC portal, and opens the portal. Keep browsers windowed for human QA; use
--fullscreen only for capture/video workflows.
Keep the fallback narrow. First decide whether the failure is Crabbox itself, Blacksmith/Testbox, repo hydration, sync, or the test command.
Fast checks:
command -v crabbox
../crabbox/bin/crabbox --version
crabbox run --provider blacksmith-testbox --help | sed -n '1,140p'
command -v blacksmith
blacksmith --version
blacksmith testbox list
Common Crabbox-only failures:
../crabbox/bin/crabbox from the sibling
repo, or update/install Crabbox before retrying.--provider blacksmith-testbox plus explicit
--blacksmith-* flags instead of relying on .crabbox.yaml.tbx_... id, or run one-shot without
--id.--debug --timing-json; capture the final JSON and the
printed Actions URL.blacksmith testbox list and stop only boxes you
created.OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm .... Leave the
remote lane queued, switch to a narrower targeted local check, or stop and
report the capacity blocker.If Crabbox cannot dispatch, sync, attach, or stop but Blacksmith itself works, use direct Blacksmith from the repo root:
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
blacksmith testbox run --id <tbx_id> "env CI=1 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 testbox stop --id <tbx_id>
Direct full suite:
blacksmith testbox run --id <tbx_id> "env CI=1 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"
Auth fallback, only when blacksmith says auth is missing:
blacksmith auth login --non-interactive --organization openclaw
Raw Blacksmith footguns:
tbx_... id in the session.warmup --ref refs; use a branch or tag.blacksmith testbox list as cleanup diagnostics, not a shared reusable
queue.Escalate to owned AWS/Hetzner only when Blacksmith is down, quota-limited, missing the needed environment, or owned capacity is the explicit goal. Use the Owned Cloud Fallback section below.
Crabbox Blacksmith backend delegates setup to:
openclaw.github/workflows/ci-check-testbox.ymlcheckmain unless testing a branch/tag intentionallyThe hydration workflow owns checkout, Node/pnpm setup, dependency install, secrets, ready marker, and keepalive. Crabbox owns dispatch, sync, SSH command execution, timing, logs/results, and cleanup.
Minimal direct Blacksmith fallback, from repo root:
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
blacksmith testbox run --id <tbx_id> "env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test:changed"
blacksmith testbox stop --id <tbx_id>
Use direct Blacksmith only when Crabbox is the broken layer and Blacksmith
itself still works. Prefer direct blacksmith testbox list for cleanup
diagnostics, not as a reusable work queue.
Important Blacksmith footguns:
warmup --ref refs; use a branch or tag.blacksmith auth login --non-interactive --organization openclaw
Use AWS/Hetzner only when Blacksmith is down, quota-limited, missing the needed environment, or owned capacity is explicitly the goal.
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"
pnpm crabbox:stop -- <cbx_id-or-slug>
Install/auth for owned Crabbox if needed:
brew install openclaw/tap/crabbox
crabbox login --url https://crabbox.openclaw.ai --provider aws
New users should self-resolve broker auth before anyone asks for AWS keys:
crabbox config show
crabbox doctor
crabbox whoami
crabbox login --url https://crabbox.openclaw.ai --provider aws.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, or AWS
profile setup during normal OpenClaw validation, assume the agent selected
the wrong path. Use brokered crabbox login, --provider blacksmith-testbox,
or an existing brokered lease before asking the user for cloud credentials.printf '%s' "$CRABBOX_COORDINATOR_TOKEN" | crabbox login --url https://crabbox.openclaw.ai --provider aws --token-stdin.macOS config lives at:
~/Library/Application Support/crabbox/config.yaml
It should include broker.url, broker.token, and usually provider: aws
for owned-cloud lanes. Do not let that config override the OpenClaw default
when Blacksmith proof is requested; pass --provider blacksmith-testbox.
For human desktop demos, prefer webvnc over native vnc and keep the remote
desktop visible/windowed. Do not fullscreen the remote browser or hide the XFCE
panel/window chrome unless the explicit goal is video/capture output. After
launch, verify a screenshot shows the desktop panel plus browser title bar. If
Chrome is fullscreen, toggle it back with:
crabbox run --id <lease> --shell -- 'DISPLAY=:99 xdotool search --onlyvisible --class google-chrome windowactivate key F11'
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>
blacksmith testbox list
Use --debug on run when measuring sync timing.
Use --timing-json on warmup, hydrate, and run when comparing backends.
Use --market spot|on-demand only on AWS warmup/one-shot runs.
../crabbox/bin/crabbox --help lists
blacksmith-testbox; update Crabbox before falling back.--debug; check changed-file count and whether the
checkout is dirty.blacksmith testbox list; stop owned tbx_... leases you
created.Do not add OpenClaw-specific setup to Crabbox itself. Put repo setup in the hydration workflow and keep Crabbox generic around lease, sync, command execution, logs/results, timing, and cleanup.