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

pi-file-watcher

v1.3.1

Published

Watch folders for #pi! comments in source files and send them as prompts to the LLM — aider-style watch mode for pi

Readme

pi-file-watcher

Aider-style watch mode for pi. Watch any folder for source file saves — when a line ending with #pi! is detected, it's automatically sent to the LLM as a prompt.

Install

pi install npm:pi-file-watcher

Usage

Start watching a directory (defaults to . if no path given):

/watch start
/watch start ./src

Then in any source file, add #pi! at the end of a comment line and save:

// refactor this function to use async/await  #pi!
# rename this variable to something descriptive  #pi!
-- optimise this query  #pi!

Pi picks it up instantly and starts working. The marker is automatically removed from the file when the task is complete.

Deferred execution

Add a time annotation after #pi! to schedule the prompt instead of firing immediately:

// refactor this to use async/await    #pi! @5m
// review this file for edge cases     #pi! @2h
// clean up before standup             #pi! @09:30
// come back to this tonight           #pi! @18:00

Relative formats: 30s, 5m, 2h, 1h30m Absolute format: HH:MM local time (schedules next day if already past)

If you save again before the timer fires, the old job is cancelled and re-evaluated from the new file content. Use /watch cancel to cancel manually.

Configuration

Auto-start watching (recommended)

Launch pi and start watching immediately with --watch:

pi --watch ./src
pi --watch ./src --marker "#go!"

Or persist it in your settings file (~/.pi/agent/settings.json for global, .pi/settings.json for project):

{ "flags": { "--watch": "./src", "--marker": "#go!" } }

Extra ignored directories

By default the watcher skips node_modules, .git, dist, build, and a handful of other common output dirs. Add more with --ignore (comma-separated, merged with the defaults):

pi --ignore "tmp,fixtures,__snapshots__"

Or in settings:

{ "flags": { "--ignore": "tmp,fixtures" } }

Persistent marker

Set your preferred marker once via CLI flag — pi remembers it across sessions:

pi --marker "#go!"

Or add it to your settings file:

{ "flags": { "--marker": "#go!" } }

Runtime marker change

Change the marker for the current session only:

/watch marker #go!

Commands

| Command | Description | |---|---| | /watch start [path] | Start watching a directory (defaults to .) | | /watch stop [path] | Stop watching one or all directories | | /watch status | Show watched paths, marker, and pending deferred jobs | | /watch marker <marker> | Change the trigger marker for this session | | /watch cancel [path] | Cancel pending deferred job(s) |

How it works

When a trigger fires, the file watcher closes immediately — the OS drops any events that arrive while the LLM is processing. After the LLM finishes its turn, the watcher restarts fresh. This means no storage, no seen-set, no extra files — the OS kernel provides the deduplication guarantee. The same approach used by aider.

The LLM is also instructed to remove the #pi! marker from the file as part of completing the task, preventing accidental re-triggers on subsequent saves.

License

MIT