Work in a sandbox
Create a sandbox when you need state between commands: installed packages, files, a running server. A sandbox keeps its disk until you delete it, across stops and daemon restarts.
Before you begin, install kumoba and start kumobad.
Create and start a sandbox
-
Create a sandbox from the
defaultimage. A label makes it easy to find again:id=$(kumoba create --image default --labels project=demo -q)-qprints only the id. A new sandbox is stopped. -
Start it:
kumoba start "$id" -
Find it later by its label:
kumoba list --label project:demoA filter is written
key:value, notkey=valueas on create.
Run commands
For an interactive terminal, use kumoba shell. For single commands:
kumoba exec "$id" -- pip install requests
kumoba exec "$id" --cwd /workspace --env DEBUG=1 -- python3 app.py
kumoba exec "$id" --user kumoba -- whoamiCommands run as root unless you pass --user. The default image has a kumoba user, which owns the desktop.
Background processes. exec stops every process the command started when the command ends. To leave a server running, start it with setsid:
kumoba exec "$id" -- sh -c 'cd /workspace && setsid python3 -m http.server 8000 > /dev/null 2>&1 < /dev/null &'Move files in and out
kumoba write-file "$id" --path /workspace/data.csv content=@./data.csv
echo 'print("hi")' | kumoba write-file "$id" --path /workspace/hi.py
kumoba list-files "$id" --path /workspace
kumoba read-file "$id" --path /workspace/out.png -o out.pngcontent=@file reads a local file. Without it, write-file reads stdin. Missing parent directories are created as --user, or as root without it, so --path /workspace/src/app/main.py works without a mkdir first. With --user, the file commands have the permissions exec --user has, supplementary groups included. Files has the owner, group and mode of created directories and the limits.
Stop, restart and delete
kumoba stop "$id" # the VM shuts down, the disk stays
kumoba start "$id" # boots again with the same disk
kumoba delete "$id" # removes the sandbox and its diskA sandbox created with the CLI keeps running until you stop it. Pass --auto-stop-minutes 15 to stop it after 15 idle minutes (the SDK's default), and --auto-delete-minutes 60 to have kumobad delete it an hour after it stops.
kumobad records each sandbox being created, started, stopped and deleted, with the exact time and why it stopped, and keeps that for 72 hours, also after the sandbox is deleted:
kumoba eventsPass the nextCursor it prints as --cursor to see only what happened since. A stopped sandbox's kumoba get shows stoppedAtMs, also after kumobad restarts.
To move a stopped sandbox to another host, export it there and import it:
kumoba export "$id" -o sandbox.kumoba
KUMOBA_URL=https://other-host:7788 kumoba import content=@sandbox.kumobaThe archive holds the disk, labels and settings; the new sandbox arrives stopped with a new id. Under a fleet, kumobad fleet move does both steps and deletes the original.
To delete every sandbox:
for id in $(kumoba list -q); do kumoba delete "$id"; doneLast updated on
Run code once
Run one command in a fresh VM sandbox with kumoba run and get its output and exit status, with optional network limits, timeouts and CPU or memory caps.
Use kumoba from your coding agent
Install the kumoba agent skill so coding agents like Claude Code, Codex and Cursor can run sandboxes, limit the network, use secrets and drive the desktop.