Loading...
Loading...
Create and manage isolated microVM sandboxes for safe code execution, testing, and development. Use when the user needs to run untrusted code, create isolated environments, execute commands in a sandbox, manage sandbox filesystems, or work with OCI container images in microVMs. Handles sandbox lifecycle, networking, volumes, secrets, and file operations via the msb CLI.
npx skill4agent add superradcompany/skills microsandboxmsb --versionbash scripts/setup.shmsb~/.microsandbox/bin/libkrunfw~/.microsandbox/lib/msb run <image> [options] -- <command>msb run python:3.12 -- python -c "print('hello from sandbox')"
msb run -m 1G node:22 -- node -e "console.log(process.version)"
msb run alpine:latest -- sh -c "uname -a && cat /etc/os-release"msb create --name <name> [options] <image>
msb exec <name> -- <command>
msb shell <name>
msb stop <name>
msb start <name> # Resume a stopped sandbox
msb rm <name># Create a Python development sandbox
msb create --name dev -m 1G -c 2 python:3.12
# Install packages
msb exec dev -- pip install requests numpy
# Run code
msb exec dev -- python -c "import requests; print(requests.get('https://httpbin.org/ip').json())"
# Interactive shell
msb shell dev
# Stop and resume later
msb stop dev
msb start dev
# Clean up
msb stop dev
msb rm dev| Flag | Description | Example |
|---|---|---|
| Name the sandbox | |
| Memory allocation | |
| Number of vCPUs | |
| Mount volume | |
| Publish port | |
| Set env variable | |
| Working directory | |
| Run in background (run only) | |
| Run as user | |
| Set guest hostname | |
| Default shell program | |
| Replace existing sandbox | |
| Override entrypoint | |
| Pull policy | |
| Auto-stop timeout | |
| Idle auto-stop | |
| Mount tmpfs | |
| Inject script | |
msb ls # List all sandboxes
msb ls --running # Running only
msb ps # Show running sandboxes with status
msb ps -a # All sandboxes including stopped
msb inspect <name> # Detailed sandbox info
msb metrics <name> # Live CPU/memory/IO stats
msb stop <name> # Graceful shutdown
msb stop --force <name> # Force kill
msb stop -t 10 <name> # Wait 10s then force kill
msb rm <name> # Remove stopped sandbox
msb rm --force <name> # Stop and remove in one stepmsb pull <image> # Pre-cache an OCI image
msb images # List cached images (alias: msb image ls)
msb image inspect <img> # Image metadata
msb rmi <image> # Remove cached image (alias: msb image rm)msb volume create <name> # Create named volume
msb volume create <name> --size 5G # With quota
msb volume ls # List volumes
msb volume inspect <name> # Volume details
msb volume rm <name> # Remove volume# Bind mount host directory
msb run -v ./project:/app python:3.12 -- python /app/script.py
# Named volume (persistent across sandboxes)
msb volume create mydata
msb run -v mydata:/data alpine -- sh -c "echo 'test' > /data/file.txt"
msb run -v mydata:/data alpine -- cat /data/file.txt# No network access
msb run --no-network python:3.12 -- python script.py
# Block specific domains
msb run --dns-block-domain "ads.example.com" python:3.12
# Inject secrets (placeholder substitution — real value never enters VM)
msb run --secret "OPENAI_API_KEY=sk-xxx@api.openai.com" python:3.12
# TLS interception for secret injection
msb run --tls-intercept --secret "API_KEY=xxx@api.example.com" python:3.12
# Limit connections
msb run --max-connections 10 python:3.12msb registry login ghcr.io --username octocat
msb registry logout ghcr.io
msb registry lsmsb install python:3.12 # Install as 'python' command
msb install --name py python:3.12 # Custom name
msb install --list # Show installed commands
msb uninstall py # Removemsb run--namemsb createmsb run --namemsb rmmsb createmsb run -d--replacemsbsource ~/.bashrc # or ~/.zshrcls ~/.microsandbox/bin/msb
ls ~/.microsandbox/lib/libkrunfw*