checkpoint command manages file-level checkpoints using shadow git — save, list, diff, restore, and rewind workspace snapshots.
All
checkpoint subcommands respect checkpoints.storage_dir from your project config (agents.yaml). This means praisonai checkpoint list, restore, and diff operate on the same store as praisonai code --checkpoints sessions and praisonai run auto-checkpoints.Quick Start
Usage
Save Checkpoint
Expected Output:
List Checkpoints
Expected Output:
Show Diff
Both the
from and to arguments accept a full id, short id, unique prefix, or the alias last / latest.
Restore Checkpoint
A checkpoint id and
--step are mutually exclusive — providing both returns Provide either a checkpoint id/'last' or --step N, not both.
Rewind Checkpoints
Rewind the workspace back N checkpoints from the latest.rewind is the shortest command for undoing the most recent checkpointed change — you don’t need to remember an id.
Expected Output:
rewind vs restore:
restore <id>— you know the exact checkpoint id and want to jump there.rewind [steps]— you just want to undo the last N checkpoints without looking up ids (equivalent torestoreonlist_checkpoints()[steps]).
steps must be >= 1. Passing 0 or a negative value is rejected by the CLI before the service runs.rewind can reach shadow-git commits older than max_checkpoints. The max_checkpoints limit only trims the in-memory listing — the underlying shadow git retains every commit, so rewind N still works even if N > max_checkpoints.Cannot rewind 5 step(s): only 2 checkpoint(s) available— history too short.steps must be >= 1— invalid input.
Delete Checkpoints
Omitting
--yes prompts: Delete all checkpoints? [y/N].
Reference Aliases
Every subcommand that accepts a checkpoint reference (restore, diff, run --restore) supports these forms:
Ambiguous prefix example:
Python API
See Also
- Shadow Git Checkpointing Feature
- Run command — Checkpoint & Rewind —
--restoreand--no-checkpointflags

