Snapshots & branch reset
Save named point-in-time branch snapshots, restore them instantly, or reset any branch back to its parent.
Rewind undoes writes back to any timestamp. Snapshots give you named, explicit
checkpoints on any branch — ideal right before an agent runs a risky backfill, seed script, or
refactor — and branch reset snaps a non-main branch back to its parent's latest state in one
command.
Named snapshots
CLI
# Capture a named snapshot on the current branch (or pass --branch <name>)
npx shipmantis snapshot create before-billing-seed --branch try-billing
# List saved snapshots on a branch
npx shipmantis snapshot list --branch try-billing
# Restore the branch back to a snapshot by its id
npx shipmantis snapshot restore <snapshot-id> --branch try-billingEach snapshot stores a human-readable label (1–80 characters), the schema version at capture time, its byte size, and creation timestamp.
MCP tools
Your agent has three snapshot tools built in:
| Tool | Arguments | What it does |
|---|---|---|
create_snapshot | label, branch | Saves a named point-in-time snapshot of the branch's schema and data. |
list_snapshots | branch | Lists saved snapshots on the branch. |
restore_snapshot | snapshotId, branch | Restores the branch to that snapshot. |
Dashboard
Open the Branches tab in the dashboard to capture snapshots, inspect their schema version and size, and restore any snapshot in one click.
Instant branch reset
Resetting a non-main branch drops its diverged schema and data and re-clones it cleanly from its
parent branch (typically main), or restores a specific snapshot:
# Reset a branch back to its parent's current schema & data
npx shipmantis branch reset try-billing
# Or reset a branch to a specific saved snapshot
npx shipmantis branch reset try-billing --snapshot <snapshot-id>From an agent, call the reset_branch MCP tool with { name: "try-billing" } or
{ name: "try-billing", snapshotId: "..." }.
When to use snapshots vs. rewind
| Need | Use |
|---|---|
| Save a clean state before running a seed script, migration test, or agent experiment | Snapshot (mantis snapshot create) |
| Undo unexpected writes after the fact when you didn't save a checkpoint first | Rewind (mantis rewind --to 30m) |
Sync a stale feature or PR branch back to the latest main | Branch reset (mantis branch reset) |
Restoring a snapshot or resetting a branch replaces that branch's current schema and rows with the
snapshot or parent state. main cannot be reset to a parent because it is the root branch.