kaval-0.1.0 is not a library.
Kaval — Guard your ports.
Kaval (காவல், Tamil for "Guard/Watch") is a developer-focused port and process manager TUI built in Rust.
Stop running lsof -i :3000 | grep LISTEN. Kaval shows all listening ports, maps them to processes, identifies known dev tools, and lets you kill with a keystroke.
Features
- See everything at a glance — all listening ports with process name, PID, CPU, memory, uptime
- Smart service detection — recognizes Vite, Next.js, PostgreSQL, Redis, Django, Docker, Elasticsearch, and 56+ more
- Interactive TUI — filter, sort, navigate, kill processes — all from one screen
- One-shot commands —
kav list,kav check 3000,kav kill 3000for scripting - JSON output —
kav list --jsonfor piping to other tools - Sort by any column —
kav list --sort cputo find what's eating resources - Multi-port operations —
kav check 3000 5432 8080orkav kill 3000 5432 - Color-coded — green for dev servers, yellow for databases, purple for caches
- Safe terminal handling — panic hook ensures your terminal is never left broken
Install
Homebrew (recommended):
&& &&
Manual (macOS):
|
Manual (Linux):
|
Cargo (crates.io):
Build from source:
Update
Manual install users can re-run the install command — the URL always points to the latest release.
Usage
|
Exit Codes
| Command | 0 | 1 | other |
|---|---|---|---|
kav list |
always | — | — |
kav check |
≥1 port active | no ports active | — |
kav kill |
≥1 process killed | nothing listening | kill failed (e.g. permission denied) |
kav completions |
always | — | — |
kav man |
always | — | — |
Designed for scripting: kav check 3000 && echo "server is up" or kav kill 3000 || echo "nothing to kill".
JSON Output Schema
kav list --json outputs a JSON array — one object per listening port:
| Field | Type | Description |
|---|---|---|
port |
integer | Port number |
protocol |
"TCP" | "UDP" |
Socket protocol |
process |
string | Process name as reported by the OS |
service |
string | null |
Identified service name (null if unknown) |
pid |
integer | Process ID |
cpu |
float | CPU usage % (sampled over ~200 ms at startup) |
memory_mb |
float | Resident memory in megabytes |
uptime_secs |
integer | Process uptime in seconds |
Example usage with jq:
|
|
|
TUI Keyboard Shortcuts
| Key | Action |
|---|---|
↑/↓ or j/k |
Navigate |
Home / End |
Jump to top / bottom |
/ |
Filter by port, name, or service |
Ctrl+X |
Kill selected process (with confirmation) |
Ctrl+K |
Force kill (SIGKILL, with confirmation) |
Ctrl+D |
Toggle detail pane |
Ctrl+S |
Cycle sort (Port → Name → CPU → Mem) |
Ctrl+T |
Cycle TCP/UDP filter |
Ctrl+R |
Force refresh |
PgUp/PgDn or ←/→ |
Scroll detail pane |
Ctrl+Q / Esc |
Quit |
? |
Show keyboard shortcut help |
y |
Yank port number to clipboard |
o |
Open http://localhost:<port> in browser |
Privacy
- Zero storage: Kaval writes nothing to disk. No config, no logs, no database.
- Zero network: Kaval makes no network connections of any kind.
- Zero telemetry: No analytics, no crash reports, no data collection.
Links
License
MIT — Madhubalan Appachi