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.

Install

curl -fsSL https://get.microsandbox.dev | sh
microsandbox requires Linux with KVM enabled, or macOS with Apple Silicon (M-series chip). Both use hardware virtualization.

Quick reference

# Run a one-off command (ephemeral, auto-removed)
msb run python:3.11 -- python -c "print('Hello!')"

# Interactive shell (auto-detects TTY)
msb run alpine:latest -- sh

# Create a persistent sandbox
msb run --name devbox ubuntu:22.04 -- bash

# Resume later
msb start devbox
msb shell devbox

# Execute in a running sandbox
msb exec devbox -- ls -la /app

# Manage
msb ls                   # List all sandboxes
msb ps                   # Running sandboxes only
msb inspect devbox       # Detailed info
msb stop devbox          # Graceful shutdown
msb rm devbox            # Remove stopped sandbox

# Images
msb pull python:3.11     # Pre-pull to cache

# Volumes
msb volume create data --size 10G
msb volume ls
msb volume rm data
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.

Global options

FlagDescription
--treeDisplay the complete command tree with descriptions
--errorShow only errors
--warnShow warnings and errors
--infoShow info, warnings, and errors
--debugShow debug output
--traceShow all output including trace

Command tree

Use --tree as an alternative to --help to see every command, subcommand, and flag at once:
msb --tree
You can scope it to a specific subcommand:
msb image --tree    # Show only image commands
msb volume --tree   # Show only volume commands
msb run --tree      # Show all flags for run
For detailed command reference, see Sandbox Commands, Volume Commands, and Image Commands.