Documentation menu
DOCUMENTATION · MAIN BRANCH

Command reference

<!-- Generated by scripts/generate-command-reference.py; do not edit. -->

From this checkout's CLI help. Regenerate with:

go build -o bin/boxpool ./cmd/boxpool
python3 scripts/generate-command-reference.py --binary bin/boxpool

On Linux, use sudo /usr/local/bin/boxpool for the installed root daemon. On macOS, run as your user. See the user guide for examples, state paths, environment variables and local versus remote commands. Flags precede positional arguments unless help shows otherwise.

All commands

boxpool: a pool of agent sandboxes on machines you own

Usage:
  boxpool <command> [arguments]

Commands:
  daemon    run the node daemon in the foreground
  doctor    check whether this machine can host sandboxes
  version   print the version
  up        install and start the daemon: a systemd service on Linux (as
            root), a launch agent on macOS (as you)
  down      stop the daemon's service or launch agent, keeping its state
  join      install the daemon as up does and join the pool a token names
  token     create, list or revoke join tokens and access tokens
  login     send sandbox commands to a remote head with an access token
  logout    send them to this machine's daemon again
  node      set this machine's labels: node label gpu,always-on
  promote   make this machine the head of a pool of two whose head is gone
  sh        open a shell in a new or existing sandbox; on a head, on the
            node --os, --arch and --node pick
  exec      run a command in a sandbox
  cp        copy files between this machine and a sandbox
  skills    install instructions for local agents using sandbox workspaces
  ls        list pool sandboxes; --nodes shows node health and capacity
  logs      show sandbox console or --daemon logs; -f follows output
  audit     on the head: show the last 90 days of actions and token IDs
  start     start a stopped sandbox with its disk
  stop      stop a sandbox
  pause     pause a running sandbox, keeping its memory (not on Docker)
  resume    resume a paused sandbox
  rm        delete a sandbox and free its resources
  snapshot  save a sandbox's disk for boxpool sh --from; snapshot ls, rm
  desktop   on the head: open an authenticated desktop viewer with takeover
  expose    on the head: an HTTPS URL for a sandbox port; expose ls, rm, check

daemon

Usage of daemon:
  -allow-sleep
        allow idle sleep while sandboxes run (macOS)

doctor

boxpool doctor    # check whether this machine can host sandboxes

This command has no flags; its description comes from root help.

version

boxpool version    # print the version

This command has no flags; its description comes from root help.

up

Installer help depends on the host OS. Run boxpool up --help on that host. See service setup and cleanup and state and upgrades.

down

Installer help depends on the host OS. Run boxpool down --help on that host. See service setup and cleanup and state and upgrades.

join

Usage: boxpool join <token>

Installs and starts the daemon as boxpool up does, then joins the pool of
the head that printed the token with boxpool token create --join. This
machine must reach the head's address in the token directly, over a LAN or
a tailnet (boxpool token create --join --transport tailscale).

token

Usage:
  boxpool token create --join [--ttl 1h] [--transport direct|tailscale] [--addr host:port]
  boxpool token create --scope cli|api|expose [--sandbox name] [--ttl duration]
  boxpool token ls
  boxpool token revoke <join token | access token | access token ID>

create --join prints a token that boxpool join on another machine uses,
once, to join this machine's pool. It expires after --ttl.

create --scope prints an access token for this head's API, which
boxpool login on another machine saves. cli and api tokens run sandbox
commands and boxpool ls; expose tokens only open the URLs boxpool expose
makes. --sandbox limits a token to one sandbox. It never expires unless
--ttl is given. ls lists access tokens and when each was last used.
Restoring a snapshot with --from requires a token without --sandbox.

revoke makes an unused join token, or an access token, invalid at once.

--transport is how nodes reach this machine. direct, the default, names
this host's name on the LAN. tailscale names its tailnet address, so a node
behind another NAT joins with no port forwarding; it works with Headscale
too, and each node must be on the same tailnet. --addr overrides either.

token create

Usage:
  boxpool token create --join [--ttl 1h] [--transport direct|tailscale] [--addr host:port]
  boxpool token create --scope cli|api|expose [--sandbox name] [--ttl duration]
  boxpool token ls
  boxpool token revoke <join token | access token | access token ID>

create --join prints a token that boxpool join on another machine uses,
once, to join this machine's pool. It expires after --ttl.

