netwatch ~ ~/labs/netwatch.md
stable·v0.35.4
cd~/labs/netwatch
← all tools
netwatch.tui

netwatch

Network diagnostics in your terminal.

Inspect connections, capture packets and investigate network problems. Available on Linux, macOS and Windows; capture access and diagnostic coverage vary by platform.

Diagnose ranks possible causes, suggests checks and tracks observed recovery. TLS decryption requires session keys exported by a client you control.

~ $ netwatchtui
// netwatch · loops · no audio▶ play demo
// 01 · install

Install

macOS / Linux · Homebrew
$brew install netwatch

Homebrew must be installed; no tap required.

Windows · Scoop
$scoop install netwatch

Requires Scoop and Npcap. Install Npcap before capturing packets.

Prebuilt · cargo-binstall
$cargo binstall netwatch-tui

Requires cargo-binstall. Downloads a release binary instead of compiling.

Release binaries
Download releases →

Choose your OS and architecture. Linux release binaries bundle libpcap; Windows requires Npcap. Checksums are included.

Cargo · source build
$cargo install netwatch-tui --locked

Requires a current Rust toolchain, a C build toolchain and libpcap headers: libpcap-dev on Debian/Ubuntu, libpcap-devel on Fedora, or libpcap on Arch. Windows source builds also require the Npcap SDK.

From source
$git clone https://github.com/matthart1983/netwatch.git && cd netwatch && cargo build --release --locked

Run ./target/release/netwatch after building, or copy it to a directory on your PATH.

// 02 · quick start

Quick start

  1. 1
    Start with interface and connection visibility
    $netwatch
  2. 2
    Check setup and unavailable capabilities
    $netwatch doctor
  3. 3
    Enable capture where elevated access is required (macOS / Linux)
    $sudo netwatch
  4. 4
    Use a compact terminal
    $netwatch --lite
  5. 5
    Open the dense view
    $netwatch --view dense
// 03 · permissions and coverage
Permissions and coverage

Process attribution and TCP metrics depend on the platform, permissions and available measurements. Windows has no kernel TCP metrics collector. A quiet Diagnose screen does not establish that the host is healthy.

// 04 · the tabs

The tabs

V cycles Full, Lite and Dense; ? opens help; q quits. In Diagnose, e exports report.md and report.json. AI commentary is optional within Diagnose and off by default.

KeyView
1Dashboard
2Connections
3Interfaces
4Packets
5Stats
6Topology
7Timeline
8Processes
9Diagnose
0Egress
// 05 · decrypt traffic you control

Decrypt traffic you control

Set tls_keylog_path in NetWatch’s config to /tmp/netwatch-keys.log. Start capture, then launch a client that supports session-key logging with SSLKEYLOGFILE=/tmp/netwatch-keys.log. Capture the handshake; use decrypted:true in Packets. Key export depends on the client and its TLS backend.

  1. 1
    Generate a config if you do not already have one
    $netwatch --generate-config
  2. 2
    Create the key log before starting capture
    $touch /tmp/netwatch-keys.log
// 06 · egress policy
Egress policy

Egress learns outbound destinations and reports policy violations. It warns; it does not block traffic.

// 07 · linux capture without sudo
Linux capture without sudo

Grant cap_net_raw to the executable with sudo setcap cap_net_raw+eip "$(which netwatch)". Reapply after replacing the binary. Optional eBPF has additional kernel and capability requirements and is disabled in sandboxed runs; a capability grant does not prove attribution is available.

// 08 · sandbox scope
Sandbox scope

Linux worker filesystem restrictions do not provide network isolation. macOS and Windows do not have the same sandbox backend. See the upstream capability matrix before relying on a protection.

// related