@pi-plugins/checkpoint

File checkpoints for pi-agent: restore files on /tree navigation.

Packages

Package details

extension

Install @pi-plugins/checkpoint from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@pi-plugins/checkpoint
Package
@pi-plugins/checkpoint
Version
0.1.0
Published
Jul 10, 2026
Downloads
148/mo · 148/wk
Author
kedom1337
License
MIT
Types
extension
Size
41 KB
Dependencies
2 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./dist/index.mjs"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@pi-plugins/checkpoint

A pi-agent extension that keeps /tree conversation navigation and the files on disk in sync via lightweight file checkpoints.

Install

pi install npm:@pi-plugins/checkpoint

For a one-off run without adding it to settings:

pi -e npm:@pi-plugins/checkpoint

For local development, load it straight from this directory:

pi -e ./plugins/checkpoint

How it works

Snapshots use a shadow git repository (a separate GIT_DIR under <agent-dir>/checkpoints/) pointed at your worktree.

  • A snapshot is just a git write-tree of the shadow index — no commits, no refs, and your real .git is never touched.
  • Every turn is bracketed by a before/after snapshot pair: navigating to a user message restores the files the prompt originally ran against (including manual edits made between turns), while navigating to the end of a turn restores the files as that turn left them.
  • Your .gitignore files are respected, so node_modules and build output never enter the shadow repository.
  • Tree hashes are persisted as hidden custom entries in the pi session file, so restore works across pi --resume.

Cleanup

Run /checkpoint-cleanup to delete the stored file checkpoint history for the current worktree. After confirmation, the plugin records the current files as a fresh baseline and continues checkpointing normally. Conversation history is not deleted, but older conversation points can no longer restore their files.