Skip to content
mbeamanPublic

About

Modular, themeable ops dashboard for the terminal — htop/nvtop/astral-watch parity on a 12x6 grid, from retrowave to matrix

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

gridwatch

A modular, themeable ops dashboard for the terminal — a grid of components that each render from a 1x1 tile to full screen, in themes like retrowave, modern and the rain-lit matrix, reproducing the behaviour of htop, nvtop and astral-watch alongside network, audio-visualizer and Winamp-style now-playing tiles. Rust + ratatui 0.30, built for a single Linux workstation first.

the Overview at 250×70 in retrowave

Start here

What it is, plainly: the things you would normally watch in four or five separate terminal windows — processor and memory, the graphics card, the drives, the network, temperatures, what is playing — on one screen you can rearrange, in a colour scheme you pick. It runs in a terminal, so it works over SSH and costs almost nothing to leave open.

You need Linux and a Rust toolchain, 1.88 or newer. If you do not have one, rustup.rs installs it in a minute:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then install gridwatch and try it on fake data first — no hardware, nothing to configure:

cargo install --git https://github.com/mbeaman/gridwatch
gridwatch run --demo    # synthetic, seeded, safe to poke at
gridwatch               # the real thing, against this machine

(--git is not a typo and plain cargo install gridwatch will not work: gridwatch depends on astral-watch by git revision, and crates.io forbids git dependencies.)

Press ? for every key, hjkl to move between tiles, z to zoom one to full screen, t to cycle themes, and q to quit — Esc first if you have handed the keys to a tile with Enter, since a tile that holds them keeps q too.

Some tiles need hardware you may not have. The GPU tile reads NVIDIA's NVML library, the audio visualizer needs PipeWire's pw-record, and the pins tile needs an ASUS 12V-2x6 card with astral-watch watching its sensor. Nothing guesses and nothing pretends: a tile whose hardware is missing prints the reason and the fix instead of a number, and

gridwatch doctor

prints that for every capability at once — what it found, why something is unavailable, and the command that would change it. Run that first if a tile looks blank. Everything else on this page is the detail behind it.

Status: v0.17.0, not yet tagged. Everything below works; the tags wait on rows only a person can take (a real terminal, a running game, live i2c — docs/PERFORMANCE.md lists them). Fifteen arcs so far: the store, layout engine and theme system; htop, nvtop and astral-watch pins parity down to their formulas; network, audio, sensors, disks and a Winamp-style now-playing tile; journal record/replay, in-app layout editing, [[rules]] alerts, process actions behind a confirm line, and an exec plugin API so a tile can be a program in any language. The last four arcs went into the things a dashboard is judged on rather than new tiles: every tile now fills a wide terminal and no table stretches its columns past their content, every config key means what it says or tells you why not, and charts have the axis they always claimed. The planned roadmap is complete through arc 15; docs/BACKLOG.md is what is known and unscheduled, and docs/PLAN.md opens with the rows still owed to a person.

Every image on this page is regenerated by CI from gridwatch shot --format svg — synthetic data, seeded, byte-deterministic, so a change to a theme shows up as a diff.

The same page in every built-in theme: modern · retrowave · mono · terminal · phosphor-green · phosphor-amber · matrix — and the Audio page, the 120×40 dense layout.

mono and terminal are deliberately colourless: the first is the real NO_COLOR theme, where severity is carried by modifiers and glyphs, and the second uses your terminal's own sixteen colours by name.

At 131×37, colour stripped, the Overview reads as:

 gridwatch  1 Overview  2 Audio  3 Disks   retrowave · configured
┏ CPU ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ╔ GPU ══════════════════════════════════════════════════════════╗
┃CPU [||||||||||||||||||||||                             ] 43.9%┃ ║Device 0 [RTX 5090]    PCIe GEN 5@16x RX: 36 MiB/s TX: 11 MiB/s║
┃MEM [|||||||||||||||||||                          ] 16.7G/91.0G┃ ║GPU 2769MHz MEM 14001MHz TEMP 44°C FAN 29% POW 386/600W        ║
┃SWP [                                             ] 0.00K/16.0G┃ ║GPU ━━━─────────────────── 14%  MEM ━━━━━━━━━━───────────── 42%║
┃210, 1792 thr, 431 kthr; 3 running · load 4.51 4.20 3.52       ┃ ║P0 no throttling                                               ║
┃CCD0  4.9 GHz  50.1 °C         CCD1  5.4 GHz  47.9 °C          ┃ ║POW 20 ms                                                      ║
┃                                                               ┃ ║                                                               ║
┃       ▁      ▄ ▆▃       ▆                                     ┃ ║▇▇█████████▇▇▇▇▇▇▇▇▇▇▇▇▇███████▇▇▇▇▇▇▇▇▇▇▇▇▇▇██████▇▇▇▇▇▇▇▇▇▇▇▇║
┃    ▃▇ █  ▅▃  █ ██ ▅  ▇▂ █▂                                    ┃ ║███████████████████████████████████████████████████████████████║
┃    ██ █▆ ██ ▇█ ██ ██ ██ ██                                    ┃ ║1:util 14%  2:vram 42%  4:power 64%  1m ⟶                      ║
┃    ██ ██ ██ ██ ██ ██ ██ ██                                    ┃ ║                                                               ║
┃    ██ ██ ██ ██ ██ ██ ██ ██                       ▄▂           ┃ ║                                                               ║
┃    ██ ██ ██ ██ ██ ██ ██ ██        ▄▅ ▄▅    ▇▆    ██     ▃     ┃ ║ ⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠒⠒⠉⠑⠒⠒⠊⠉⠒⠊⠉⠑⠒⠒⠒⠉⠑⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠊⠉⠑⠒⠉⠉power║
┃    ██ ██ ██ ██ ██ ██ ██ ██        ██ ██ ▆█ ██ ██ ██ ▄▄ ▁█     ┃ ║─⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒vram║
┃    0  1  2  3  4  5  6  7         8  9  10 11 12 13 14 15     ┃ ║      ⢀⣀     ⣀⣀⣀                                               ║
┃PSI cpu 1.37 · mem 0.19 · io 1.09                              ┃ ║ ⠉⠉⠉⠉⠉⠁ ⠉⠉⠉⠉⠉   ⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉util║
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ╚═══════════════════════════════════════════════════════════════╝

