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.
curl -fsSL https://install.microsandbox.dev | sh
On Linux and macOS, the installer 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 Windows, use PowerShell; Windows support is currently in preview, and Windows 11 is the tested path.
microsandbox requires glibc-based Linux with KVM enabled, macOS with Apple Silicon (M-series chip), or Windows 11 with Windows Hypervisor Platform enabled. Local sandboxes use hardware virtualization. See Linux troubleshooting, macOS troubleshooting, or Windows troubleshooting for platform-specific notes.
# Run a one-off command (ephemeral, auto-removed)msb run python -- python -c "print('Hello!')"# Interactive shell (auto-detects TTY)msb run alpine -- sh# Create a persistent sandboxmsb run --name devbox ubuntu -- bash# Resume latermsb start devbox# Execute in a running sandboxmsb exec devbox -- sh -c "apt update && apt install -y cowsay && /usr/games/cowsay \"Hello from devbox\""# Managemsb ls # List all sandboxesmsb ps # Running sandboxes onlymsb metrics # Live CPU/memory/network statsmsb inspect devbox # Detailed infomsb logs devbox # Captured stdout/stderr (works on stopped sandboxes too)msb logs devbox -f # Follow livemsb stop devbox # Graceful shutdownmsb rm devbox # Remove stopped sandbox# SSHmsb ssh authorize --file ~/.ssh/id_ed25519.pubmsb ssh devboxmsb ssh devbox -- uname -amsb ssh serve devbox --host 127.0.0.1 --port 2222# Imagesmsb pull python # Pre-pull to cachemsb images # List cached imagesmsb rmi python # Remove a cached image# Volumesmsb volume create data --size 10Gmsb volume lsmsb volume rm data# Install as a system commandmsb install ubuntu # Install as 'ubuntu' commandmsb uninstall ubuntu # Remove installed command# Self-managementmsb doctor # Alias for 'msb self doctor'msb doctor --fix # Try supported host setup fixesmsb self doctor # Check runtime files and supported host prerequisitesmsb self update # Update msb to latestmsb self downgrade 0.6.0 # Downgrade to a supported older releasemsb self uninstall # Remove msb
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.