netls
netls - a network connections viewer built for developer workflows and automation.
- JSON & CSV output - pipe directly into
jq, scripts, or AI agents - Container visibility - shows which container owns each connection (Docker and Podman)
- Process tree - trace any connection back to its parent process chain
- Watch mode - live diff, see new and closed connections in real time
- CI-friendly -
--wait-for 8080blocks until a port is up - Configs & profiles - save common flag sets and switch with one flag
- And more - TUI, snapshot diff, service name annotations, port utilities
- Linux & macOS - full support on both platforms; macOS works entirely without root
Contents
Quick look
Container visibility - which container owns each connection:

Process tree - full parent chain per connection:

Default output:

Installation
Supported platforms: Linux, macOS. Requires Rust 1.88 or newer.
Usage
Filters
Filters can be combined:
Extra columns
Aggregation and analysis
Snapshot and diff
Port utilities
Output
Table (default)
Colors are enabled automatically when stdout is a terminal and disabled in pipes/redirects.
JSON
One JSON object per line. Use --pretty for human-readable output:
CSV
proto,local,remote,state,pid,process
tcp,127.0.0.1:8080,127.0.0.1:54321,ESTABLISHED,1234,cargo
tcp,0.0.0.0:22,0.0.0.0:*,LISTEN,891,sshd
Watch mode
Refreshes every 2 seconds. New connections are shown in green, closed connections in red. Exit with Ctrl+C.
TUI
Interactive mode with live updates, keyboard navigation, and inline filtering. Exit with q or Ctrl+C.
Configuration
netls can read defaults and named profiles from a TOML config file. Location (first match wins):
--config PATHflagNETLS_CONFIGenvironment variable~/.config/netls/config.toml(or the platform equivalent)
Example ~/.config/netls/config.toml:
# Applied at every invocation unless overridden on the command line
[]
= "tcp"
= "port"
= true
# Extend the built-in port -> service-name map
[]
= "vite-dev"
= "astro-dev"
= "node-debug"
# Named overlays activated with --profile <name>
[]
= true
= true
[]
= true
= true
[]
= "listen"
= true
Usage:
Helper commands:
All three accept --config PATH to target a specific file instead of the default.
Notes:
- Config field names match long-form CLI flags with
-replaced by_(no_loopback,service_names,group_by, etc.). - One-shot actions (
--watch,--summary,--top,--count,--tui,--check-port,--kill,--wait-for,--save,--diff,--warn-timewait,--timeout,--force) are not configurable. - A non-empty
[ports]auto-enables--service-names. Setservice_names = falsein[defaults]to opt out. NETLS_CONFIGexpands a leading~/~/to your home directory.
Negation flags
Every boolean flag that can be set from [defaults] or a profile has a
--no-X counterpart to turn it back off on the command line. For example:
Negation flags are hidden from --help to keep it readable. If --X and
--no-X appear on the same command line, the last one wins.
The --no-loopback flag is itself already negative; its antonym is
--loopback.
As a library
netls is also a Rust library for programmatic access to socket information:
[]
= "1"
use ;
License
Licensed under either of MIT or Apache-2.0 at your option.