Lumen
March 11, 2026 · View on GitHub
Real-time hardware monitoring for macOS. Two interfaces: a GPU-rendered dashboard (raylib) and a terminal UI.
Written in Zig, direct Mach kernel, IOKit, SMC, and libproc calls.
What it monitors
- CPU — total and per-core usage via
host_processor_info - Memory — used/wired/compressed via
host_statistics64(matches Activity Monitor's formula) - GPU — utilization and VRAM via IOAccelerator
PerformanceStatistics(no root needed) - Network — download/upload bandwidth via
getifaddrs - Disk — usage via
statfs - Battery — charge, health, time remaining via
IOPowerSources - Temperature — CPU/GPU temps via SMC (supports both Intel sp78 and Apple Silicon flt formats)
- Processes — top 8 by CPU% via
libproc
Build
Requires Zig 0.15.2+.
# GUI version (raylib window)
zig build run
# TUI version (terminal)
zig build tui
Binaries go to zig-out/bin/lumen and zig-out/bin/lumen-tui.
GUI controls
| Key | Action |
|---|---|
Tab | Focus panel (zooms to full screen) |
Tab (again) | Cycle to next panel |
Esc | Return to grid |
S | Screenshot to ~/Desktop/lumen_*.png |
Q | Quit |
TUI controls
| Key | Action |
|---|---|
Q | Quit |
Ctrl+C | Quit |
Dependencies
The GUI uses raylib for rendering; the TUI uses mibu for terminal control and raw ANSI escape sequences.
- raylib-zig (devel) — GUI rendering
- mibu — terminal raw mode and cursor control
- Fira Code — embedded at compile time
Platform
macOS only. Tested on Apple Silicon (M4 Max). Intel Macs should work but are untested.
License
MIT