snowglobe

Real programs, sandboxed in your browser.

Each run below is a whole Linux machine, packaged from a Dockerfile and emulated in WebAssembly right in this tab. No server runs it, its only way out is your browser's own requests, and closing it throws the machine away.

Run one here to type into it, or open it in a window of its own. It is a 64-bit ARM CPU in emulation, so it is slower than native; every number and transcript below was measured and recorded when this site was built.

Install snowglobe on Linux (x86-64, arm64) or a Mac with Apple silicon

curl -fsSL https://filipecabaco.github.io/snowglobe/install.sh | sh

It checks the release's checksum and installs into ~/.local/bin, no sudo. Read the script · other ways

Compare the runs

The snapshot is what a run downloads before the machine resumes. Preloaded files follow in the background: everything the run read while booting, or while its commands were exercised. The rest is fetched only if you touch it.

RunSnapshotReady at buildPreloadedOn demandFiles

Make your own

Every run on this page came out of one command. snowglobe is a single Go binary. It builds with Docker, or with no Docker at all from an image in a registry or a saved archive, and the result is a folder of static files you can host anywhere.

Install

$ curl -fsSL https://filipecabaco.github.io/snowglobe/install.sh | sh
# or, with Go
$ go install github.com/filipecabaco/snowglobe/cmd/snowglobe@latest

Describe

Any arm64 Alpine image works. Its CMD, ENV and WORKDIR are what the visitor's terminal gets. Labels say when the program is ready, and which commands to exercise so their files are preloaded. The Python run's Dockerfile, exercise list shortened:

# examples/python/Dockerfile
FROM alpine:3.24.2
RUN apk add --no-cache python3 && \
    python3 -m venv /opt/venv && \
    /opt/venv/bin/pip install --no-cache-dir rich==15.0.0
ENV LANG=C.UTF-8 PATH=/opt/venv/bin:$PATH
WORKDIR /root
CMD ["python3"]
LABEL snowglobe.title="Python + Rich in the browser" \
      snowglobe.ready=">>> " \
      snowglobe.exercise='["from rich import inspect; inspect(str.split)", "1 / 0"]'

Build

It adds a kernel and a 9p boot layer, converts the image, boots it headless until the ready text appears, snapshots it, then types the exercises and measures what they read. With --builder native it needs no Docker: it pulls the image from its registry (or reads a saved archive) and boots it here. An excerpt of the real log from this site's build:

$ snowglobe build examples/python --out dist/python

==> Resolve source image
    command: 'python3'
    ready:   ">>> "
    memory:  512 MB
    network: none
==> Add boot layer
==> Convert to a 9p filesystem
    5984 entries, 157 MB uncompressed, 4842 unique files
==> Assemble page
==> Boot and snapshot
App ready on hvc0 after 46.8s
Saved /out/system/state.bin.zst (14 MB)
Settled after the snapshot (0 files, 2.6s)
Exercising: t = Table("language", "year")… (0 files, 0.7s)
Exercising: Syntax("def fib(n):…", "python") (4 files, 1.1s)
==> Write warm pack
    warm.pack: 4 files, 0.6 MB, in the order a restored machine first read them
    first read by: Syntax…     4 files   0.6 MB
    read only while booting  286 files   4.0 MB  (not packed: fetched on demand)
    never read              4055 files  43.5 MB

dist/python is ready to deploy.

Ship

Preview it locally, then put the folder on any static host. Make it an app people can install and run offline, and let several runs on one host share one blob store. This site is GitHub Pages, built by a workflow running the same commands; every run on it is installable, and each one shares to X as a post that boots it.

# preview at http://localhost:8000
$ snowglobe serve dist/python
# installable, and offline once it has run
$ snowglobe pwa dist/python
# several runs on one host: share one blob store
$ snowglobe pool dist

Run

The same site runs without a browser: in a sandboxed container, or natively with no Docker, where the emulator sandboxes itself (Landlock and seccomp on Linux, Seatbelt on macOS). A session in your terminal, lines piped in as commands, or a long-lived instance that scripts drive with exec. It runs from a folder, from a site's URL (try snowglobe run https://filipecabaco.github.io/snowglobe/python/), or from one tarball on a CDN, and bundle makes it a single executable.

# a session in your terminal; ctrl-] quits
$ snowglobe run dist/python
# from where it's hosted: a site's URL, or one tarball
$ snowglobe pack dist/python -o python.tar.gz
$ snowglobe run https://cdn.example.com/python.tar.gz
# one instance, driven command by command
$ snowglobe run dist/python --name py --detach
$ snowglobe exec py 'sum(range(10))'
45
# no Docker: one file, the emulator and the site
$ snowglobe bundle dist/python -o python
$ echo 'sum(range(10))' | ./python
45

Sandbox

A run is also a sandbox for agents, job runners and CI, on machines without KVM. Jobs run on the guest's own shell beside the app: files in, a command, its output, exit status and files back. A job out of time is killed with everything it started; a run ends at --max-runtime or when its --stop-file appears, and --log-dir keeps a durable record of every job.

# a shell job, whatever the app is
$ snowglobe run dist/python --name box --detach --runtime native
$ snowglobe sh box --timeout 30 'python3 -c "print(6*7)"'
42
$ snowglobe cp ./data box:/root/data
# an isolated Linux machine for an agent, over MCP
$ claude mcp add sandbox -- snowglobe mcp dist/python

In a browser, agents get a page of machines: Supabase, a React app built with Vite, Python, DuckDB and PostgreSQL, all in your tab. An agent changes a web app on Supabase, and you use it live in the page's preview, rebuilt after each change, beside the diffs of what it changed.

Orchestrate

Many machines from one site, still without KVM or root. The daemon restores a site once as a template and forks machines from it in tens of milliseconds, each sharing the memory it doesn't write. Services start machines on a connection, scale to zero when idle and replace the ones that fail a health check, and a fleet file says what should run. Machines reach each other only through links, and have no way out unless their template says so (links). Instances outside the daemon share their snapshot's memory too, mapped from one read-only image. Orchestration in the docs covers all of it.

# a template, and machines forked from it
$ snowglobe daemon --detach
$ snowglobe template add dist/api --name api
$ snowglobe up api --name worker
$ snowglobe sh worker 'uname -m'
aarch64
# behind a port, at zero when idle (the site needs a network)
$ snowglobe service add web --template api -p 8080:8000 --min 0 --idle 5m --health-http 8000/healthz
# or all of it from a snowglobe.toml
$ snowglobe apply

Every command, flag, label and setting is in the docs, with guides to building, networking, running headlessly, driving it from an agent and orchestrating machines.