Skip to main content
Crabbox is a remote test runner for developers and coding agents. Its built-in superserve provider creates a Superserve sandbox, uploads your working tree with uncommitted changes, runs a command, streams the output, and deletes the sandbox, all from one CLI command. Your tests run in an isolated VM instead of on your machine, and crabbox exits with the command’s exit code.

Setup

Install Crabbox:
Export your Superserve API key and check that Crabbox can reach Superserve:
See API keys to create a key. Crabbox reads the key only from the environment (CRABBOX_SUPERSERVE_API_KEY takes precedence over SUPERSERVE_API_KEY). It never stores the key in a config file.

Run tests

From a Git repository, pass the command after --:
The default template is superserve/base. Pick a template that has your project’s runtime, for example Node.js 22:
Output
Each run creates a new sandbox and deletes it when the command ends, whether the command passes or fails. Use --shell for a multi-step command, for example --shell 'npm ci && npm test'. Crabbox uploads tracked files and untracked files that .gitignore does not exclude. It skips dependency and build directories such as node_modules and dist, so install dependencies as part of the command.

Configure the repository

Commit a .crabbox.yaml to your repository to select Superserve without flags:
.crabbox.yaml
Then run commands without --provider:
Network lists map to Superserve network rules. With the config above, npm ci can reach the npm registry, and other outbound connections on all ports fail. networkDenyOut: [0.0.0.0/0] blocks all traffic that the allow list does not match. The two DNS resolvers are allowed so that hostnames resolve, which means the sandbox can still send DNS queries. Without the deny rule, the allow list limits only HTTP and HTTPS, and connections on other ports stay open. Each flag takes a comma-separated list and overrides the matching config key.

Reuse a sandbox

warmup creates a sandbox that stays until you stop it. Later runs with --id sync your changes into the same sandbox, which skips sandbox creation:
warmup prints a lease ID (ssbx_...) and a slug. Without --slug, Crabbox picks a random slug. Pass either one to --id. --no-sync runs the command without uploading files. By default, each sync replaces the workdir, so files that a run creates there, such as node_modules, are gone at the next run. To keep them between runs, set sync.delete: false in .crabbox.yaml. Files you delete locally then also stay in the sandbox.
.crabbox.yaml
Superserve pauses a warm sandbox after its timeout. The next crabbox run --id resumes it with its files in place. Always run crabbox stop when you are done, because a paused sandbox is kept until you delete it.

Start from a snapshot

To skip slow setup in every run, install tools once in a sandbox and save a snapshot. Put the tools outside the workdir, because the workdir is replaced on each sync:
Then pass the printed snapshot ID to Crabbox. The snapshot name is not accepted here:
The snapshot stays after its sandbox is deleted. Delete it with Snapshot.deleteById / Snapshot.delete_by_id when you no longer need it.

Pass environment variables

Crabbox forwards only CI and NODE_OPTIONS from your shell environment by default. Allow other variables with --allow-env:
The value is set in the sandbox as plain text, so any code in the sandbox can read it.

Use with a coding agent

A coding agent on your machine can run tests through Crabbox, so the tests run in a sandbox while the agent edits files locally. Add an instruction to the agent’s instruction file, such as CLAUDE.md for Claude Code or AGENTS.md for other agents:
CLAUDE.md
With .crabbox.yaml selecting Superserve, the agent’s runs go to Superserve. For example, with Claude Code:

How it works

Crabbox calls the Superserve API to create the sandbox, then uploads your files as an archive with the files API and runs the command with the exec API. There is no SSH connection. Crabbox labels each sandbox with crabbox.* metadata, such as crabbox.slug. It finds and cleans up only sandboxes that have this metadata.

Limitations

  • Sandboxes run Linux only.
  • Crabbox commands that need SSH, such as crabbox connect, crabbox ssh, VNC, browser VS Code, and Actions hydration, are not available.
  • --class and --type are rejected. Select resources with --superserve-template or --superserve-snapshot.
  • Options that copy files back from the sandbox, such as --download, --artifact-glob, and --capture-stdout, are not supported.

Learn more

Crabbox Superserve provider

Read the full option and lifecycle reference in the Crabbox repository.

Crabbox source

Read Crabbox’s source and command reference.

Templates

Build a template with your project’s runtime and tools.

Network rules

Control which hosts a sandbox can reach.