The Snapshot Hub is forkd’s mechanism for distributing warmed parent snapshots across hosts. Instead of re-baking a snapshot from Docker on every machine (1–3 minutes), you pack a local snapshot into a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/deeplethe/forkd/llms.txt
Use this file to discover all available pages before exploring further.
.forkd-snapshot.tar.zst archive (~23× compression typical), upload it once, and other hosts pull and unpack it in seconds. The result is immediately forkable — no Docker round-trip required.
Pack files include a manifest.toml with per-file SHA-256 checksums. forkd unpack and forkd pull verify every file against the manifest before moving anything into the snapshot directory, so a corrupted download or a tampered pack is caught before it can poison a snapshot.
For v0.5 chain packs, the archive bundles every ancestor link under chain[].files; forkd unpack materializes all links into their respective tag directories in root-to-head order.
forkd pack
Pack a local snapshot into a portable .forkd-snapshot.tar.zst archive. The archive includes manifest.toml with per-file SHA-256 checksums, the snapshot’s memory.bin, vmstate, snapshot.json, and any chain-link files for v0.5 chained snapshots.
After the pack completes, the CLI prints the output file size, uncompressed size, compression ratio, and a suggested next step.
Tag of the local snapshot to pack. Must exist at
$XDG_DATA_HOME/forkd/snapshots/<tag>/.Output file path. Default:
./<sanitized-tag>.forkd-snapshot.tar.zst in the current directory. Short form: -o.Human-readable description recorded in the manifest. Optional. Shown by hub registries and
forkd images when present.Upstream Docker image reference (e.g.
python:3.12-slim). Recorded in the manifest as informational metadata. Does not affect snapshot behavior.forkd push
Pack a local snapshot on-the-fly and upload it directly to a destination URL via HTTP PUT. The pack file is built in a temp directory and removed when the upload completes (or fails). Designed for presigned PUT URLs from S3, R2, or compatible object storage.
Local snapshot tag to pack and push.
Destination URL (positional argument). Must be a presigned HTTP PUT URL. Generate one with:
- AWS S3:
aws s3 presign --method PUT s3://bucket/key.tar.zst - Cloudflare R2: equivalent via the R2 API or
wrangler r2 object put
Optional manifest description written into the pack.
Optional upstream base image annotation.
forkd pull
Download a .forkd-snapshot.tar.zst pack from a URL or an <owner>/<name> hub short form, verify its SHA-256 checksum (when provided by the registry), and unpack it into a local snapshot tag. Equivalent to curl <url> | forkd unpack but with integrity checking and short-form name resolution built in.
Short-form name resolution
Whentarget looks like <owner>/<name> or <owner>/<name>@<version> (no http:// or https:// prefix), forkd resolves it against the hub registry:
- Fetches
registry.jsonfromFORKD_HUB_URL(default:https://raw.githubusercontent.com/deeplethe/forkd/main/registry.json). - Looks up the package
<owner>/<name>and version (@<version>orlatest). - Returns the download URL and expected SHA-256 from the registry entry.
- Downloads the pack and verifies SHA-256 before unpacking.
Download source (positional argument). Accepts:
- HTTPS URL: direct download, no registry lookup (e.g.
https://pub-abc.r2.dev/pyagent.tar.zst) <owner>/<name>: resolves via registry to thelatestversion (e.g.deeplethe/python-numpy)<owner>/<name>@<version>: resolves to a specific version (e.g.deeplethe/python-numpy@v1.0)
Override the local tag name. Default: the tag declared in the pack’s
manifest.toml. When pulling a multi-link chain pack, --tag is rejected (ambiguous — which link gets renamed?).Overwrite an existing local snapshot of the same tag. Without
--force, pull refuses to unpack over an existing tag.Hub base URL for short-form target resolution. Read from the
FORKD_HUB_URL environment variable when set; otherwise falls back to https://raw.githubusercontent.com/deeplethe/forkd/main/registry.json.forkd unpack
Unpack a local .forkd-snapshot.tar.zst file into a local snapshot tag. Verifies every file’s SHA-256 checksum against the manifest before moving anything into the snapshot directory. Refuses on pack-format mismatch or path traversal attempts.
Security model:
- Every file in the archive is verified against its SHA-256 in
manifest.tomlbefore being moved to$XDG_DATA_HOME/forkd/snapshots/<tag>/. - The manifest’s declared
tagfield is validated against the same rules as--tag(pattern[A-Za-z0-9_][A-Za-z0-9._-]{0,63}). A malicious pack that declarestag = "../../etc/x"is rejected before any file is written. - The caller-supplied
--tagis also validated, and overrides the manifest tag. - Extraction happens into a temp directory first; only on successful full verification is the temp directory atomically renamed into the snapshot store. Any error removes the temp directory.
- For chain packs (v2 layout), all links are verified before any are moved. A conflict on one link does not partially unpack others.
Pack file to read (positional argument). Must exist and be a valid
.forkd-snapshot.tar.zst archive.Local tag to register the snapshot under. Defaults to the tag declared in the manifest. For multi-link chain packs,
--tag is rejected — the manifest tags are used verbatim for each link.Overwrite an existing local snapshot of the same tag. Without
--force, unpack refuses to clobber an existing tag. For chain packs, --force applies uniformly to all links.forkd images
List all local snapshots with their on-disk sizes, memory footprint, creation time, and whether a rootfs is present. Reads the snapshot directory directly — does not require the daemon to be running.
Output columns:
| Column | Description |
|---|---|
TAG | Snapshot tag name |
SIZE | Total on-disk size of all snapshot files (memory.bin + vmstate + snapshot.json) |
MEMORY | Size of memory.bin alone (the CoW source the children map) |
CREATED | Age of the snapshot (human-relative, e.g. 3d ago) |
ROOTFS | yes if a rootfs file is referenced in snapshot.json; — otherwise |
forkd snapshot or forkd pull.
Example output:
forkd where to locate snapshot files directly: