@jc4649/filechanges

pi coding-agent extension: live diff review of every file edit during a session

Packages

Package details

extension

Install @jc4649/filechanges from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@jc4649/filechanges
Package
@jc4649/filechanges
Version
0.1.0
Published
Jun 26, 2026
Downloads
120/mo · 17/wk
Author
jimmyc4649
License
MIT
Types
extension
Size
20.8 KB
Dependencies
1 dependency · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

@jc4649/filechanges

Tracks files changed (modified/created) by pi via the built-in edit and write tools.

Fork notice: forked from pi-config by amosblomqvist (MIT). Credit for the original filechanges extension goes to them; see LICENSE for both copyright lines.

Features

  • Persistent log (stored in session as custom entries)
  • Status line + widget listing changed files
  • /filechanges overlay to inspect diffs
  • /filechanges-accept to clear the log (keep files)
  • /filechanges-decline to revert logged changes (restore original contents / delete created files)

Usage

  1. Reload pi: /reload
  2. Make changes through pi (using edit/write)
  3. Run:
    • /filechanges to inspect
    • /filechanges-accept to accept (clear log)
    • /filechanges-decline to decline (revert)

Non-interactive usage

If ctx.hasUI is false (print/json mode), accept/decline require explicit confirmation:

  • /filechanges-accept force
  • /filechanges-decline force

Notes

  • Only tracks changes performed through edit and write tools.
  • To support “decline”, the extension stores the original file contents (before the first pi change) in the session file as a custom entry.