I built a CLI for the process/port commands I could never remember

I built a CLI for the process/port commands I could never remember

posted Originally published at dev.to 1 min read

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

Feedback welcome.

1 Comment

1 vote
0

More Posts

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

Optimizing the Clinical Interface: Data Management for Efficient Medical Outcomes

Huifer - Jan 26

I built a tiny Linux tool that shouts “FAHH” when I type the wrong command

AHamza89466 - Mar 16

Knowledge as Code: A Pattern for Knowledge Bases That Verify Themselves

snapsynapseverified - Mar 27
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!