prt-0.2.0 is not a library.
prt
Real-time network port monitor for your terminal.
An interactive alternative to lsof -i / ss -tlnp with colors, filtering, and process trees.
Install
Requirements: Rust 1.75+ · macOS 10.15+ or Linux with /proc · lsof (macOS — preinstalled)
Features
| Feature | Description |
|---|---|
| Live table | Ports, protocols, states, PIDs, processes, users. Auto-refreshes every 2s |
| Change tracking | New connections flash green; closed ones fade red for 5s |
| Process tree | Full parent chain (e.g. launchd → nginx → worker) |
| Detail tabs | Tree / Network / Connection — toggle with 1 2 3 |
| Search & filter | By port, process name, PID, protocol, state, user |
| Sort | By any column, ascending or descending |
| Kill | Select → K → confirm with y (SIGTERM) or f (SIGKILL) |
| Sudo elevation | Press s — see all system processes |
| Clipboard | Copy full line (c) or just PID (p) |
| Export | prt --export json or prt --export csv |
| Multilingual | English, Russian, Chinese. Auto-detects locale, switch with L |
Usage
Keyboard shortcuts
| Key | Action | Key | Action | |
|---|---|---|---|---|
q |
Quit | K / Del |
Kill process | |
? |
Help | c |
Copy line | |
/ |
Search | p |
Copy PID | |
Esc |
Clear filter | Tab |
Next sort column | |
r |
Refresh | Shift+Tab |
Reverse sort | |
s |
Sudo prompt | L |
Cycle language | |
j/k ↑/↓ |
Navigate | 1 2 3 |
Detail tabs | |
g / G |
Top / bottom | Enter / d |
Toggle details |
Architecture
prt is the TUI frontend built on ratatui. All core logic lives in prt-core.
crates/
├── prt-core/ # Core library: scanner, tracker, killer, i18n, platform
└── prt/ # TUI binary (ratatui + crossterm + clap)