wp-mac-watch is a fast, Mac-focused Activity Monitor alternative: process management (who’s running, why, kill/kill-tree) plus system metrics (Stats-style CPU, memory, swap) in one TUI, with a clean core so you can add a menubar later.
- One place for “what’s running” and “how’s the system”
If you use Stats (menu bar) and also need to see processes, search, and force-quit, wp-mac-watch merges system overview and process management in a single TUI (and is designed so the same data can drive a menubar later). - macOS-native
LaunchAgent/Daemon attribution (“why is this running?”), .app detection, kill-tree. Not a generic top/htop clone. - Scriptable
snapshot,kill,kill-treesubcommands for automation and tooling (e.g. macdevkit/doctor).
- System bar (Stats-style)
One line at top: CPU %, memory bar (used/total), swap. - Process list
CPU, memory, PID, process name; instant search (/), sort (s), group toggle (Apps / Background / All). - Details pane
Path and attribution (LaunchAgent/Daemon/App, plist path). - Actions
Force quit (f, SIGKILL), kill tree (t, SIGTERM). - CLI
snapshot(JSON),kill,kill-treefor scripting.
wp-mac-watch/
Cargo.toml # workspace
.gitignore
README.md
crates/
core/ # data model + diffing + search
mac/ # macOS collectors, attribution, kill/kill-tree
tui/ # ratatui UI + input + rendering
cli/ # JSON snapshot + simple process control
wp-mac-watch/ # main binary, wires sampler + TUI + actions
wp_mac_watch_coreProcessRow,ProcessSnapshot,SnapshotDiff,SystemMetricsAttribution,AttributionKindSearchQuery,GroupMode,SortKeyfilter_and_sort,build_snapshot,diff_snapshots
wp_mac_watch_macMacCollector– processes + system metrics (CPU, memory, swap)- Lightweight launchd plist index for attribution
kill_pid,kill_tree,handle_action
wp_mac_watch_tuirun_tui(rx, tx)– main TUI event loop- Mac-ish layout: header, process table, details pane, footer
wp_mac_watch_cli- CLI entrypoint using
clap
- CLI entrypoint using
Uses a symlink so the global command runs the binary from your repo; one build and it’s updated. Requires Rust and ~/.cargo/bin on your PATH (default with rustup).
One-time, from the repo root:
cd /path/to/wp-mac-watch
cargo build --release -p wp-mac-watch
ln -sf "$(pwd)/target/release/wp-mac-watch" ~/.cargo/bin/wp-mac-watchThen from any directory run wp-mac-watch. To update after changes:
cargo build --release -p wp-mac-watchOptional — CLI helper (symlink as well):
cargo build --release -p wp_mac_watch_cli
ln -sf "$(pwd)/target/release/wp-mac-watch-cli" ~/.cargo/bin/wp-mac-watch-cliUpdate CLI after changes: cargo build --release -p wp_mac_watch_cli.
From the workspace root:
cargo run -p wp-mac-watch| Key | Action |
|---|---|
j, ↓ |
Move selection down |
k, ↑ |
Move selection up |
/ |
Search: type to filter by name/path (Enter or Esc to finish) |
Tab |
Cycle list: Apps → Background → All |
s |
Cycle sort: CPU → Mem → Name → PID |
f |
Force quit selected process (SIGKILL) — confirm with y, cancel with n/Esc |
t |
Kill tree: SIGTERM to process + children — confirm with y, cancel with n/Esc |
q |
Quit |
- Force quit (
f): shows “Force kill PID xxx (name)? [y]es [N]o/Esc”. Press y to send SIGKILL, n or Esc to cancel. - Kill tree (
t): same confirmation before sending SIGTERM to the process and its children.
CLI (with symlink above, or from repo):
wp-mac-watch-cli snapshot
wp-mac-watch-cli kill 12345
wp-mac-watch-cli kill-tree 12345 --forceFrom repo without symlink: cargo run -p wp_mac_watch_cli -- snapshot (and similarly for kill / kill-tree).