-it flags are needed.
Set MSB_BACKEND=cloud and MSB_API_KEY to use microsandbox cloud, or select a saved cloud profile with msb context use <name>. Each reference page marks local-only commands and cloud limitations.
Install
~/.microsandbox/ and creates command links in ~/.local/bin/. It does not edit shell startup files. If ~/.local/bin is not on your PATH, the installer prints the command to add it. On macOS, Homebrew provides the same CLI through the official tap. On Windows, use PowerShell. Windows support is currently in preview.
Local sandboxes require Linux with glibc 2.28 or newer and KVM, an Apple Silicon Mac, or an x64 or ARM64 machine running Windows 10 or later with Windows Hypervisor Platform enabled. See Linux troubleshooting, macOS troubleshooting, or Windows troubleshooting for setup help.
Quick start
msb run without --name creates an ephemeral sandbox, removed when its command finishes. Named sandboxes persist. Names must contain 1–128 UTF-8 bytes.
Command forms
Use short commands for everyday work. These forms are equivalent:ls, rm, cp, and mod also work inside sandbox and sbx.
Saved-state operations are grouped under msb snap. The equivalent long form, msb snapshot, is also supported; this documentation uses msb snap consistently:
Snapshot behavior, aliases, and backend support
Snapshot behavior, aliases, and backend support
Omit
--full to save disk state for a fresh boot. The group defaults to the source sandbox’s name, so the first command creates devbox:ready. Full captures, live forks, groups, and archive operations are local-only. Use msb fork devbox --names worker-a worker-b to create children directly from the same live moment. See Snapshots for backend limits and resource bindings. Existing top-level restore and snapshot save/load commands remain supported.Quick reference
Global options
Output formatting
Command results normally go to stdout; progress and diagnostics go to stderr. Use JSON output when a command supports it for scripting.Streams, units, and output exceptions
Streams, units, and output exceptions
Progress, styled action confirmations, warnings, and errors go to stderr. Tables, inspection results, and JSON go to stdout. Empty-list messages retain their command-specific behavior: the registry empty-list message goes to stdout, while listing installed aliases produces no output when none exist. The plain
snapshot reindex completion message also remains on stdout.Indented output uses two spaces, with nested content at four spaces. Human-readable image, snapshot, and volume sizes use binary units (KiB, MiB, GiB, TiB); JSON retains its documented numeric fields.Shell completion
msb completion <shell> prints a completion script for bash, zsh, fish, elvish, or powershell. Write it to the location your shell loads completions from:
Command tree
Use--tree as an alternative to --help to see every command, subcommand, and flag at once:
Tree depth and display rules
Tree depth and display rules
-L N (or --levels N) counts the selected root as level 0, so -L 1 shows its immediate children and -L 0 shows only the root. Omitting the limit shows all levels. At the depth limit, an inline marker such as … 4 subcommands, 2 arguments counts the immediate children that were collapsed; arguments include both flags and positional arguments. Hidden commands and options are excluded, and --commands excludes arguments from both the tree and these counts.--brief omits command and argument descriptions and their alignment padding, while retaining names, aliases, value placeholders, and collapse counts. It works with both -L and --commands.