╔ PINS ═══════════════════════════════════╗ ╔ NETWORK ════════════════════════════════╗ ╔ AUDIO ══════════════════════════════════╗
║┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄║ ║● eno1 ↓ 9.4M  ↑ 630k  1 Gb/s            ║ ║D50s (synthetic)  L −9 dB · R −9 dB      ║
║                                         ║ ║  ▄▆█▇▅▁          ▁▅▇█▇▄           ▂▆▇█▆▆║ ║                                         ║
║                                         ║ ║ ███████▅        ▄███████▃       ▂▆██████║ ║                                         ║
║                                         ║ ║ █████████▃   ▁▄██████████▇▂   ▁▅████████║ ║▔▔             ▔▔       ▔▔             ▔▔║
║▔▔▔▔▔▔ ▔▔▔▔▔▔ ▔▔▔▔▔▔ ▔▔▔▔▔▔ ▔▔▔▔▔▔ ▔▔▔▔▔▔║ ║ ███████████▇▇███████████████▆▇██████████║ ║██             ██       ██             ██║
║1      2      3      4      5      6     ║ ║  ▄▆██▅▁          ▁▅▇█▇▄           ▃▆██▆▆║ ║██             ██       ██             ██║
║1:1.7 2:1.7 3:1.6 4:1.5 5:1.4 6:1.3      ║ ║ ███████▅        ▄███████▃       ▁▆██████║ ║██          ▔▔ ██       ██ ▔▔          ██║
║balance ━━━━━━━━━━━━──────── 1.29× NORMAL║ ║ █████████▄▁   ▄██████████▇▂   ▁▅████████║ ║██ ▔▔ ▔▔ ▔▔ ██ ██ ▔▔ ▔▔ ██ ██ ▔▔ ▔▔ ▔▔ ██║
║9.2 A · 111 W · peak 111 W · pins 12.04–1║ ║ ███████████▆▆██████████████▇▆▇██████████║ ║16k · 693 · 30 Hz · 693 · 16k            ║
╚═════════════════════════════════════════╝ ╚═════════════════════════════════════════╝ ╚═════════════════════════════════════════╝

╔ SOURCES ════════════════════════════════╗ ╔ SENSORS ══════════════════════════════════════════════════════╗
║audio ok                                 ║ ║spd5118 temp1 41°                                              ║  00:00
║cpu ok                                   ║ ║━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━────────────── max 55°║
║disk ok                                  ║ ║                                                               ║
╚═════════════════════════════════════════╝ ╚═══════════════════════════════════════════════════════════════╝
 q quit · ? help · [ ] pages · hjkl focus · Enter capture · z zoom · d dense · t theme · T reload · space pause · a ack · A alerts

Generated into this file by scripts/shots.sh, which CI drift-checks — it used to be pasted by hand, and spent three arcs claiming four shipped tiles "arrive in a later arc". The real frame is a truecolor synthwave palette with gradient core bars and braille chart lines; at 131 columns both 6x3 tiles are one row short of their process tables, which the SVGs show. A photograph of a real terminal still needs a human.

Every command

The whole surface. Start here above has the two you need first; from a clone, cargo run --release -- stands in for an installed gridwatch:

