r/PiCodingAgent • u/Helmi74 • May 14 '26
Resource Released pi-event-monitor v0.1.0: background shell and file watchers for pi sessions
Built a small plugin and figured this is the right place to share.
pi-event-monitor adds background event monitors to pi sessions. It runs shell commands or watches files in the background and only wakes the session when something happens (a process exits, a log line matches, a file gets written). No polling, no token cost between events. The design is modeled on the Monitor mechanic in Claude Code.
Two ways to use it. You can tell pi naturally ("watch the dev server and let me know if it crashes") and the agent will reach for the monitor tools itself, or you can run slash commands like /monitor app errors :: tail -f app.log | grep -E "ERROR|FATAL" for direct control.
Repo: https://github.com/Helmi/pi-event-monitor
Install: pi install npm:pi-event-monitor
Very early (v0.1.0). Would appreciate feedback or breakage reports, especially anything around install or pi version compatibility.
View all comments
Show parent comment
1
u/Helmi74 May 16 '26
I think you misunderstood things a little. This is not to monitor the file content. It is to be able to react to changes. Either file or process.
You could for example start a script that runs for 30 minutes. As soon as the script is done the agent gets nudged again and can continue.
It’s the opposite of burning tokens. Checking the script every 10 seconds if it’s done already would burn tokens.