CLI
snapshots
storage snapshots lists every snapshot on the selected adapter. Human mode prints one id per line; JSON mode emits the full SnapshotInfo[] ({ id, name?, createdAt }):
storage snapshots
# snap-0193abc1234567890abcdef
# snap-0193def0123456789abcdef
storage snapshots | jq '.[].id'
# "snap-0193abc1234567890abcdef"
# "snap-0193def0123456789abcdef"
Flags
--adapter <name>(required, or setSTORAGE_ADAPTER).--json/--no-json— force JSON or human output.
Create and remove
The write surface lives under storage snapshot (singular) — explicit verbs make the intent unambiguous:
storage snapshot create # take a snapshot, returns SnapshotInfo
storage snapshot create --name pre-deploy # attach a human-readable name
storage snapshot rm snap-0193abc1234567890 # delete by id (idempotent)
snapshot rm is a no-op when the id doesn’t exist — the underlying adapter contract is idempotent delete.
Reading from a snapshot
The four read commands (ls, stat, cat, sign) accept --snapshot <id> to redirect the read into a snapshot instead of base storage:
storage ls photos/ --snapshot snap-0193abc1234567890abcdef
storage stat photos/cat.jpg --snapshot snap-0193abc1234567890abcdef
storage cat photos/cat.jpg --snapshot snap-0193abc1234567890abcdef > local.jpg
storage sign downloads/report.pdf --snapshot snap-0193abc1234567890abcdef
Write commands (cp, mv, rm) reject --snapshot — snapshots are read-only. Use --fork instead.
Composing with --fork
--snapshot composes with --fork (see forks). Fork is applied first, so --fork X --snapshot Y reads from a snapshot taken inside the fork:
storage ls --fork experiment-a --snapshot snap-0193abc1234567890abcdef