Kill whatever is listening on a port - blazingly fast.
kp 3000 # kill the process on port 3000
kp 3000 8080 5173 # free several ports at once
kp -l 3000 # just list what's holding the port
kp -n 3000 # dry run: show what would be killed
kp -g 3000 # graceful: SIGTERM, then SIGKILL if it lingers
Homebrew:
brew install lawandothman/tap/kp
Or grab a prebuilt binary with the install script:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/lawandothman/kp/releases/latest/download/kp-installer.sh | sh
Or build from source (needs Rust):
cargo install --git https://github.com/lawandothman/kp
macOS only for now. The binary is ~320 KB with no runtime dependencies.