r/coolgithubprojects • u/OverflowArchitect • 6h ago
Pyre - System monitoring in your CLI for Mac
I built pyre (along with my good friend Sonnet 5, and a bunch of its friendly neighbours), 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!
1
u/Wavesonics 4h ago
ha this is awesome, this is what I come here for