Checkpoint & Resume
Capture a snapshot after install, then resume from it to skip setup on the next run.
snapshot-replay
Demonstrates alineo's checkpoint and resume feature: run once to install dependencies and capture a snapshot, then resume from that snapshot — skipping the install — to run updated code against the same environment.
Setup
bunx alineo-cli init # starts OpenSandbox in Docker (one-time setup)Run
bun install
bun startWhat it does
Initial run
- Creates a Python 3.11 sandbox
- Installs
requestsvia pip - Captures a checkpoint (
after-install) - Runs a script and closes the sandbox
Resumed run
- Calls
client.resume(sandboxId)— boots from the snapshot - The
pip installcall returns cached output instantly (never re-runs) - Runs an updated script on the restored container
Run bun start twice to see the difference: first run takes ~30–60s; the resume takes ~2–3s.