pyre-cli 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +195 -494
  2. package/dist/{checkCmd-RKW6QGDR.js → checkCmd-WQAHAUWO.js} +1 -1
  3. package/dist/{chunk-GHRDW646.js → chunk-23YWCI3O.js} +375 -135
  4. package/dist/{service-Q74BBILO.js → chunk-KFPTD266.js} +43 -3
  5. package/dist/{doctor-GYHFTNZQ.js → chunk-KVUMOA6C.js} +7 -6
  6. package/dist/{chunk-53O2RGSL.js → chunk-QM5L43EK.js} +19 -2
  7. package/dist/{chunk-6UHZP4QP.js → chunk-XTOOEKLM.js} +24 -12
  8. package/dist/{collectors-H43PN4PS.js → collectors-JDN5Y7EV.js} +1 -1
  9. package/dist/{completions-JKYEJNGR.js → completions-ZVTNE52B.js} +15 -11
  10. package/dist/{config-GYGJXU2Q.js → config-J4YMADEF.js} +3 -1
  11. package/dist/doctor-LHFW4UJP.js +10 -0
  12. package/dist/firebaseSync-ON3RZ6KX.js +91 -0
  13. package/dist/index.js +4243 -735
  14. package/dist/monitors/platform/windows-ui.ps1 +42 -0
  15. package/dist/{netUsageCmd-WKBTW2YG.js → netUsageCmd-67IBZZYN.js} +2 -2
  16. package/dist/{pipeCmd-7REDBLBU.js → pipeCmd-2N4JPKYE.js} +1 -1
  17. package/dist/{prometheusCmd-PL64BLN5.js → prometheusCmd-LEUM5WCZ.js} +1 -1
  18. package/dist/serveCmd-L7LVJOZN.js +353 -0
  19. package/dist/service-7GIX3YNC.js +16 -0
  20. package/dist/syncCmd-42IRF633.js +246 -0
  21. package/dist/{topoCmd-DU2HHZNH.js → topoCmd-DZ3YS5IL.js} +1 -1
  22. package/dist/{watchdogCmd-UF53JPZB.js → watchdogCmd-6GR4UN6B.js} +7 -7
  23. package/dist/{wizard-TD7BGX6O.js → wizard-JQMQWFAW.js} +1 -1
  24. package/package.json +4 -3
  25. package/parity.md +2 -0
  26. package/src/completions.ts +15 -11
  27. package/src/easy_features.test.ts +149 -0
  28. package/src/firebaseSync.ts +157 -0
  29. package/src/formatters/html_template.ts +3086 -598
  30. package/src/formatters/render.ts +25 -12
  31. package/src/index.ts +516 -23
  32. package/src/live/input.ts +501 -148
  33. package/src/live/render.ts +163 -18
  34. package/src/live/state.ts +52 -2
  35. package/src/live/types.ts +1 -1
  36. package/src/monitors/collectors.ts +3 -10
  37. package/src/monitors/platform/windows-ui.ps1 +42 -0
  38. package/src/monitors/platform/windows.ts +442 -147
  39. package/src/monitors/types.ts +8 -0
  40. package/src/serveCmd.ts +17 -2
  41. package/src/service.ts +49 -0
  42. package/src/state/config.ts +48 -0
  43. package/src/syncCmd.ts +159 -11
  44. package/src/web/dashboard.ts +205 -0
  45. package/dist/serveCmd-2H5VLF3P.js +0 -153
  46. package/dist/syncCmd-A2W3QB3S.js +0 -126
