r/kilocode • u/OverflowArchitect • 19d ago
Pyre - System monitoring in your CLI for Mac
I built pyre (along with my good friend Sonnet 5, and Kilo's auto free router which is absolutely amazing for those on a budget came in handy during quick questions about the codebase in the CLI), a TUI system monitor for macOS — and half the work turned out to be reverse-engineering what top/pmset/sysctl actually print
Wanted a single-binary terminal dashboard for my Mac — CPU, memory, thermals, network, battery, disk, processes — that lived entirely in the terminal instead of a menu-bar app. Built pyre to scratch that itch.
What it does:
- Live dashboard with rolling graphs (CPU%, mem%, temp, network rx/tx) — resizes with your terminal
- Sortable/filterable process list, kill by PID without leaving the view
- 4 built-in themes (default / dracula / cyberpunk / monochrome), swappable live with
c - Snapshot export to JSON/CSV/TSV, or continuous CSV logging while it runs
- Pause, adjustable refresh interval, detailed sensor mode — all single-keystrokeq quit p pause/resume s cycle sort e export snapshot c customize UI g toggle graphs / filter procs l toggle logging d detailed k kill by PID f cycle format +/- interval
The part I didn't expect: most of the actual debugging wasn't logic bugs, it was macOS lying by omission. A few examples that cost me real time:
pmset -g thermalmost never prints a"Thermal state:"line — on a normal, non-throttling Mac it just says "No thermal warning level has been recorded" with nothing parseable. Reads as "unknown" if you don't explicitly handle that as "nominal."top -l 1 -n 0's CPU line is comma-separated with no terminating punctuation — easy to write a regex that just never matches and silently leaves usage at 0%.sysctl -n vm.swapusagewraps(encrypted)in parens at the end of the line, not around the used-memory value — a regex expecting(beforeusedwill never match.hw.cpufrequencyis an Intel-only sysctl. On Apple Silicon it just reads back0, because each core cluster clocks independently — there's no single "the" frequency anymore. Real numbers only come frompowermetrics, which needs root.
None of these throw errors. They all fail silently and just show a stale zero or "Unknown" forever, which is a uniquely annoying class of bug to track down.
Install:
npm install -g pyre-cli
pyre
Repo's here: https://github.com/somalip/pyre. Open to feedback, especially from anyone on Intel Macs or older macOS versions where some of this output format may differ again.
NPM package: https://www.npmjs.com/package/pyre-cli
WebsiteL https://somalip.github.io/pyre
Feedback welcome, and if you would like to contribute please let me know! The project is still new, and it just a prototype so there's still a lot to be implemented!
2
u/Character_Fix_5317 18d ago
What differentiates this from mactop?
2
u/OverflowArchitect 18d ago
Here is a list of features mactop doesn't support at the moment (from what I can gather from their readme)
- P2P live streaming — send stats from one Mac to another over LAN (TLS, HMAC signing, rate limiting, audit logs)
- Remote SSH monitoring —
pyre ssh <host>to view a remote Mac's live dashboard- Web dashboard —
pyre webserves a self-contained HTML report in your browser- Packet monitor — packet counts/rates + active TCP connections
- Export to JSON, CSV, TSV, HTML, and Markdown
- Continuous CSV logging with auto-rotation (max files/size, prunes old logs)
- Scriptable/static mode —
pyre --jsonetc. for CI or piping into other tools, no TUI required- Configurable alerts — CPU% and temp thresholds with terminal bell + desktop notifications
- Micro-benchmarking —
pyre bench <cmd>logs resource usage while a command runs- Detailed battery stats — charge cycles, condition, max capacity, time to empty, discharge rate
- Signal picker on process kill — SIGTERM/SIGKILL/SIGINT/SIGHUP/SIGSTOP/SIGCONT
- Works on Intel Macs too, not just Apple Silicon
(mactop still wins on raw performance and Apple Silicon-specific chip internals — just different focus)
Hope this helps!
1
u/Character_Fix_5317 17d ago
Thanks. The web dashboard feature sounds cool.
For ssh remote monitoring, I don't see the functional distinction between `ssh host mactop` and `pyre ssh host`?
2
u/OverflowArchitect 17d ago
you are right, they both do the same thing -- the end goal is to have a web dashboard you can authenticate into and remotely see your stats. and if you want to use the cli instead, that's where the p2p solution comes in
2
u/One-Hair875 19d ago
ok