| name | snapshot-management |
| description | Ralph-town snapshot commands. Use for preflight checks and snapshot creation before reliable sandbox runs. |
Snapshot Management
Quick Reference
Verify snapshot ready: ralph-town sandbox preflight Create
snapshot: ralph-town sandbox snapshot create
sandbox preflight
Verify a snapshot has the tools needed for evals and sandbox command
runs.
ralph-town sandbox preflight
ralph-town sandbox preflight --snapshot my-snapshot
ralph-town sandbox preflight --json
Flags:
--snapshot <name> - Snapshot to test (default: ralph-town-dev)
--json - Output as JSON
What it checks:
/usr/bin/gh - GitHub CLI
/usr/bin/git - Git
/usr/local/bin/pnpm - pnpm package manager
/usr/bin/curl - curl
sandbox snapshot create
Create a pre-baked snapshot with all required tools.
ralph-town sandbox snapshot create
ralph-town sandbox snapshot create --name my-snapshot
ralph-town sandbox snapshot create --force
ralph-town sandbox snapshot create --json
Flags:
--name <name> - Snapshot name (default: ralph-town-dev)
--force - Delete existing snapshot and recreate
--json - Output as JSON
What snapshot includes:
- Base image:
node:22-bookworm-slim
- Tools: git, curl, gh CLI, pnpm
- SDK: @anthropic-ai/claude-agent-sdk
- Working dir: /home/daytona
Build time: ~2-3 minutes
When to Use
- Run
preflight before relying on a snapshot in evals or kept
sessions.
- Run
snapshot create if preflight fails.
- Use
--force to rebuild after tool updates.
SDK Usage
import { Daytona, Image } from '@daytonaio/sdk';
const daytona = new Daytona();
const image = Image.base('node:22-bookworm-slim')
.runCommands(
'apt-get update && apt-get install -y curl git',
'corepack enable && corepack prepare pnpm@latest --activate',
)
.workdir('/home/daytona');
await daytona.snapshot.create(
{ name: 'my-snapshot', image },
{ onLogs: console.log, timeout: 300 },
);
Known Limitation
executeCommand() returns exit code -1 on snapshot sandboxes. Use
SSH-backed ralph-town run or manual SSH instead. See
daytonaio/daytona#2283