Skip to content
CAI
Software that uses CAICheck a score

imsnif/bandwhich

69.7

Adequate · 29 September 2026

2.7k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Bandwhich is a command-line network bandwidth monitor that captures and visualizes real-time traffic for IPv4 and IPv6 connections. It provides a responsive terminal interface to display per-process and per-connection usage, supporting features like asynchronous DNS resolution, raw machine-readable output, and cross-platform compatibility across Linux, macOS, FreeBSD, and Windows.

Features

Add Windows and BSD support and restructure OS abstraction layer

The \src/os\ module has been restructured to support Windows and BSD-family operating systems (macOS, FreeBSD) alongside Linux. Linux now uses the \procfs\ crate to map sockets to processes, while macOS and FreeBSD use \lsof\ via a new \lsof\_utils\ module. Windows support is added via \netstat2\ and \sysinfo\. The module also introduces a unified \GetInterfaceError\ type for better error handling and uses \crossterm\ for cross-platform terminal event polling.

src/os · high confidence

Initial project scaffolding and documentation

The repository is initialized with core documentation files including a CHANGELOG, README, INSTALL guide, CONTRIBUTING guidelines, and a Code of Conduct. The project structure includes a build script (build.rs) that generates shell completions and man pages, and handles Windows-specific dependencies like the npcap SDK. A Cross.toml file is added to support cross-compilation, and the .gitignore is updated to standardize the target directory exclusion.

(repo-wide) · high confidence

Introduce network connection tracking and packet sniffing infrastructure

This change introduces the core network monitoring components in \src/network\, including a \Sniffer\ that captures IPv4 and IPv6 packets, a \Connection\ model that identifies flows by local IP, local port, and protocol, and a \Utilization\ tracker that aggregates upload/download bytes per connection. The sniffer handles interface disconnections by resetting the capture channel and respects a \show\_dns\ flag to filter DNS traffic, providing the foundational data structures and ingestion logic for network bandwidth visualization.

src/network · high confidence

Behavioural changes

Asynchronous reverse DNS resolution with Hickory resolver

The DNS module has been rewritten to perform reverse DNS lookups asynchronously using the Hickory resolver library. This change introduces a background worker thread that processes IP-to-hostname resolution requests via a channel, preventing blocking the main application thread. The implementation now supports configuring a custom DNS server address and handles cases where no hostname is found by storing the IP address itself, improving performance and responsiveness for network operations.

src/network/dns · high confidence

Major CLI and UI overhaul: migrate to clap, crossterm, and ratatui

The application's command-line interface and terminal UI have been completely rewritten. The CLI argument parsing has moved from structopt to clap, introducing new options such as --raw for machine-friendly output, --no-resolve to skip DNS lookups, --show-dns to display queries, --dns-server for custom DNS, and --log-to for file logging. The terminal backend has switched from termion to crossterm, and the UI framework from tui-rs to ratatui, enabling better cross-platform support (including Windows) and more robust terminal resize handling. The internal architecture has been restructured to separate concerns, with new modules for CLI, display, network, and OS interactions, replacing the previous monolithic lib.rs and current\_connections.rs structures.

src · high confidence

New display module with raw output and responsive UI

The \src/display\ module has been restructured into dedicated components (\ui\, \ui\_state\, \components\, \raw\_terminal\_backend\) to support both an interactive terminal interface and a machine-friendly raw output mode. The new \RawTerminalBackend\ allows stdout to remain in standard mode when raw output is requested, avoiding the side effects of raw terminal manipulation. The UI now features a responsive layout that reacts to window size changes, configurable table ordering via CLI flags, and displays bandwidth in various unit families. Additionally, the display layer now handles DNS resolution lazily and shows interface names by default.

src/display · high confidence

New responsive layout and bandwidth formatting components

The display layer has been refactored into modular components that provide a responsive terminal interface. A new layout engine automatically adjusts the arrangement of tables (Process, Network, etc.) based on terminal dimensions, collapsing or re-splitting views when space is constrained. Bandwidth values are now formatted using a dedicated component that supports multiple unit families (binary and SI, bytes and bits) with consistent suffixes, and the header now displays cumulative elapsed time and pause status. Help text dynamically updates to show pause/resume instructions and DNS visibility status based on the current state and screen width.

src/display/components · high confidence

Test coverage

Added test fakes for network input and terminal output; Clean up CLI snapshot tests; Introduction of test module structure; Migrate test suite to snapshot testing with rstest and cargo-insta; Removal of legacy integration test suite and fake implementations; Snapshot tests for raw mode and UI layout updated.

Dependencies

Major dependency overhaul and project rename to bandwhich

The project has been renamed from 'what' to 'bandwhich' and updated to version 0.23.1, requiring Rust 1.88.0 or later. This release performs a comprehensive upgrade of the dependency tree: the terminal UI library has migrated from 'tui' to 'ratatui' (v0.30.0), the terminal backend switched from 'termion' to 'crossterm' (v0.29.0) for cross-platform support, and DNS resolution moved from 'trust-dns-resolver' to 'hickory-resolver' (v0.26.1). Additionally, the CLI argument parser was updated from 'structopt' to 'clap' (v4.5.61), error handling switched from 'anyhow' to 'eyre', and the minimum supported Rust version (MSRV) was raised to 1.88.0.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 70 (+3.1)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.17) — scores are not directly comparable.

Lenses

  • Code Health 96 → 96 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 57 → 57 (+0.0)
  • Readiness 83 → 80 (-2.8)
  • Security 58 → 72 (+13.8)
  • Performance 100 (new)

Resolved (2)

  • Documentation: no architecture or design documentation (README.md)
  • Off-boarding risk: anonymized user #1

New (2)

  • Dependency hygiene PARTLY measured — Cargo dependencies read, dependency currency not (crates.io unreachable)
  • Off-boarding risk: anonymized user #1

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

imsnif/bandwhich was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 1899870cea8bb377948f05cfea64733ec6ea2cd6 — the exact code this score is about.
  • Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-70910855e4b4.