If you're like me and you google
lsof -i :3000 or ps aux | grep node | grep -v grep | awk '{print $2}'
at least once a month, I built something for you.
# What's on port 3000?
proc on :3000
# Kill it
proc kill :3000
# What ports is node using?
proc on node
# What processes are running in current directory?
proc in .
# Find node processes in current directory
proc by node --in .
# What's running this script?
proc for ./server.py
# Kill multiple things at once
proc kill :3000,:8080,node
Same syntax everywhere: :port, PID, or name.
Install
# macOS
brew install yazeed/proc/proc
# Windows
scoop bucket add proc https://github.com/yazeed/scoop-bucket-proc && scoop install proc
# Rust
cargo install proc-cli
# npm
npm install -g proc-cli
# Nix
nix profile install github:yazeed/proc
# Or just curl it
curl -fsSL https://raw.githubusercontent.com/yazeed/proc/main/install.sh | bash
Links
- GitHub: https://github.com/yazeed/proc
- Written in Rust, works on macOS/Linux/Windows, MIT licensed
Feedback welcome.
Top comments (0)