CLI reference

August 27, 2026 · View on GitHub

The CLI creates and manages disposable sandboxes. Run smolvm COMMAND --help for the current options on your installed version; this page helps you choose the right command.

Prepare the host

CommandUse it to
smolvm setupInstall or check local runtime dependencies. Add --macos to prepare the macOS desktop runtime.
smolvm doctorCheck whether this machine can run sandboxes. Use --backend vz to check macOS desktop support.
smolvm bridge check BRIDGECheck an existing Linux bridge before connecting a sandbox to it.
smolvm updateUpgrade to the latest stable release.
smolvm pruneRemove stale cached images (alias for smolvm image prune).

On Linux, smolvm setup stores Firecracker—the program that starts a sandbox—in ~/.smolvm/bin. Use --firecracker-dir to choose another folder for one setup run:

smolvm setup --firecracker-dir "$HOME/.local/bin"

Set SMOLVM_FIRECRACKER_DIR when future commands also need to find a folder that is not on PATH. See Install SmolVM for Fedora Atomic and build-machine setup.

Work with sandboxes

Run these in the order you need them:

CommandUse it to
smolvm sandbox createCreate a sandbox. Add --network bridge --bridge BRIDGE only when the sandbox should appear as a separate computer on that network.
smolvm sandbox list / infoFind or inspect sandboxes.
smolvm sandbox shell / sshOpen a shell. shell uses SmolVM's fast control channel when available; ssh explicitly uses SSH.
smolvm sandbox desktopOpen a running macOS sandbox in Screen Sharing. Add --start to start it first.
smolvm sandbox execRun one command inside a running sandbox and print its output — handy for scripts and agents. Put the command after --, e.g. smolvm sandbox exec my-sandbox -- ls -la. Add --start to start the sandbox first if it isn't running.
smolvm sandbox logsShow a sandbox's boot and console logs. Add --follow to keep printing new lines.
smolvm sandbox start / stopStart or stop a sandbox.
smolvm sandbox pause / resumeTemporarily freeze and continue a running sandbox.
smolvm sandbox deleteRemove one or more sandboxes.
smolvm sandbox pruneDelete disks and logs left behind by sandboxes that no longer exist. Add --dry-run to list those files without deleting them. Disks you asked SmolVM to save are kept unless you add --include-saved.

Sandbox data and connections

CommandUse it to
smolvm sandbox file upload / downloadCopy a file in or out.
smolvm sandbox env set / unset / listManage persistent environment variables.
smolvm sandbox port expose / close / listManage local port forwarding.
smolvm sandbox snapshot create / restore / list / deleteSave and restore supported sandbox state.

Start a prepared agent

smolvm codex start, smolvm claude start, smolvm pi start, smolvm hermes start, and smolvm openclaw start create a sandbox and install that agent. See Agent presets.

Manage downloaded images

The first time you start a sandbox or agent, SmolVM downloads the files it boots from and keeps them on disk so later starts are fast. These commands manage that storage, and they work like Docker's image commands if you know those:

CommandUse it to
smolvm image pull <preset>Download an image ahead of time, for example before going offline.
smolvm image pull --allDownload every image available for this machine in one go.
smolvm images (or image list / image ls)See which images are downloaded, when, and how much space they use.
smolvm image inspect <name>See one image in detail: files, checksums, and where it came from.
smolvm image build -t NAME .Build a custom image from a Dockerfile (needs Docker installed).
smolvm image build --os macos --ipsw latest -t NAMEPrepare a reusable macOS image locally from an Apple restore file.
smolvm image save <name> -o FILE / image load -i FILECopy an image to a machine without internet access.
smolvm image rm <name>Remove a downloaded image to free disk space.
smolvm image pruneRemove images left behind by older SmolVM versions.

Images are stored in ~/.smolvm/images. To keep them somewhere else, set the SMOLVM_IMAGE_DIR environment variable — sandboxes read it too, so images you pull are found when a sandbox starts. The --image-dir option points a single smolvm image command at a different folder; sandboxes do not read that folder.

Browser, local services, and Windows

CommandUse it to
smolvm browser start / open / list / logs / stopManage browser sandboxes.
smolvm uiStart the local dashboard.
smolvm server startStart the local HTTP API.
smolvm windows build-imageBuild a Windows qcow2 image.

Shell completion

Turn on tab completion so your shell can finish smolvm commands, options, and the names of your existing sandboxes as you type. One command sets it up:

smolvm completion bash --install   # also works with: zsh, fish

Open a new shell afterward, then type smolvm sandbox ssh followed by a space and press Tab to complete a sandbox name.

Prefer to wire it up yourself? Run the same command without --install to print the script, then load it your own way:

# bash — add to ~/.bashrc
eval "$(smolvm completion bash)"

# zsh — add to ~/.zshrc
eval "$(smolvm completion zsh)"

# fish — create the folder once, then write the completion file
mkdir -p ~/.config/fish/completions
smolvm completion fish > ~/.config/fish/completions/smolvm.fish

Common options

--json is available on commands that return structured output. --backend selects auto, firecracker, qemu, libkrun, or vz where the command supports that runtime. The vz choice is only for macOS guests on Apple Silicon. --boot-timeout controls how long an operation waits for a ready sandbox.

Implementation notes: the command definitions are the source of truth in src/smolvm/cli/commands/app.py, including available flags and help text. The CLI command surface is tested by tests/test_cli.py.