cargo run --release                 # live: the Overview against this machine
cargo run --release -- run --demo   # synthetic data, no hardware needed
cargo run --release -- run --demo --theme matrix   # the rain-lit showcase theme (V re-lights, L locks lit)
cargo run --release -- run --no-effects            # no theme effects, no rain (P20)
cargo run --release -- shot --format ansi --size 250x70 --theme retrowave
cargo run --release -- run --record session.jsonl      # journal every message (tables off; --tables on, --record-input)
cargo run --release -- run --replay session.jsonl --speed 4   # replay it; nothing downstream can tell
cargo run --release -- shot --replay session.jsonl --at 30 --format svg > frame.svg
cargo run --release -- keys                                  # the metric catalogue (docs/KEYS.md)
cargo run --release -- component list                        # every component's tiers (docs/COMPONENTS.md)
cargo run --release -- config default > ~/.config/gridwatch/config.toml
cargo run --release -- doctor       # every capability with a reason and a fix (+ the live probes; --offline skips them)
cargo run --release -- config check --theme phosphor-green   # the two files, then the theme's warnings and WCAG contrast report
cargo run --release -- keybindings                           # every key (docs/KEYBINDINGS.md)
cargo run --release -- theme import ~/.config/alacritty/theme.toml -o mine.toml   # alacritty, wezterm or base16 → a theme

Keys, in full: ? shows them all; hjkl moves focus, Enter gives the keys to a tile and Esc takes them back, z zooms, t cycles themes, e edits the layout, q quits. The full list — global and per tile — is docs/KEYBINDINGS.md, generated from the same table that draws the key bar, so it cannot drift.

What is here today

Eleven tiles, seven themes, and a plugin API. Every tile renders from an 8×3 chip to a full screen; gridwatch component list prints the tier ladder for each.

  • htop — htop 3.4.1's meters with its formulas verbatim (guest subtracted, cached = Cached + SReclaimable − Shmem, iowait counted as idle), gradient core bars grouped into real CCD blocks from sysfs die_id, per-CCD frequency and Tccd, load, tasks and PSI, the top-N process table, and — zoomed — the full interactive one: search, filter, tree, tags, follow, thread toggles, the F-key bar, and kill / renice / affinity / ioprio behind a confirm line and a readonly flag.
  • gpu — nvtop 3.2.0's header, a 20 ms board-power trace, ten-minute braille charts of util / VRAM / temperature / power / clock / effective load, the GPU-Z spec column, and the GPU process table joined with the cpu scan. Over nvml-wrapper on its own thread at ≈ 4.3 ms of NVML time per second, never pcie_throughput, and never a GPU client itself. Falls back to nvidia-smi when the library will not load.
  • pins — per-pin 12V-2x6 amperage through astral-watch's own library (exporter or direct i2c, auto-selected): six bars with peak caps and the 9.2 A limit, the balance gauge, the watts trend and the alert log. Its overload alerts raise a banner on every page, and the thresholds are astral-watch's own, so what you see is what the service would send.
  • net — every interface's rates and link state with rx/tx sparklines, the default route and resolvers, latency probes over an unprivileged ICMP socket, and the connection table with the process behind each socket where the kernel lets a normal user read it.
  • disk — on page 3 of the default layout. Per-device read and write rates, IOPS, service times and the drive's own temperature, joined from the sensors source by device name rather than by index (on this machine hwmon0/1/2 are nvme1/nvme2/nvme0, and any agreement between the two numberings is a coincidence). The utilisation column says BUSY, not %util, with the mean queue depth beside it: every other tool prints diskstats field 13 as utilisation, but on an NVMe drive it is only the share of wall time the queue was non-empty, so one outstanding I/O reads 100 % while a thousand slots sit free — measured here at 524 MB/s and 7.3 % busy over one direct read. A drive is a sysfs fact (/sys/block/<dev>/device exists), which is 3 of this machine's 55 /sys/block entries and none of its 52 snap loops.
  • audio — the default sink's monitor through a supervised pw-record child, a cava-style dual-FFT spectrum with Winamp or cava ballistics, an oscilloscope and stereo VU — animating at 30 fps (60 opt-in) only while there is sound, and killing the child ten seconds after you look away.
  • winamp — the MPRIS player in classic-skin form: marquee, big elapsed digits, transport row, album art as half-blocks, and the spectrum borrowed from the audio source.
  • sensors — every hwmon chip hottest-first with the chip's own thresholds, plus RAPL package power, PSI and the GPU's row.
  • alerts, clock, sources — the last showing every source's state, generation, age, drops and restarts.
  • [[rules]] — any metric becomes an alert: an operator, a hold before it raises and one before it clears, label globs (sensor.temp_c{nvme*:Composite} is one alert per drive), and a threshold that can be another metric.
  • Plugins — a tile can be a program in any language speaking JSON lines over a pipe: no shell, resource caps, three strikes, and a view tree rather than cells, so a plugin cannot break your theme. docs/PLUGINS.md explains it in 140 lines of Python.
  • Themes — modern, retrowave, mono, terminal, phosphor-green, phosphor-amber, and the showcase matrix, whose rain prints the dashboard rather than being drawn over it. Components never name a colour or a glyph, which is why one render path serves all seven. gridwatch theme import converts an alacritty, wezterm or base16 scheme.

It is built for one workstation and says so: gridwatch doctor prints every capability with the reason it is missing and the fix, and a tile whose source cannot work shows that instead of pretending.

Where to read next

MIT licensed.

About

Modular, themeable ops dashboard for the terminal — htop/nvtop/astral-watch parity on a 12x6 grid, from retrowave to matrix

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages