Skip to main content
Interactive sessions are detected automatically; no -it flags are needed. Set an API key to use microsandbox cloud. Each reference page marks local-only commands and cloud limitations.

Install

On Linux and macOS, the install script writes the runtime to ~/.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.
Check your local setup with:

Command forms

Use short commands for everyday work. These forms are equivalent:
Aliases such as 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:
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

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.

Global options

Output formatting

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:
Restart your shell. Regenerate saved completions after upgrading.

Command tree

Use --tree as an alternative to --help to see every command, subcommand, and flag at once:
You can scope it to a specific subcommand:
Limit the depth or hide flags and arguments for a compact command overview:
-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.