← Catalog

@johnnywu/pi-filechanges

Tracks files changed by pi via edit and write tools, with a toggleable file changes widget

Package

Install

Install with PiG

pig install npm:@johnnywu/pi-filechanges

Install with Pi

pi install npm:@johnnywu/pi-filechanges
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 1.3.2 (README.md). PiG does not review it.

pi-filechanges

Tracks files changed by pi via the built-in edit and write tools. Shows an optional changes widget with changed files and added/removed line counts.

Highly inspired by amosblomqvist/pi-config/extensions/filechanges.

Capabilities & Limitations

✅ Can track

  • Files changed by the current Agent through the built-in edit and write tools

❌ Cannot track

  • Files changed by the user outside of the Agent (e.g. manual edits in an editor, git checkout, scripts run in a separate terminal)
  • Files changed by other tools or commands (e.g. bash commands that write to files, custom tools that modify files directly)
  • Files changed by sub-agents — each sub-agent runs in its own session and this extension only monitors the current session's tool calls

Install

pi install npm:@johnnywu/pi-filechanges

Commands

CommandEffect
/filechangesToggle the changes widget on/off (default: on)
/filechanges clearClear the tracked changes log without modifying files

Pressing the toggle shortcut does the same as /filechanges without typing the command. While the widget is hidden and there are tracked files, a one-line hint stays in its place (filechanges hidden · alt+f to expand) so the collapsed state is discoverable.

Configuration

Optional. Create ~/.pi/agent/extensions/pi-filechanges.json:

{
  "toggleKey": "alt+f"
}
SettingWhat it doesDefault
toggleKeyShortcut that shows/hides the changes widget, in Pi keybinding form (alt+f, ctrl+shift+t). Set "off" to register no shortcut. Needs /reload to rebind."alt+f"

A missing or malformed file falls back to the defaults. pi-filechanges only reads this file — it never writes one.

alt+f also drives tui.editor.cursorWordRight in Pi's built-in editor keybindings. Set a different toggleKey if you want both.

Development

# Run tests
bun test

# Release (local, requires GH_TOKEN and NPM_TOKEN)
bun run release

This project uses semantic-release with conventional commits.

License

MIT