pi-monitor
Pi extension for running background processes with live output in a native floating window
Package details
Install pi-monitor from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-monitor- Package
pi-monitor- Version
0.1.0- Published
- Apr 9, 2026
- Downloads
- 173/mo · 10/wk
- Author
- miclivs
- License
- MIT
- Types
- extension
- Size
- 11.4 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
".pi/extensions/monitor"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-monitor
Run background processes with live output in a native floating window — built for pi.
Start a build, a server, a test suite — anything long-running — and watch the output stream in real-time in a native macOS window while you keep working. When it finishes, pi gets notified automatically.
How it works
One tool, everything on disk.
- LLM calls
monitor— starts a background process - A floating terminal window opens — streams stdout/stderr live via Glimpse
- Everything is written to disk — log, pid, exit code
- When the process finishes — pi is notified via follow-up message with the log path
The process lifecycle is fully managed on disk:
/tmp/pi-monitor/<id>/
├── pid # process ID
├── command # the command that was run
├── output.log # combined stdout and stderr
└── exitcode # written when the process finishes
No extra tools needed. Use pi's built-in tools to interact:
- Read output →
read /tmp/pi-monitor/mon-1/output.log - List sessions →
ls /tmp/pi-monitor/ - Kill a process →
kill $(cat /tmp/pi-monitor/mon-1/pid) - Check if done → presence of
exitcodefile means finished
Install
pi install npm:pi-monitor
Or from source:
pi install /path/to/pi-monitor
macOS only. Requires Swift toolchain (ships with Xcode or Xcode Command Line Tools).
Usage
Just ask pi to run something in the background. The LLM calls monitor automatically when appropriate:
- "Run the tests and let me know when they finish"
- "Start the dev server in the background"
- "Build the project and show me the output"
- "Tail the logs while I work on something else"
Tool parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
command |
string | required | The bash command to run |
title |
string | command | Window title |
width |
number | 900 | Window width in pixels |
height |
number | 500 | Window height in pixels |
Window features
- Live streaming — stdout in white, stderr in red
- Auto-scroll — follows output, stops when you scroll up
- Copy button — copies all output to clipboard
- Status indicator — green dot while running, gray on exit 0, red on failure
- Line counter and timer — in the status bar
Completion notification
When a monitored process exits, pi receives a follow-up message with:
- Session ID and exit code
- The original command
- Path to the full log file
This lets pi react — read the log, report results, or start the next step.
Project structure
pi-monitor/
├── .pi/extensions/monitor/
│ └── index.ts # Extension: monitor tool, Glimpse window, disk management
└── package.json # pi-package manifest
Credits
License
MIT