npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@slix/pi-file-tracker

v0.1.2

Published

Widget that tracks files edited by the agent and shows per-file diff stats above the input

Downloads

403

Readme

@slix/pi-file-tracker

A persistent widget for the pi coding agent that sits above the text input and lists every file the agent has touched during the session — created, edited, or deleted — updated in real time.

pi-file-tracker widget showing edited files with diff stats

Install

pi install npm:@slix/pi-file-tracker

Activates automatically — no configuration needed. Run /reload if pi is already open.

What it shows

── Edited files (3/9) ────────────────────────────────────────────
   | app.ts | src ✎3                                    +42 -7
 ✚ | new.json | config ✎1                               +12 -0
 ✖ | old-utils.ts | src
  … 6 older files hidden  ·  /file-tracker all

Files are listed newest-first (most recently touched at the top). When the count exceeds the configured limit a dim footer shows how many older files are hidden.

| Element | Meaning | |---------|---------| | (3/9) | 3 shown out of 9 total tracked this session | | +N (green) | Lines added across all edits to that file | | -N (red) | Lines removed (always shown, 0 if none) | | ✎N (yellow) | Number of separate edit/write operations | | (green) | File was created new during this session | | (red) | File was deleted during this session |

Stats are right-aligned to the terminal edge. Filenames are shown bold, followed by the parent directory path.

What gets tracked

Every file change the agent makes is captured, regardless of how it happens:

| Source | What's detected | |--------|----------------| | edit tool | Exact diff via pi's EditToolDetails | | write tool | LCS diff against the previous file content | | bash tool | Full filesystem snapshot diff — catches sed -i, cp, mv, touch, output redirections, rm, and anything else |

The bash tracking takes a directory snapshot before and after every shell command, so no file operation is missed.

Commands

| Command | Effect | |---------|--------| | /file-tracker | Toggle the widget on/off | | /file-tracker chars | Switch between line-count and character-count display | | /file-tracker clear | Reset the tracked files list | | /file-tracker all | Toggle show-all mode — reveal every tracked file regardless of the limit | | /file-tracker limit <N> | Set a custom visible-file limit (default: 8); also exits show-all mode |

File limit

By default only the 8 most recently touched files are shown. This keeps the widget compact during long sessions without losing history.

  • Use /file-tracker all to temporarily expand to the full list (the header will drop the / counter, e.g. Edited files (9)).
  • Use /file-tracker limit 20 to raise the cap permanently for the session.
  • When the limit is active and there are hidden files, the footer shows … N older files hidden · /file-tracker all.

The limit and show-all state are both persisted to the session file, so they survive restarts.

Session persistence

State is saved to the session file after every change via pi.appendEntry, so the file list survives restarts and session resumes. It is also branch-aware: navigating the session tree with /tree rebuilds the list from the active branch, so the widget always reflects only the files touched on the current conversation path.