Example scripts for vmux. Run Python in the cloud.
uv tool install vmux-cli
vmux loginvmux run python hello.pyA 5-second sanity check that prints the working directory, lists files, and counts to 5. Good for verifying your setup works.
vmux run -d python epoch_counter.pyThe -d flag works like Docker - it detaches from the container and lets the job run in the background. You can close your laptop and the job keeps running.
vmux ps # like docker ps
vmux logs -f <job_id> # like docker logs -f
vmux attach <job_id> # like docker attach, but it's tmux (may take a few seconds to load)
vmux stop <job_id> # like docker stopvmux run -p 8000 python burrow.py
vmux run -dp 8000 python burrow.py # detached + portThe -p flag exposes a port and gives you a preview URL like https://<job_id>.purr.ge. WebSockets are proxied automatically.
Burrow is a production-style FastAPI demo that shows WebSocket broadcasting, Server-Sent Events, a real-time metrics dashboard, and graceful shutdown handling.
vmux run -p 8000 python collab-terminal/server.pyA shared bash session where multiple users connect to the same PTY via WebSocket. Anyone with the preview URL can join and type commands.
vmux run python netprobe.pyA network analytics tool that measures latency, jitter, and packet loss to Cloudflare, Google, and AWS endpoints. It runs periodic speed tests and displays results in a live dashboard.
vmux run python train_arithmetic.pyTeaches a 1B-parameter LLM to add numbers using reinforcement learning. You can watch the reward climb from ~0.66 to 1.0 as the model learns.
vmux run -d python train_llama.pyFine-tunes Llama-3.1-8B on instruction-following. This is a longer job so you'll want to run it detached.
Both examples require a Tinker API key:
vmux secret set TINKER_API_KEYvmux run python train.py # like uv run, but in the cloud
vmux run -d python train.py # detached, like docker -d
vmux run -p 8000 python server.py # expose port, get preview URL
vmux run -dp 8000 python server.py # detached + port
vmux ps # list running containers
vmux logs -f <id> # follow logs
vmux attach <id> # back in your tmux session
vmux stop <id> # stop container
See vmux.sdan.io for documentation.
