Skip to main content
The msb CLI lets you create, manage, and interact with sandboxes from the terminal. It auto-detects TTY and interactivity, so no -it flags are needed. If your terminal is interactive, msb acts accordingly. The same CLI drives microsandbox cloud when an API key is set. A few commands are local-only or limited on cloud, including image-cache commands, msb metrics, bounded msb logs, msb ssh serve, and disk-sized volume creation. Individual pages flag these commands, and the cloud compatibility section summarizes them.

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:

Quick reference

Unnamed sandboxes (no --name flag) are ephemeral. They’re automatically removed when the command finishes. Named sandboxes persist and can be stopped, restarted, and inspected later. Names must be non-empty and no longer than 128 UTF-8 bytes.

Global options

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:
Then restart your shell.

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:
For detailed command reference, see Sandbox commands, SSH commands, Volume commands, and Image commands. For the SSH model and usage patterns, see SSH.