The address changes
A box is declared by name and resolved on every command. An IP never appears in your config or your scripts.
Open source · MIT · Python standard library only
Throw-away build machines get wiped without notice: new host key, new address,
no toolchain. rbox hides all three, so a reset costs one automatic restore
instead of an afternoon.
# box-a was wiped overnight. The same command still works: # rbox detects the reset, restores the toolchain, then runs. $ rbox exec box-a . -- cargo test # or freeze it now, deliver when the box is back, and disconnect $ task=$(rbox submit box-a . -- cargo build --release) $ rbox resume "$task" $ rbox task "$task" --wait
A box is declared by name and resolved on every command. An IP never appears in your config or your scripts.
With the default Tailscale SSH transport the tailnet
authenticates the machine. A new identity is reported as a reset, not as a
known_hosts warning to click through.
Each box lists its packages and tools in one TOML file. rbox ensure restores
them idempotently, and work commands run it for you after a reset.
rbox submit freezes the checkout and command locally;
rbox resume delivers them once the box is reachable. The box runs the task
without the client. Status, logs and declared output files are fetched later by task id.
If a box is lost mid-job, rbox reconnects to the original job and returns its real exit code. When the outcome cannot be known it says so with a dedicated exit code instead of running your command twice.
Checkouts travel as small Git bundles plus your staged and unstaged edits. Later syncs send only new commits. Submodules follow at their checked-out commit.
Build targets are shared per repository with a lifetime and a size cap. An hourly loop and admission-time checks reclaim expired work before a build runs out of space.
The box needs an SSH-capable transport and Python 3.11. rbox streams its own helper scripts over the connection and runs them as an unprivileged build user, with no init system.
Python standard library only, no build step, no file over 300 lines. Clone it, link one script onto your PATH, and it runs.
Using a coding agent? Paste this into it. The agent installs rbox, writes the config with you, and from then on runs builds and tests on your boxes instead of your laptop.
Set up rbox (https://github.com/sunoj/rbox) on this machine and use it for builds and tests. 1. Install: clone the repository, then symlink its bin/rbox into a directory on my PATH (for example ~/.local/bin). It needs Python 3.11+ and git; there is nothing to build. 2. Read README.md and docs/configuration.md in the clone before changing anything. 3. Ask me which boxes to use and how each is reached (Tailscale by default; Instabox, Simular and Colab are also supported). Write ~/.config/rbox/boxes.toml starting from examples/boxes.toml. Never put an IP address or a secret in that file; secrets go in separate one-line files with mode 0600. 4. Run `rbox doctor`, then `rbox ensure <box>` for each box and `rbox list`. Show me the output and stop if anything fails. After setup, run heavy commands on a box instead of locally: - Short work: `rbox exec <box> . -- <command>` streams the log and exits with the job's code. - Long work: `task=$(rbox submit <box> . -- <command>)`, `rbox resume "$task"`, `rbox task "$task" --wait`, then `rbox task-log "$task"`. Keep the task id. - Exit code 76 means the box was lost and the job's outcome is unknown. Do not rerun the command on your own; tell me and ask. - Use `rbox <command> --help` for options, and never address a box by IP.
Needs Python 3.11+ and git on macOS or Linux, plus a Debian,
Ubuntu or Arch box. These steps use the default transport: a logged-in tailscale
CLI and a box on the same tailnet with Tailscale SSH enabled. Tailscale is optional; see
box types for the others.
$ git clone https://github.com/sunoj/rbox.git $ mkdir -p ~/.local/bin $ ln -s "$PWD/rbox/bin/rbox" ~/.local/bin/rbox $ rbox doctor
# ~/.config/rbox/boxes.toml [[box]] name = "box-a" # the box's Tailscale hostname, never an IP packages = ["build-essential", "git", "rsync", "pkg-config", "libssl-dev"] tools = { rust = "stable" }
$ rbox ensure box-a $ rbox list
# stream the log and exit with the job's code $ rbox exec box-a . -- cargo test # or submit a durable task and collect it later $ task=$(rbox submit box-a . -- cargo build --release) $ rbox resume "$task" $ rbox task "$task" --wait $ rbox task-log "$task"
Tailscale is the default transport, not a requirement. Each box picks its own.
| Transport | Trust | Use it for |
|---|---|---|
tailscale | full | Any Debian, Ubuntu or Arch host on your tailnet. The default. |
tailscale + devin | full or low | A Devin session VM, kept awake through the Devin API. |
instabox | low | Machines reached with a dedicated SSH identity, no tailnet. |
simular | low | Machines reached through the vendor CLI with verified streams. |
colab | full or low | Google Colab runtimes, CPU or a declared GPU. |
Low-trust boxes accept only allowlisted repositories and environment names and receive scanned depth-1 snapshots.
boxes.toml.
Resolution and identityNames, reset detection, stable DNS names.
Environment restoreDeclared packages, tools and bootstrap.
Running and cleanupJobs, build targets, disk reclamation.
Durable tasksOffline submission, queues, outputs.
ChangelogReleases and upgrade steps.