- Build:
make(BUILD=build TYPE=release CXX=clang++overrides). - Test:
make test(orctest --test-dir build --output-on-failure). - Direct cmake: presets
ninja-release/ninja-debug/ninja-asan. - Compiler:
CXX=clang++first,CXX=g++fallback. Never commit without asking.
src/cli.*: option parsing/validation (--sorttypes,-v/--log, full--help).src/priv.hpp: is_root + sudo snippet.src/collector.*: loop-command builder + forkedsh -cowner (own process group, group kill on stop).src/parser.*:wg show all dumpframe parser (all consumers use it).src/rates.*: per-peer rates + 120-sample histories (mutex-guarded) +sort_peers()display ordering.src/format.hpp: byte/rate/age formatting.src/sampler.*: libev reader thread (only file including<ev.h>); emits stale frames on EOF or stall (>2.5× update, min 3s).src/ui.*,src/main.cpp: boxed peer layout, PlotWidget (line/bar), dynamic plot height (plot_height_for),t/pkeys; spdlog setup lives in main (-v→ debug,-vv→ trace,--log→ file). [AGENTS.md#A685]cmake/*.cmake: FetchContent packages (SYSTEM + FIND_PACKAGE_ARGS).src/theme.hpp: 12 built-in themes (terminalcolors.com palettes);theme_at()wraps for thetkey.src/unicode_utils.hpp: braille-dot -> block-octant table (wuni::kOctant)- UTF-8 encoder for the bar plots.
src/config.hpp:~/.config/wgwatch/configload/save (atomic rewrite); toggles persist, CLI flags override the file.tests/fake-wg.py: fakewg show all dumpfor demos (--command, env-tuned loads,.fake-wg-statecounters).package.nix/default.nix: nix derivation + non-flake entryRELEASE.md: release checklist (bump → tag → push).
- Makefile wraps cmake only (
cmake -S/-B,cmake --build,ctest); theln -sforcompile_commands.jsonis the one exception. - Tests read fixtures from
_attic/viaWG_ATTIC_DIR; notests/fixtures/. - Trace points use function-form
spdlog::trace(always compiled); keep them to sizes/counts, never key material. README.mdis user-facing: keep install commands copy-pasteable with exact package filenames;RELEASE.mdowns the release procedure.