create --scope prints an access token for this head's API, which
boxpool login on another machine saves. cli and api tokens run sandbox
commands and boxpool ls; expose tokens only open the URLs boxpool expose
makes. --sandbox limits a token to one sandbox. It never expires unless
--ttl is given. ls lists access tokens and when each was last used.
Restoring a snapshot with --from requires a token without --sandbox.

revoke makes an unused join token, or an access token, invalid at once.

--transport is how nodes reach this machine. direct, the default, names
this host's name on the LAN. tailscale names its tailnet address, so a node
behind another NAT joins with no port forwarding; it works with Headscale
too, and each node must be on the same tailnet. --addr overrides either.

Flags:
  -addr string
        head address the token names, host:port (default: from --transport, port 7443)
  -join
        create a join token
  -sandbox string
        the only sandbox an access token reaches
  -scope string
        create an access token: cli, api or expose
  -transport string
        how nodes reach this head: direct or tailscale (default "direct")
  -ttl duration
        how long the token is valid (default for access tokens: forever) (default 1h0m0s)

login

Usage:
  boxpool login <head>[:port] <token>
  boxpool logout

login saves a head's address and an access token from boxpool token create
--scope cli on that head. From then on, sandbox commands and ls on this
machine go to that head instead of the local daemon. logout forgets them.
The port defaults to 7443.

logout

Usage:
  boxpool login <head>[:port] <token>
  boxpool logout

login saves a head's address and an access token from boxpool token create
--scope cli on that head. From then on, sandbox commands and ls on this
machine go to that head instead of the local daemon. logout forgets them.
The port defaults to 7443.

node

Usage: boxpool node label LABEL,...

Replaces this machine's labels, which boxpool sh --node LABEL on the head
places sandboxes by, e.g. gpu,always-on. An empty list "" removes them.
The head sees the change at the next heartbeat.

promote

Usage: boxpool promote

Makes this machine its pool's head after the head is gone, from this
machine's replica of the pool's state. A pool of three or more machines
elects a new head by itself; a pool of two needs this. The daemon refuses
while it can still reach the head.

sh

Usage: boxpool sh [flags] [name] [-- command [args...]]

Opens a shell, or runs command, in a new sandbox, or with a name, in that
existing one. Leaving the shell leaves the sandbox running.

Flags:
  -arch string
        on a head, put a new sandbox on a node with this architecture: amd64 or arm64
  -cpu int
        vCPUs of a new sandbox (default 2)
  -disk string
        disk of a new sandbox, e.g. 20g (default 10g)
  -from string
        snapshot to copy a new sandbox's disk from (see boxpool snapshot)
  -image string
        image for a new sandbox: base or desktop
  -mem string
        memory of a new sandbox, e.g. 512m or 4g (default 2g)
  -name string
        name for the sandbox, or of an existing one to attach to (default: generated)
  -node string
        on a head, put a new sandbox on a node with this label (see boxpool node label)
  -os string
        on a head, put a new sandbox on a node with this OS: linux or macos
  -restart string
        restart policy of a new sandbox: always boots it again if the daemon starts and finds it stopped, as after a host reboot (default "no")
  -timing
        print the time from the command's start to the shell's first output

exec

Usage: boxpool exec [-i] [-t] <sandbox> [--] <command> [args...]

Runs a command in a running sandbox and exits with its exit code. Without
-t, its stdout and stderr stay separate and it gets no input unless -i.

Exit status, as for docker exec: the command's exit code, or 128+n if a
signal n killed it; 125 if boxpool exec itself failed (bad arguments, no
daemon, sandbox missing or stopped, connection lost before the command
exited). A command that exits 125 itself is indistinguishable.

Flags:
  -i    forward stdin to the command
  -it
        same as -i -t
  -t    run the command on this terminal, in raw mode, as boxpool sh does (forwards stdin)

cp

Usage: boxpool cp SRC DST

Copies a file or directory between this machine and a sandbox. Exactly one
of SRC and DST is <sandbox>:<absolute path>; the other is a path here.
Modes, modification times and symlinks are kept, owners are not.

  boxpool cp ./dir box:/tmp/      copies ./dir to /tmp/dir in box, which
                                  must be an existing directory
  boxpool cp box:/tmp/dir ./out   copies it to ./out/dir if ./out is a
                                  directory, else to ./out

skills

Usage: boxpool skills install [--dir <skills-directory>] [--force]

Installs the bundled boxpool-workspace skill for an agent running on this
machine and working in a sandbox. No daemon or model login is needed.
The default skills directory is ~/.agents/skills (Pi and Codex). For
Claude Code, use --dir ~/.claude/skills. Restart or reload your harness
after installation and explicitly select the Boxpool workspace skill.

Existing identical content is kept. Different content is preserved unless
--force is given. Only boxpool-workspace/SKILL.md is written.

skills install

Usage: boxpool skills install [--dir <skills-directory>] [--force]

Installs the bundled boxpool-workspace skill for an agent running on this
machine and working in a sandbox. No daemon or model login is needed.
The default skills directory is ~/.agents/skills (Pi and Codex). For
Claude Code, use --dir ~/.claude/skills. Restart or reload your harness
after installation and explicitly select the Boxpool workspace skill.

Existing identical content is kept. Different content is preserved unless
--force is given. Only boxpool-workspace/SKILL.md is written.

Flags:
  -dir string
        skills directory (default ~/.agents/skills)
  -force
        replace different existing Boxpool skill instructions

ls

Usage: boxpool ls [--nodes] [--json]

Lists this machine's sandboxes, and on a head its nodes' sandboxes, or with
--nodes the machines in its pool.

Flags:
  -json
        print a JSON array instead of a table
  -nodes
        list the pool's machines, on the head

logs

Usage: boxpool logs [-f] <sandbox> | boxpool logs [-f] --daemon

Shows the current console log, or this node's daemon log. Flags precede
the sandbox name. Shell/exec output is not captured; write to /dev/console
inside a VM to send output to its console.

Flags:
  -daemon
        read this node's daemon log
  -f    follow new output until interrupted

audit

Usage: boxpool audit [--json] [--limit 100] [--before ID]

Shows this head's audit log, newest first. Events are retained for 90 days.
Run on the head; this command uses the local daemon even after login.

Flags:
  -before int
        show events older than this event ID
  -json
        print a JSON array instead of a table
  -limit int
        maximum events to show (1–1000) (default 100)

start

Usage: boxpool start <name>

Starts a stopped sandbox with the disk it had when it stopped.

stop

Usage: boxpool stop <name>

Stops a sandbox. Its disk and its CPU, memory and disk reservation are kept.

pause

Usage: boxpool pause <name>

Pauses a running sandbox: saves its memory and stops its VM until resume.
On Docker, pause stops the sandbox and its memory is lost.

resume

Usage: boxpool resume <name>

Resumes a paused sandbox where it left off. One that pause had to stop
boots from its disk.

rm

Usage: boxpool rm [--force] <name>

Deletes a stopped sandbox and frees its resources: process, disk, network
and reservation.

Flags:
  -force
        stop the sandbox first if it is running

snapshot

Usage:
  boxpool snapshot <sandbox> --name <snapshot>
  boxpool snapshot ls [--json]
  boxpool snapshot rm <snapshot>

Saves a copy of a sandbox's disk; boxpool sh --from <snapshot> starts new
sandboxes from it, on this machine. A running sandbox is stopped for the
copy and started again, so its processes are restarted. A paused one is
refused.

Flags:
  -name string
        name for the snapshot

snapshot ls

Usage:
  boxpool snapshot <sandbox> --name <snapshot>
  boxpool snapshot ls [--json]
  boxpool snapshot rm <snapshot>

Saves a copy of a sandbox's disk; boxpool sh --from <snapshot> starts new
sandboxes from it, on this machine. A running sandbox is stopped for the
copy and started again, so its processes are restarted. A paused one is
refused.

Flags:
  -json
        print a JSON array instead of a table

desktop

Usage: boxpool desktop [--no-open] <sandbox>
       boxpool desktop rm <sandbox>

On the head: starts the sandbox's desktop, prints an authenticated HTTPS
viewer URL and opens it in your browser. Requires the desktop image and the
same Tailscale setup as expose. The viewer starts read-only; Take over enables
mouse and keyboard. rm closes the URL and revokes its token.

expose

Usage:
  boxpool expose <sandbox> <port> [--public]
  boxpool expose ls
  boxpool expose check
  boxpool expose rm <sandbox> <port>

On the head: prints an HTTPS URL, on its tailnet, for a TCP port in a
sandbox on any node of the pool. It needs Tailscale on the head, with
MagicDNS and HTTPS certificates enabled for the tailnet; open the URL
from any device on the tailnet, such as a phone with the Tailscale app.

The URL carries an expose token: opening it once sets a cookie, and
without either the URL answers 401. --public serves it with no token.
rm closes the URL and revokes its token.

Flags:
  -public
        serve the URL to the tailnet without a token
Edit this page on GitHub ↗