package/README.md CHANGED
@@ -1,585 +1,286 @@
1
- # pyre
2
-
3
- Cross-platform system monitoring CLI for **macOS**, **Linux**, and **Windows**: temps, CPU, memory, disk, battery, GPU, power draw, live dashboard, packet monitor, process management, export, alerts, P2P live data streaming, web dashboard, SSH monitoring, micro-benchmarking, and background service management.
4
-
5
- ![Version](https://img.shields.io/badge/version-5.0.0-blue)
6
- ![macOS](https://img.shields.io/badge/macOS-14%2B-lightgrey)
7
- ![Linux](https://img.shields.io/badge/Linux-x86__64%20%7C%20arm64-orange)
8
- ![Windows](https://img.shields.io/badge/Windows-10%20%7C%2011%20%7C%20Server-blue)
9
- ![Node](https://img.shields.io/badge/node-18%2B-green)
10
- ![License](https://img.shields.io/badge/license-MIT-green)
11
-
12
- > **Note:** things may not work as intended if your firewall settings do not allow inbound connections for P2P streaming or Web dashboard mode.
13
- >
14
- > You can skip init with Enter, but you may encounter some UI bugs. This is being worked on.
15
-
16
- ## Features
17
-
18
- - **P2P live data streaming** — send live system stats to another system over TCP with password authentication, TLS encryption, rate limiting, IP allow/deny lists, audit logging, and HMAC message signing
19
- - **Real-time system stats & per-core CPU** — CPU brand, cores, frequency, load, per-core utilization mini-bars, and overall usage
20
- - **GPU monitoring** — GPU model, VRAM, utilization, temperature, and process count (detailed mode)
21
- - **Power draw monitoring** — CPU watts, GPU watts, and combined power draw via SMC/ioreg
22
- - **Memory monitoring & pressure** — usage, swap, wired, compressed, purgeable, swapins/outs, and kernel VM pressure level
23
- - **Disk I/O throughput & space** — read/write speed per volume and mounted volume space usage
24
- - **Battery & power health** — level, power source, condition, charge cycles, max capacity, health trends, estimated time to empty, discharge rate, power draw in watts
25
- - **Packet monitor** — network packet counts, packet rates, active TCP connections, top network processes
26
- - **Advanced network monitoring** — real-time bandwidth rates (RX/TX bytes/sec), protocol breakdown (TCP/UDP), connection state analysis (ESTABLISHED, LISTENING, TIME_WAIT, CLOSE_WAIT), listening port detection, top remote hosts, per-process network I/O tracking, and GlassWire-style modern TUI panel with sparkline graphs
27
- - **Task list** — running tasks/applications sorted by CPU with PID, user, memory, state, and runtime
28
- - **Thermal state** — CPU temperature via `pmset` and `powermetrics` (sudo for detailed readings)
29
- - **Network** — RX/TX bytes and per-second rates
30
- - **Top processes & search-as-you-type** — live filtering, tree view, sorting by CPU/memory/PID, and process kill with protected PID confirmation guard
31
- - **Interactive live dashboard** — full-screen TUI with keyboard-driven controls, mouse support, configurable panel layout, and tab-based panel navigation
32
- - **Snapshot export** — JSON, CSV, TSV, HTML, or Markdown output formats
33
- - **Continuous CSV logging & Anomaly Digest** — automatic per-tick logging and statistical spike analysis (`pyre anomalies`)
34
- - **Blender render tracking** — automatically detects running Blender background renders, tracks elapsed time, frame progress, completion percentage, render engine, and blend file; fully loggable via CSV/JSON/Markdown exports
35
- - **Visual themes & custom themes** — six built-in color themes plus user-defined JSON theme support in `~/.config/pyre/themes/`
36
- - **Persistent configuration & Profiles** — save themes and thresholds in `~/.config/pyre/config.json`, plus atomic profile management (`pyre profile`)
37
- - **Alert system & webhooks** — configurable threshold alerts with terminal bell, desktop notifications, webhook POST payload execution (`--webhook-url`), and custom shell command execution (`--alert-cmd`)
38
- - **System diagnostic tool (`pyre doctor`)** — check permissions, SMC access, Gatekeeper, SIP status, XProtect definitions, and P2P reachability
39
- - **Security & Ecosystem inspectors** — System Extensions inspector (`pyre extensions`), Homebrew health (`pyre brew`), and Time Machine backup status
40
- - **Accessible plain-text mode** — `--plain`/`--a11y` mode for screen readers and ANSI-free logging
41
- - **Grafana Integration** — ready-to-import Grafana dashboard template (`grafana/pyre-dashboard.json`)
42
- - **History & Snapshot Diff** — query historical CSV log trends (`pyre history`) and compare snapshot files side-by-side (`pyre diff`)
43
- - **Multi-host fleet dashboard** — stream and tile stats from multiple remote Macs (`pyre fleet`)
44
- - **Menu Bar & xbar integration** — generate menu bar plugin script (`pyre xbar`) for continuous background status display
45
- - **Graph mode toggle** — switch between sparkline and bar graph rendering in the live dashboard
46
- - **P2P dashboard panel** — monitor P2P server status and peer events directly from the live dashboard
47
- - **Temperature unit toggle** — switch between Celsius and Fahrenheit display in live mode
48
- - **Hardware & Displays overview** — `pyre info` prints hardware, connected displays, and Time Machine status
49
- - **Remote SSH monitoring** — `pyre ssh <host>` streams a remote Mac's live dashboard locally
50
- - **Web dashboard** — `pyre web` serves an auto-refreshing HTML dashboard with real-time SSE stream on a local port
51
- - **Micro-benchmarking & Energy Cost** — `pyre bench <cmd>` logs resource usage and estimates energy consumption/cost (kWh)
52
- - **Update checker** — `pyre update` checks npm registry for new pyre-cli releases
53
-
54
- ## Installation
55
-
56
- ### npm (macOS, Linux, Windows)
1
+ <p align="center">
2
+ <a href="https://github.com/somalip/pyre">
3
+ <img src="assets/icon.svg" width="96" height="96" alt="Pyre Icon" />
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">pyre</h1>
8
+
9
+ <p align="center">
10
+ <b>Cross-platform system telemetry and diagnostics suite for macOS, Linux, and Windows.</b><br />
11
+ Hardware-level performance metrics, interactive TUI, web dashboards, encrypted P2P mesh, and native macOS window.
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/pyre-cli"><img src="https://img.shields.io/npm/v/pyre-cli.svg?style=flat" alt="npm version" /></a>
16
+ <a href="package.json"><img src="https://img.shields.io/badge/version-10.1.0-blue?style=flat" alt="Version" /></a>
17
+ <a href="#requirements"><img src="https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat" alt="Platforms" /></a>
18
+ <a href="#requirements"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-green?style=flat" alt="Node" /></a>
19
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat" alt="License" /></a>
20
+ </p>
21
+
22
+ <p align="center">
23
+ <a href="#quick-install">Quick Install</a> •
24
+ <a href="#quick-start">Quick Start</a> •
25
+ <a href="#interactive-tui">Interactive TUI</a> •
26
+ <a href="#highlights">Highlights</a> •
27
+ <a href="#native-ui-and-web-dashboard">Native UI &amp; Web</a> •
28
+ <a href="#comparison">Comparison</a> •
29
+ <a href="#keybindings">Keybindings</a> •
30
+ <a href="#cli-reference">CLI Reference</a>
31
+ </p>
32
+
33
+ <br />
34
+
35
+ <p align="center">
36
+ <img src="assets/pyre-tui.svg" alt="Pyre Terminal User Interface" width="100%" />
37
+ </p>
57
38
 
58
- ```bash
59
- npm install -g pyre-cli
60
- ```
39
+ ---
61
40
 
62
- ### curl (macOS & Linux)
41
+ ## Quick Install
63
42
 
64
43
  ```bash
44
+ # macOS / Linux (curl)
65
45
  curl -fsSL https://raw.githubusercontent.com/somalip/pyre/main/install.sh | bash
66
- ```
67
46
 
68
- ### PowerShell (Windows)
47
+ # Homebrew (macOS)
48
+ brew install somalip/pyre/pyre
69
49
 
70
- ```powershell
50
+ # Windows (PowerShell)
71
51
  irm https://raw.githubusercontent.com/somalip/pyre/main/install.ps1 | iex
52
+
53
+ # npm (Global)
54
+ npm install -g pyre-cli
72
55
  ```
73
56
 
57
+ ---
58
+
74
59
  ## Quick Start
75
60
 
76
61
  ```bash
77
- pyre # Static snapshot, all system stats
78
- pyre --detailed # Include sensor / powermetrics detail
79
- pyre --json # JSON output (also --csv, --tsv, --html, --md)
80
- pyre --plain # Plain-text accessible output without ANSI noise
81
-
82
- pyre live # Interactive live dashboard
83
- pyre live --interval 3 --log # Custom refresh interval + auto-logging
84
- pyre live --alert-cpu 80 --alert-temp 85 --temp-unit f
85
-
86
- pyre ui # Launch native macOS UI dashboard
87
- pyre web # Serve auto-refreshing live web portal on localhost
88
-
89
- pyre anomalies --since 7d # Statistical resource spike digest from past CSV logs
90
- pyre doctor # System diagnostics (Gatekeeper, SIP, XProtect, powermetrics)
91
- pyre extensions # System extensions inspector (systemextensionsctl)
92
- pyre brew # Homebrew health summary & cellar size
93
- pyre update # Check for pyre-cli updates
94
- pyre profile save dev # Save active configuration profile
95
- pyre profile load dev # Load configuration profile
96
- pyre info # Concise hardware, display & Time Machine overview
97
- pyre bench "make build" # Benchmark command & estimate kWh energy cost
98
- pyre benchmark # Run a 1-minute CPU benchmark calculating digits of PI
99
- ```
62
+ # Interactive live TUI dashboard with real-time graphs and telemetry
63
+ pyre live
100
64
 
101
- ## Options Reference
65
+ # One-shot instant health summary in plain English
66
+ pyre check
102
67
 
103
- These options apply to both static snapshots and `pyre live`, except where noted.
68
+ # Launch the native macOS Activity Monitor window
69
+ pyre ui
104
70
 
105
- | Option | Description |
106
- |---|---|
107
- | `-j, --json` | Output as JSON |
108
- | `--html` | Output as self-contained HTML |
109
- | `--md` | Output as Markdown |
110
- | `-c, --csv` | Output as CSV |
111
- | `-t, --tsv` | Output as TSV |
112
- | `--plain` / `--a11y` | Plain text output mode without ANSI colors or line-drawing characters |
113
- | `--detailed` | Include detailed system info and sensor readings |
114
- | `--since <range>` | Time range for anomaly digest (e.g. `1d`, `7d`, `yesterday`) |
115
- | `--theme <name>` | Theme for live mode (`default`, `dracula`, `cyberpunk`, `monochrome`, `nord`, `gruvbox`) |
116
- | `--interval <seconds>` | Refresh interval for live mode (default: `2`) |
117
- | `--once` | Show a single static snapshot instead of live feed |
118
- | `--out <file>` | Write snapshot output to a file |
119
- | `--export-dir <dir>` | Directory for live-mode snapshot exports and logs (default: `./pyre-exports`) |
120
- | `--log` | Start continuous CSV logging immediately when live mode starts |
121
- | `--tree` | Show process tree view instead of flat list |
122
- | `--sort <key>` | Sort processes by: `cpu`, `mem`, `pid`, `user`, `command`, `state`, `threads`, `runtime` |
123
- | `--limit <n>` | Max processes in snapshot (`0` = all, default: `10`) |
124
- | `--alert-cpu <pct>` | CPU usage alert threshold (default: `90`) |
125
- | `--alert-temp <c>` | CPU temperature alert threshold in Celsius (default: `95`) |
126
- | `--temp-unit <unit>` | Temperature display unit: `c` or `f` (default: `c`) |
127
- | `--webhook-url <url>` | URL to POST payload to when an alert threshold is triggered |
128
- | `--alert-cmd <cmd>` | Shell command to execute when an alert threshold is triggered |
129
- | `--port <port>` | Port number for web server mode (default: `3000`) |
130
-
131
- ## Commands
132
-
133
- ### Static snapshot & diagnostics
134
-
135
- | Command | Description |
136
- |---|---|
137
- | `pyre` | Show all system stats in a formatted table |
138
- | `pyre --once` | Show a single static snapshot (same as default without live) |
139
- | `pyre --json` | JSON output |
140
- | `pyre --html` | Self-contained HTML report |
141
- | `pyre --md` | Markdown tables |
142
- | `pyre doctor` | Run system diagnostics (permissions, Gatekeeper, SIP, XProtect, P2P network) |
143
- | `pyre extensions` | System Extensions inspector (`systemextensionsctl list`) |
144
- | `pyre brew` | Homebrew health panel (installed formulae, outdated count, Cellar disk size, doctor summary) |
145
- | `pyre blender` | Track active Blender background renders: PID, blend file, engine, frame progress, elapsed time, and completion status |
146
- | `pyre update` | Check npm registry for latest `pyre-cli` release |
147
- | `pyre profile <save\|load\|list> [name]` | Atomic configuration profile management (`~/.config/pyre/profiles/`) |
148
- | `pyre config <show\|reset>` | View or reset persistent configuration file (`~/.config/pyre/config.json`) |
149
- | `pyre completions <zsh\|bash\|fish>` | Generate shell auto-completion scripts |
150
-
151
- ### Hardware overview & history
152
-
153
- | Command | Description |
154
- |---|---|
155
- | `pyre info` | Concise hardware summary (CPU, memory pressure, GPU, battery, displays, Time Machine) |
156
- | `pyre anomalies [--since N]` | Compute z-score anomalies and print plain-language resource spike digest |
157
- | `pyre history [--days N]` | Graph historical resource trends from CSV logs over past N days |
158
- | `pyre diff <file1.json> <file2.json>` | Compare two saved snapshot files side-by-side |
71
+ # Serve a real-time web portal with Server-Sent Events (SSE)
72
+ pyre web
159
73
 
160
- ### Benchmarking & Menu Bar
74
+ # Run statistical z-score anomaly detection over historical telemetry
75
+ pyre anomalies --since 7d
161
76
 
162
- | Command | Description |
163
- |---|---|
164
- | `pyre bench <cmd>` | Log CPU, memory, network, power draw, and estimate kWh energy cost during command execution |
165
- | `pyre benchmark` | Run a 1-minute CPU benchmark calculating digits of PI and score the system |
166
- | `pyre xbar` | Generate an xbar / SwiftBar menu bar plugin script for stats display |
77
+ # Benchmark a command execution and compute real kWh energy cost
78
+ pyre bench "npm run build"
167
79
 
168
- ### Remote & Multi-host monitoring
80
+ # Audit system permissions, sensors, SIP, and diagnostic health
81
+ pyre doctor
82
+ ```
169
83
 
170
- | Command | Description |
171
- |---|---|
172
- | `pyre ssh <host>` | Stream live stats from a remote Mac over SSH |
173
- | `pyre fleet <host1> [host2]...` | Multi-host live dashboard monitoring multiple Macs simultaneously |
84
+ ---
174
85
 
175
- ### Live dashboard
86
+ ## Interactive TUI
176
87
 
177
- | Command | Description |
178
- |---|---|
179
- | `pyre live` | Start the interactive live dashboard |
88
+ Launch with `pyre live` for a responsive, full-terminal dashboard featuring:
180
89
 
181
- ### Web & Native dashboards
90
+ - **Live Sparklines and Histograms**: Real-time 60-second rolling charts for CPU, memory, thermals, and network throughput.
91
+ - **Apple Silicon Cluster Telemetry**: Granular Performance (P-Core) and Efficiency (E-Core) usage, GPU cores, and Apple Neural Engine (ANE) load.
92
+ - **Process Management**: Search-as-you-type fuzzy filtering (`/`), instant tree view hierarchy (`t`), and custom signal dispatch (`k`, `S`).
93
+ - **Visual Customizer (`c`)**: Switch on the fly between 6 built-in themes (`default`, `dracula`, `cyberpunk`, `monochrome`, `nord`, `gruvbox`) or create custom color maps.
94
+ - **Continuous Logging (`l`)**: Seamlessly log rolling telemetry directly to CSV files for replay and historical analysis.
182
95
 
183
- | Command | Description |
184
- |---|---|
185
- | `pyre web` | Serve an auto-refreshing live web portal with real-time SSE stats streaming on localhost (`--port <port>`) |
186
- | `pyre ui` | Launch the native macOS UI dashboard (wraps the web portal in a native window) |
96
+ ---
187
97
 
188
- ### P2P
98
+ ## Highlights
189
99
 
190
- | Command | Description |
100
+ | Capability | Description |
191
101
  |---|---|
192
- | `pyre server` | Detect the local IP and print ready-to-paste commands for starting a P2P server and connecting a client on the same LAN (default port `9876`, default password `mysecret`) |
193
- | `pyre p2p server` | Start a P2P server that streams live stats to authenticated peers |
194
- | `pyre p2p connect` | Connect to a P2P server and display live stats |
195
-
196
- See [P2P Live Data Streaming](#p2p-live-data-streaming) below for the full option set.
102
+ | **Deep Hardware Probes** | Granular Apple Silicon P/E cluster utilization, SMC thermals, per-core CPU breakdown, GPU VRAM, battery cycle health, and real-time power draw in watts. |
103
+ | **Interactive TUI & Themes** | Rolling sparklines, process trees, full mouse navigation, and 6 built-in color schemes with custom panel configuration. |
104
+ | **Native macOS App Mode** | High-performance native macOS liquid-glass dashboard window (`pyre ui`) with draggable frames, widget mode (`--compact`), and floating window support (`--ontop`). |
105
+ | **Live Web Portal** | Zero-latency browser dashboard (`pyre web`) powered by Server-Sent Events (SSE), Chart.js visualizers, and responsive dark theme. |
106
+ | **Encrypted P2P Streaming** | Directly stream live telemetry across nodes over TCP with TLS encryption, SHA-256 handshake challenge-response, and HMAC-SHA256 message signing. |
107
+ | **Fleet & SSH Aggregation** | Monitor remote nodes over SSH (`pyre ssh <host>`) or aggregate hundreds of servers into an auto-tiled overview (`pyre fleet`). |
108
+ | **Socket & Packet Forensics** | Track socket connection states (`ESTABLISHED`, `LISTENING`, `TIME_WAIT`), top remote hosts, and per-process network bandwidth. |
109
+ | **AI Anomaly Explanation** | Explain performance spikes and thermal throttles in plain English using local Ollama models or OpenAI (`pyre explain`). |
110
+ | **Multi-Format Export** | Export instant snapshots to JSON, CSV, TSV, HTML, or Markdown reports, plus an importable Grafana dashboard template. |
197
111
 
198
112
  ---
199
113
 
200
- ## P2P Live Data Streaming
114
+ ## Native UI and Web Dashboard
201
115
 
202
- Send live system stats to another system over a TCP connection with password authentication. The server streams `StatsData` snapshots to authenticated peers at the configured interval. You can also start or stop the P2P server from the live dashboard by pressing `r`.
116
+ ### Native macOS Window (`pyre ui`)
203
117
 
204
- ### Server options
118
+ Run Pyre as a standalone macOS desktop application without third-party heavyweight runtimes:
205
119
 
206
120
  ```bash
207
- pyre p2p server --p2p-host 0.0.0.0 --p2p-port 9876 --p2p-password mysecret
208
- ```
121
+ # Standard floating window
122
+ pyre ui
209
123
 
210
- | Option | Description |
211
- |---|---|
212
- | `--p2p-host <host>` | Bind address (default: `0.0.0.0`) |
213
- | `--p2p-port <port>` | Port number (default: `9876`) |
214
- | `--p2p-password <password>` | Password for authentication (required) |
215
- | `--interval <seconds>` | Data refresh interval (default: `2`) |
216
- | `--detailed` | Include detailed sensor readings |
217
- | `--p2p-cert <file>` | TLS certificate file (PEM) for encrypted connections |
218
- | `--p2p-key <file>` | TLS private key file (PEM) for the server |
219
- | `--p2p-ca <file>` | TLS CA certificate file (PEM) — required by clients using `--p2p-tls` |
220
- | `--p2p-rate-limit <n>` | Max auth attempts per IP per minute (default: `5`) |
221
- | `--p2p-allow <ips>` | Comma-separated list of allowed IPs (empty = all) |
222
- | `--p2p-deny <ips>` | Comma-separated list of denied IPs |
223
- | `--p2p-audit-log <dir>` | Directory for P2P audit logs |
224
- | `--p2p-hmac-key <key>` | HMAC key for message signing (default: derived from password) |
225
-
226
- ### Client options
124
+ # Compact desktop widget mode pinned always on top
125
+ pyre ui --compact --ontop
227
126
 
228
- ```bash
229
- pyre p2p connect --p2p-host <server-ip> --p2p-port 9876 --p2p-password mysecret
127
+ # Expose web endpoint to local network alongside native window
128
+ pyre ui --lan --port 8080
230
129
  ```
231
130
 
232
- | Option | Description |
233
- |---|---|
234
- | `--p2p-host <host>` | Server address (default: `127.0.0.1`) |
235
- | `--p2p-port <port>` | Server port (default: `9876`) |
236
- | `--p2p-password <password>` | Password for authentication (required) |
237
- | `--p2p-tls` | Enable TLS encryption for the connection |
238
- | `--p2p-ca <file>` | TLS CA certificate file (PEM) — required when using `--p2p-tls` |
239
- | `--p2p-insecure` | Skip TLS certificate verification (client only) |
240
- | `--p2p-audit-log <dir>` | Directory for P2P client audit logs |
241
- | `--p2p-hmac-key <key>` | HMAC key for message signing (must match server) |
131
+ ### Browser Web Dashboard (`pyre web`)
242
132
 
243
- ### Security features
244
-
245
- - **TLS encryption** — pass `--p2p-cert`/`--p2p-key`/`--p2p-ca` on the server and `--p2p-tls --p2p-ca` on the client for encrypted connections.
246
- - **Rate limiting** — `--p2p-rate-limit <n>` caps authentication attempts per IP per minute to deter brute-force attacks.
247
- - **IP allow/deny lists** — `--p2p-allow` restricts connections to specific IPs; `--p2p-deny` blocks specific IPs while allowing all others.
248
- - **Audit logging** — `--p2p-audit-log <dir>` logs connects, auth successes/failures, disconnects, rate-limit hits, and IP blocks.
249
- - **HMAC message signing** — every message is signed with HMAC-SHA256. The key derives from the password by default, or set `--p2p-hmac-key` explicitly for rotation or interoperability (must match on both sides).
250
-
251
- ### Same local network (LAN) setup
252
-
253
- Both machines must be on the same local network (same Wi-Fi or wired subnet). The server listens on `0.0.0.0` (all interfaces) by default, so any device on the LAN can reach it as long as the port is open.
254
-
255
- On the **server machine**, find its local IP address:
133
+ Serve a browser dashboard accessible anywhere on your network:
256
134
 
257
135
  ```bash
258
- hostname -I
259
- # or
260
- ifconfig | grep "inet " | grep -v 127.0.0
261
- ```
262
-
263
- Use that IP (e.g. `192.168.1.25`) in the client command:
136
+ # Start local web dashboard
137
+ pyre web --port 3000
264
138
 
265
- ```bash
266
- pyre p2p connect --p2p-host 192.168.1.25 --p2p-port 9876 --p2p-password mysecret
139
+ # Broadcast over local area network with access PIN
140
+ pyre web --lan --port 3000
267
141
  ```
268
142
 
269
- **Troubleshooting**
270
-
271
- - If the client can't reach the server, confirm both machines are on the same subnet (ping the server IP from the client).
272
- - Verify the port is open (no local firewall blocking TCP `9876`).
273
- - Never expose the server directly to the public internet; it's designed for LAN use only.
274
-
275
- ### Protocol
276
-
277
- Length-prefixed JSON over TCP, with HMAC-SHA256 signing on every message:
278
-
279
- 1. Client connects to the server.
280
- 2. Server sends a `challenge` message with a random nonce.
281
- 3. Client responds with an `auth` message containing the SHA-256 hash of `password:nonce`.
282
- 4. Server validates the hash and responds with `auth-ok` or `auth-fail`.
283
- 5. Once authenticated, the server streams `data` messages containing `StatsData` snapshots at the configured interval.
284
- 6. Both sides exchange `ping`/`pong` keepalives every 15 seconds.
285
- 7. Either side can send a `disconnect` message to close gracefully.
286
-
287
- ### Server controls
288
-
289
- While the server is running, type these on its stdin (or press `Ctrl+C`):
290
-
291
- | Command | Action |
292
- |---|---|
293
- | `status` | Print the number of currently connected peers |
294
- | `q` / `quit` / `exit` | Shut down the server gracefully |
295
-
296
- ### Client controls
297
-
298
- While connected, the client displays live stats in a formatted table. Press `Ctrl+C` to disconnect. It reconnects automatically after 3 seconds if the connection drops.
299
-
300
143
  ---
301
144
 
302
- ## Live Dashboard
303
-
304
- Run with `pyre live`.
305
-
306
- | Key | Action |
307
- |---|---|
308
- | `q` | Quit the dashboard |
309
- | `p` | Pause / resume the refresh cycle |
310
- | `d` | Toggle detailed sensor mode |
311
- | `g` | Show / hide sparkline graphs |
312
- | `b` | Cycle graph mode (sparkline ↔ bar) |
313
- | `s` | Cycle sort order (CPU → memory → PID → user → command → state → threads → runtime) |
314
- | `f` | Cycle export format (JSON → CSV → TSV → HTML → Markdown) |
315
- | `T` | Cycle temperature unit (Celsius ↔ Fahrenheit) |
316
- | `e` | Export a snapshot to the export directory |
317
- | `l` | Toggle continuous CSV logging |
318
- | `c` | Open the UI customizer |
319
- | `/` | Open process filter |
320
- | `k` | Open process kill (enter PID, then Enter to confirm) |
321
- | `S` | Open signal picker for kill (cycle SIGTERM → SIGKILL → SIGINT → SIGHUP → SIGSTOP → SIGCONT) |
322
- | `t` | Toggle process tree view |
323
- | `r` | Toggle P2P server (or enter P2P password input) |
324
- | `+` / `-` | Increase / decrease refresh interval by 1 second |
325
- | `←` / `→` / `Tab` | Cycle to previous / next panel tab |
326
- | `1`–`9`, `0` | Jump to panel by number (cpu, mem, gpu, power, battery, thermal, network, packets, tasks, disk) |
327
- | `P` | Toggle process panel |
328
- | `C` | Toggle containers panel |
329
- | `B` | Toggle Blender render tracker panel |
330
- | `Esc` | Close customizer or clear filter/kill input |
331
-
332
- ### UI Customizer
333
-
334
- Press `c` to open the customizer overlay. From there:
335
-
336
- - Cycle through six built-in themes (Default, Dracula, Cyberpunk, Monochrome, Nord, Gruvbox) — `↑`/`↓` or `j`/`k` to navigate, `Enter`/`Space` to select
337
- - Toggle individual panels (CPU, Memory, GPU, Power, Battery, Thermal, Network, Packets, Tasks, Disk, Processes, Containers, Blender) on or off
338
- - Switch graph mode between sparkline and bar charts
339
- - Toggle process tree view
340
- - Toggle temperature unit between Celsius and Fahrenheit
341
- - Toggle notifications on or off
342
-
343
- ### Mouse support
344
-
345
- - **Click tab bar** — click a panel tab (row 4) to jump directly to that panel
346
- - **Scroll** — scroll through process lists in panels with many entries
347
- - Enabled by default; disable with `mouseEnabled = false` in the customizer
145
+ ## Comparison
146
+
147
+ | Feature | Pyre | btop | htop | Glances |
148
+ |---|:---:|:---:|:---:|:---:|
149
+ | **Interactive TUI & Sparklines** | Yes (6 themes + JSON) | Yes | Limited | Yes |
150
+ | **Native macOS Desktop Window** | Yes (Swift Cocoa) | No | No | No |
151
+ | **Apple Silicon P/E + GPU + ANE** | Yes (Granular watts) | Partial | Partial | Partial |
152
+ | **Encrypted P2P Telemetry** | Yes (TLS + HMAC) | No | No | Partial (Plain) |
153
+ | **Real-time Web Dashboard (SSE)** | Yes (Zero-config) | No | No | Yes |
154
+ | **Multi-Host Fleet Aggregation** | Yes (SSH / P2P) | No | No | Yes (Web only) |
155
+ | **Socket Connection Forensics** | Yes | Partial | No | Partial |
156
+ | **Statistical Anomaly Radar** | Yes (Z-score) | No | No | No |
157
+ | **Energy & Cost Profiler** | Yes (kWh / Joules) | No | No | No |
158
+ | **System Security Doctor** | Yes (SIP / Sensors) | No | No | No |
159
+ | **Export Formats** | JSON, CSV, TSV, HTML, MD | No | No | InfluxDB, CSV |
348
160
 
349
161
  ---
350
162
 
351
- ## Process Management
163
+ ## Keybindings
352
164
 
353
- Available in the live dashboard (and partially in static snapshots via flags).
165
+ Inside `pyre live`:
354
166
 
355
- ### Sorting
356
-
357
- Press `s` to cycle through sort modes, or use `--sort <key>` in static snapshot mode (default: `cpu`):
358
-
359
- | Sort key | Description |
360
- |---|---|
361
- | `cpu` | Sort by CPU usage (descending) |
362
- | `mem` | Sort by memory usage (descending) |
363
- | `pid` | Sort by process ID |
364
- | `user` | Sort by username |
365
- | `command` | Sort by command name |
366
- | `state` | Sort by process state |
367
- | `threads` | Sort by thread count |
368
- | `runtime` | Sort by total runtime |
167
+ ### Navigation & Views
369
168
 
370
- ### Filtering
169
+ | Key | Action | Key | Action |
170
+ |:---:|---|:---:|---|
171
+ | `q` | Quit dashboard | `1`–`9` | Jump directly to panel tab |
172
+ | `p` | Pause / resume live refresh | `←` / `→` | Switch active panel tab |
173
+ | `g` | Toggle history graphs on / off | `+` / `-` | Increase / decrease refresh interval |
174
+ | `b` | Cycle graph style (sparkline ↔ bar) | `d` | Toggle sensor detail expansion |
175
+ | `c` | Open theme & panel customizer | `?` | Toggle keyboard shortcuts overlay |
371
176
 
372
- Press `/` to open a process filter and type a substring to narrow the list. Press `Esc` to clear it.
177
+ ### Processes & Actions
373
178
 
374
- ### Tree view
179
+ | Key | Action | Key | Action |
180
+ |:---:|---|:---:|---|
181
+ | `/` | Search & filter processes | `k` | Enter process kill mode (type PID) |
182
+ | `t` | Toggle hierarchical tree view | `S` | Select termination signal (`SIGTERM`, `SIGKILL`) |
183
+ | `s` | Cycle sort (`cpu`, `mem`, `pid`, `user`) | `l` | Toggle continuous CSV background logging |
184
+ | `e` | Export snapshot (`json`, `csv`, `html`, `md`) | `r` | Start / stop P2P streaming server |
375
185
 
376
- Press `t` to toggle between a flat process list and a tree view showing parent/child relationships. In static snapshot mode, use `--tree`.
377
-
378
- ### Killing processes
379
-
380
- Press `k` to enter kill mode: type the PID, then press `Enter` to send `SIGTERM` (default), or `Esc` to cancel.
381
-
382
- ### Signal picker
383
-
384
- Press `S` to open the signal picker. Cycle with `↑`/`↓` or `j`/`k`, then `Enter` to send the selected signal to the PID entered in kill mode:
385
-
386
- | Signal | Description |
387
- |---|---|
388
- | `SIGTERM` | Graceful termination (default) |
389
- | `SIGKILL` | Force kill |
390
- | `SIGINT` | Interrupt (Ctrl+C equivalent) |
391
- | `SIGHUP` | Hangup |
392
- | `SIGSTOP` | Stop (pause) the process |
393
- | `SIGCONT` | Continue a stopped process |
186
+ Mouse support: click any tab, button, or process row directly in the terminal, or scroll to browse processes.
394
187
 
395
188
  ---
396
189
 
397
- ## Alerts & Notifications
190
+ ## CLI Reference
398
191
 
399
- The live dashboard monitors critical metrics and notifies you when thresholds are exceeded:
400
-
401
- | Metric | Default threshold | Alert behavior |
402
- |---|---|---|
403
- | CPU usage | 90% | Terminal bell (`\x07`) + red status message for 5 seconds + desktop notification |
404
- | CPU temperature | 95°C | Terminal bell + red status message for 5 seconds + desktop notification |
405
-
406
- Alerts fire once when a threshold is first crossed and reset when conditions clear. Thresholds are configurable via `--alert-cpu` and `--alert-temp`, or in the config file (`cpuAlertPct` and `tempAlertC` in `~/.config/pyre/config.json`).
407
-
408
- ## Themes
409
-
410
- | Theme | Description |
411
- |---|---|
412
- | **default** | Muted greys and cyan accents; safe for any terminal |
413
- | **dracula** | The popular Dracula dark palette |
414
- | **cyberpunk** | High-contrast neon on black |
415
- | **monochrome** | White-only; useful for colour-blind users or terminals without 256-colour support |
416
- | **nord** | Arctic-inspired cool tones |
417
- | **gruvbox** | Retro warm palette |
192
+ ### Dashboards & Views
418
193
 
419
- Cycle themes with `c` in the customizer overlay, or set a default with `--theme <name>`.
194
+ ```bash
195
+ pyre # Terminal snapshot
196
+ pyre live # Interactive full-screen TUI
197
+ pyre ui [--compact] [--ontop] # Native macOS desktop window
198
+ pyre web [--port 3000] [--lan] # Browser portal with live SSE stream
199
+ pyre fleet host1 host2 host3 # Unified multi-host fleet dashboard
200
+ pyre ssh user@server # Stream stats from remote machine over SSH
201
+ ```
420
202
 
421
- ## Export Formats
203
+ ### Telemetry, Diagnostics & Benchmarks
422
204
 
423
- ### Snapshot export
205
+ ```bash
206
+ pyre check # One-line health summary
207
+ pyre anomalies [--since 7d] # Statistical z-score anomaly detector
208
+ pyre doctor # Diagnostic audit of permissions, SIP, sensors
209
+ pyre bench "<cmd>" # Profile execution time, memory, and kWh energy
210
+ pyre benchmark # 1-minute CPU benchmark scoring digits of PI
211
+ pyre netusage [--top 15] # Real-time per-process socket & bandwidth forensics
212
+ pyre brew # Package manager health check & disk cache report
213
+ pyre smart # S.M.A.R.T. disk health monitor & drive wear
214
+ pyre blender # Background Blender 3D render job tracker
215
+ pyre pipe # Continuous newline-delimited JSON stream
216
+ ```
424
217
 
425
- Triggered by the `e` key in live mode, or the `--out` flag. Written to the export directory (`./pyre-exports` by default):
218
+ ### Automation, Profiles & Daemon
426
219
 
427
- ```
428
- pyre-2026-07-26T10-54-47-191Z.json
429
- pyre-2026-07-26T10-54-52-306Z.csv
430
- pyre-2026-07-26T10-54-52-306Z.html
431
- pyre-2026-07-26T10-54-52-306Z.md
220
+ ```bash
221
+ pyre watchdog # Autonomous daemon monitoring rules & killing rogue procs
222
+ pyre serve [--port 8080] # Lightweight REST API server exposing JSON endpoints
223
+ pyre profile save <name> # Save active configuration profile
224
+ pyre profile load <name> # Restore saved profile
225
+ pyre config show # Display current settings (~/.config/pyre/config.json)
226
+ pyre completions <zsh|bash> # Generate shell auto-completions
432
227
  ```
433
228
 
434
- Format follows the current export format — cycle with `f` in live mode, or set via `--json`, `--csv`, `--tsv`, `--html`, `--md` in static mode.
435
-
436
- ### Continuous CSV logging
229
+ ---
437
230
 
438
- Triggered by the `l` key in live mode, or the `--log` flag. Each tick appends a row to a timestamped file. Old logs are automatically rotated (max 20 files or 50 MB, files older than 7 days are pruned):
231
+ ## Encrypted P2P Streaming
439
232
 
440
- ```
441
- pyre-log-2026-07-26T10-54-47-191Z.csv
442
- ```
233
+ Stream live system stats directly between hosts over TCP with mutual authentication:
443
234
 
444
- Row format:
235
+ ```bash
236
+ # 1. On server machine (Host)
237
+ pyre p2p server --p2p-password "secret-token" --p2p-port 9876
445
238
 
446
- ```
447
- timestamp,cpu_usage,mem_usage_percent,temp_c,net_rx_bytes,net_tx_bytes,net_rx_packets,net_tx_packets,connections,thermal_state
239
+ # 2. On client machine (Viewer)
240
+ pyre p2p connect --p2p-host 192.168.1.50 --p2p-password "secret-token" --p2p-port 9876
448
241
  ```
449
242
 
450
- ## Requirements
451
-
452
- - **Node.js 18+**
453
- - **macOS:** macOS 14+ (Sonoma or later recommended). Optional `sudo` for `powermetrics` detailed thermal/power readings.
454
- - **Linux:** Any modern Linux distribution (Ubuntu/Debian, Fedora/RHEL, Arch) with kernel 4.x+; reads `/proc` and `/sys`. Optional `smartmontools` for disk health.
455
- - **Windows:** Windows 10, Windows 11, or Windows Server 2016+ with PowerShell 5.1+.
243
+ Security and networking capabilities:
244
+ - **TLS Encryption**: Mutual authentication via `--p2p-tls --p2p-cert <file> --p2p-key <file>`
245
+ - **Challenge Verification**: SHA-256 handshake challenge-response prevents replay attacks.
246
+ - **Integrity Signing**: Cryptographic HMAC-SHA256 signatures validated on every packet payload.
247
+ - **Access Control**: IP address whitelisting (`--p2p-allow <ips>`) and rate limiting (`--p2p-rate-limit <n>`).
456
248
 
457
- On macOS, to enable password‑less access for `powermetrics` (optional, for detailed sensor readings), run:
249
+ ---
458
250
 
459
- ```bash
460
- echo "$(whoami) ALL=(root) NOPASSWD: /usr/bin/powermetrics" | sudo tee /etc/sudoers.d/pyre-powermetrics
461
- ```
251
+ ## Requirements
462
252
 
463
- ## Project Structure
253
+ | Platform | Minimum Requirement | Notes |
254
+ |---|---|---|
255
+ | **Node.js** | 18.0.0 or higher | Recommended: Node 20 LTS |
256
+ | **macOS** | macOS 14+ (Sonoma, Sequoia) | Full Apple Silicon (M1/M2/M3/M4) & Intel support |
257
+ | **Linux** | Kernel 4.x+ | x86_64, arm64, aarch64 (`/proc` & `/sys`) |
258
+ | **Windows** | Windows 10, 11, Server 2016+ | PowerShell 5.1+ or PowerShell Core 7+ |
464
259
 
465
- ```
466
- pyre/
467
- ├── src/
468
- │ ├── index.ts # CLI entry point (commander definitions, main())
469
- │ ├── anomaliesCmd.ts # Resource spike & anomaly digest generator
470
- │ ├── brewHealth.ts # Package manager health inspector (Brew, APT, Pacman, DNF, Winget, Scoop)
471
- │ ├── doctor.ts # System diagnostics (macOS SIP/Gatekeeper, Linux /proc/sys, Windows WMI)
472
- │ ├── extensions.ts # Extensions/modules inspector (macOS extensions, Linux lsmod, Windows driverquery)
473
- │ ├── service.ts # Background service daemon manager (launchd, systemd, schtasks)
474
- │ ├── updateCheck.ts # Passive and on-demand npm registry version check
475
- │ ├── monitors/ # System metric collection (CPU, memory, disk, battery, thermal, network, packets, power, tasks)
476
- │ │ ├── index.ts # Public API: collectAll, collectPower, collectPackets, collectTasks
477
- │ │ ├── types.ts # TypeScript interfaces for all metric types
478
- │ │ ├── smc.ts # SMC sensor reading with caching (macOS)
479
- │ │ ├── collectors.ts # Metric collection orchestrator & platform dispatch
480
- │ │ ├── platform/ # OS-specific native metric collectors
481
- │ │ │ ├── linux.ts # Linux /proc, /sys, df, ps, and netstat collectors
482
- │ │ │ └── windows.ts # Windows os, WMI/PowerShell, netstat, and tasklist collectors
483
- │ │ └── run.ts # Shared shell & PowerShell execution helpers
484
- │ ├── formatters/ # Output formatting and rendering
485
- │ │ ├── index.ts # Public API: formatTable, formatJson, formatCsv, formatTsv, formatGraphs
486
- │ │ ├── output.ts # JSON/CSV/TSV serialisation and sparkline graphs
487
- │ │ ├── render.ts # Dashboard table layout, cards, and panels
488
- │ │ ├── themes.ts # Six built-in colour themes
489
- │ │ └── types.ts # TableOptions, VisibleItems, ThemeName, and other public-facing type definitions
490
- │ ├── live/ # Interactive live dashboard
491
- │ │ ├── index.ts # Public API: startLive, stopLive
492
- │ │ ├── state.ts # Shared mutable session state
493
- │ │ ├── input.ts # Keypress handling, signal picker, protected PID kill guards
494
- │ │ ├── render.ts # Screen rendering and alert checking
495
- │ │ ├── export.ts # Snapshot export and CSV logging
496
- │ │ └── types.ts # LiveOptions, ExportFormat, InputMode, SortMode
497
- │ ├── p2p/ # P2P live data streaming (server + client)
498
- │ │ ├── index.ts # Public API: P2PServer, P2PClient
499
- │ │ ├── types.ts # P2P protocol type definitions
500
- │ │ ├── protocol.ts # Length-prefixed JSON message framing
501
- │ │ ├── server.ts # TCP server: auth, TLS, rate limiting, IP filtering, audit logging, HMAC signing, data streaming
502
- │ │ └── client.ts # TCP client that connects and displays live data
503
- │ ├── state/ # Config & profile state management
504
- │ │ └── config.ts # Config file I/O & atomic profile save/load
505
- │ ├── history.ts # Rolling history buffer for sparkline data
506
- │ ├── sparkline.ts # ASCII sparkline rendering & plain-text mode
507
- │ └── utils/ # Shared utility functions
508
- ├── dist/ # Built output (esm)
509
- ├── grafana/ # Grafana dashboard JSON template
510
- ├── pyre-exports/ # Default directory for snapshot exports and logs
511
- ├── Formula/ # Homebrew formula
512
- ├── install.sh # curl installation script
513
- ├── package.json
514
- ├── tsconfig.json
515
- └── README.md
516
- ```
260
+ ---
517
261
 
518
262
  ## Development
519
263
 
520
- ### Setup
521
-
522
264
  ```bash
265
+ # 1. Clone repository
523
266
  git clone https://github.com/somalip/pyre.git
524
267
  cd pyre
525
- npm install
526
- ```
527
-
528
- ### Scripts
529
268
 
530
- | Script | Description |
531
- |---|---|
532
- | `npm run build` | Compile TypeScript to ESM via tsup, output to `dist/` |
533
- | `npm start` | Run the built binary from `dist/` |
534
- | `npm run dev` | Run directly via `tsx` (no build step) |
535
- | `npm test` | Verify the built binary responds to `--help` |
536
-
537
- ## Roadmap
538
-
539
- Proposed features for upcoming versions, organized by effort and impact.
540
-
541
- ### Tier 1 — High Impact, Achievable
542
-
543
- | Feature | Description |
544
- |---|---|
545
- | **AI Anomaly Explanation** (`pyre explain`) | Translate z-score spikes into plain-English diagnoses using a local (Ollama) or API-based LLM |
546
- | **S.M.A.R.T. Disk Health** (`pyre smart`) | Display SSD/HDD wear level, reallocated sectors, power-on hours, and remaining lifespan via `smartctl` |
547
- | **Docker / Container Panel** | Show running Docker/OrbStack containers with CPU%, memory, network I/O, and status — toggle with `C` in the live dashboard |
548
- | **Fan Speed Monitoring** | Display current RPM for all system fans via SMC readings in the Thermal panel |
549
- | **Log Replay Mode** (`pyre replay`) | Load a historical CSV log and play it back inside the interactive TUI with scrubbing controls |
550
- | **Multi-Channel Alert Integrations** | Native Slack, Discord, Pushover, and ntfy.sh alert targets with pre-configured payload templates (extends `--webhook-url`) |
551
- | **Prometheus Exporter** | Expose a `/metrics` endpoint in Prometheus text format — `src/prometheus.ts` is already stubbed |
552
-
553
- ### Tier 2 — Strong Differentiation
269
+ # 2. Install dependencies
270
+ npm install
554
271
 
555
- | Feature | Description |
556
- |---|---|
557
- | **Plugin System** | User-authored metric collectors as JS scripts in `~/.config/pyre/plugins/` rendered as custom dashboard panels |
558
- | **Per-App Network Usage** (`pyre netusage`) | Real-time and cumulative network I/O broken down per application, backed by `nettop` (parser already in repo) |
559
- | **Configurable Dashboard Grid** | Define custom panel layout, order, and sizing in `~/.config/pyre/config.json` |
560
- | **Smart Battery Predictor** | Use accumulated power-drain history from CSV logs to produce a personalized, heuristic battery time-remaining estimate |
561
- | **REST API Mode** (`pyre serve`) | Expose all metrics as structured JSON REST endpoints (`GET /api/cpu`, `/api/all`, etc.) with optional API key auth |
562
- | **Process CPU Profiling** (`pyre profile-proc <pid>`) | Capture a 5-second `sample`/`spindump` for a misbehaving process and render an annotated call-tree summary |
563
- | **Watchdog Rules Engine** (`pyre watchdog`) | Persistent daemon that monitors metrics and executes configurable rules — e.g. "if CPU > 90% for 5 min → kill `photoanalysisd` → notify Slack" |
564
- | **Build System Tracker** (`pyre build`) | First-class tracking for `xcodebuild`, `cargo`, `make`, `bazel` — extends the existing Blender render tracker pattern |
565
-
566
- ### Tier 3 — Big Bets
567
-
568
- | Feature | Description |
569
- |---|---|
570
- | **Network Topology Mapper** (`pyre topo`) | Visualize LAN peers, active connections, and routing hops as an ASCII diagram; auto-detects pyre-capable peers |
571
- | **Cloud Sync** (`pyre sync`) | Sync config profiles, alert thresholds, and anomaly history across multiple Macs via iCloud Drive or a custom S3/WebDAV backend |
272
+ # 3. Development live mode
273
+ npm run dev
572
274
 
573
- ### Quality of Life
275
+ # 4. Compile TypeScript bundle
276
+ npm run build
574
277
 
575
- | Feature | Description |
576
- |---|---|
577
- | **Gaming / Performance Mode Profile** | `pyre live --profile gaming` — GPU + Thermal + Power panels only, 1 s interval, bar graph mode, minimal overlay |
578
- | **iOS Shortcut Integration** | Documented iOS Shortcut that runs `pyre check --plain` over SSH and displays a summary notification |
579
- | **Setup Wizard Polish** (`pyre setup`) | Guided first-run experience for `powermetrics` sudo, alert thresholds, theme selection, and webhook setup |
278
+ # 5. Run test suite
279
+ npm test
280
+ ```
580
281
 
581
282
  ---
582
283
 
583
284
  ## License
584
285
 
585
- MIT
286
+ [MIT](LICENSE) © [somalip](https://github.com/somalip)