Too many dev servers running and ports colliding? Can't remember the netstat incantation to figure out what's hogging port 3000?
zap gives you a live TUI to find processes by port and kill them — with proper handling for containers (Podman/Docker) and systemd services. The list auto-refreshes every 2 seconds so you can watch a service come up, confirm a kill took effect, or spot new port conflicts without pressing a key.
go install github.com/dnlvgl/zap/cmd/zap@latestOr build from source:
go build -o zap ./cmd/zap/# Interactive TUI showing all listening ports
zap
# Target a specific port
zap :3000
# Port range
zap :8080-8090
# Specific interface
zap localhost:5432
# Force kill (SIGKILL)
zap :3000 --force
# Dry run (non-interactive, shows what would be killed)
zap :3000 --dry-runzap automatically picks the best way to stop a process:
- Container —
podman stop/docker stopfor containerized processes - Systemd —
systemctl stopfor systemd-managed services - Signal —
SIGTERM(orSIGKILLwith--force) for bare processes
| Flag | Short | Description |
|---|---|---|
--force |
-f |
Use SIGKILL / container kill instead of graceful stop |
--dry-run |
-n |
Show what would be killed (non-interactive) |
--version |
-v |
Print version |
--help |
-h |
Show help |
Pushing a v* tag triggers the GitHub Actions release workflow, which uses GoReleaser to build and publish binaries.
git tag v0.2.0
git push origin v0.2.0