Kaval. Guard your ports.
[kaa-val] · noun · guard / watch
See what's listening. Kill what shouldn't be. A developer-focused port and process manager for your terminal — built in Rust. Fast, interactive and scriptable.
v0.2.0 · MIT · macOS (Apple Silicon & Intel) · Linux (x86_64 & arm64)
Know your ports. Control your stack.
Stop running lsof | grep five times a day.
Every port, every owner
Every TCP and UDP listener with the process, command line, parent, CPU, memory and uptime behind it.
Exposure at a glance
See which ports other machines can reach, and show only those with a single keypress.
Projects & containers
Each listener is tied to its git project, and Docker-published ports to their container and compose project.
Kills that finish the job
Waits until the port is really free, catches supervisors that restart it, and frees container ports with docker stop.
Safe by default
Asks before killing, refuses container runtimes and system services, and never signals a reused PID.
Knows your stack
Detects 140+ services from command lines, process names and ports: Next.js, Vite, Django, Postgres, Redis, Kafka and more.
Built for scripts & agents
Versioned JSON, meaningful exit codes, kav wait for a server to come up and kav pick for a free port.
Dark & light themes
Matches your terminal background automatically, with a 256-colour fallback and NO_COLOR support.
Ready to guard your ports?
Install Kaval in seconds. No dependencies, no setup.
brew install AppachiTech/kaval/kavalHomebrew also installs the man page and shell completions. The download commands check the published SHA-256 checksum before installing; the Linux binaries are static and run on any distribution. More options in the README.
Frequently asked questions
Does Kaval need sudo?
Not for your own processes — the dev servers, databases and containers you started. On macOS, other users' processes (system services) are only visible with sudo; Kaval says when some are hidden, and kav check still reports their ports as in use.
How is it different from lsof?
Kaval shows every listening port with its process, project, container and exposure in an interactive TUI with filtering, sorting and one-key kills, and it waits until a port is really free. lsof gives you a wall of text you pipe through grep five times.
Is it safe to kill from Kaval?
Yes. Kaval asks before killing, refuses container runtimes and system services unless you insist, re-checks that a PID still belongs to the same process before signalling it, and tells you when a supervisor such as nodemon restarts what you stopped.
Can I kill multiple ports at once?
Yes. "kav kill 3000 5432" stops everything on both ports in one command, and in the TUI you can mark several rows with Space.
Does it work with Docker?
Yes. Ports published by containers show the container's name, image and compose project, and stopping one runs docker stop for that container instead of killing Docker itself.
Can I use it in scripts, CI or with AI coding agents?
Yes. kav list, check and kill print versioned JSON, every command has documented exit codes, kav wait 3000 blocks until a server is up, and kav pick prints a free port. Nothing prompts when it runs without a terminal.
Which platforms does it support?
macOS on Apple Silicon and Intel (one universal binary), and Linux on x86_64 and arm64 (static binaries that run on any distribution). Windows is not supported.
Is it open source?
Yes, MIT licensed. Source at github.com/AppachiTech/kaval.