proc
Semantic CLI tool for process management. Target by port, PID, name or path.
Semantic CLI tool for process management. Target by port, PID, name or path.
proc is a semantic CLI tool for process management on macOS, Linux, Windows, FreeBSD and NetBSD. Find what's on a port, why it's there, and stop it, in one command you'd guess on the first try.
~proc kill :3000
Ends whatever is listening on port 3000 immediately (SIGKILL). Asks first, and --dry-run previews.
A leading colon means a port: proc acts on whatever is listening on it.
Command
Target
The same jobs, without remembering which flags lsof needs or piping PIDs into kill.
What's on port 3000?lsof -i :3000 -P -nproc on :3000
What is PID 1234, and what does it listen on?ps -p 1234 -o pid,ppid,user,etime,command, then lsof -a -p 1234 -iTCP -sTCP:LISTENproc on 1234
Why is it there?lsof -i :3000, then ps -o ppid= up the chainproc why :3000
Free the portlsof -t -i:3000 | xargs kill && sleep 1 && lsof -i:3000proc free :3000
Wait for it to exitwhile ps aux | grep node | grep -v grep; do sleep 5; doneproc wait node
Pause a processkill -STOP $(pgrep node)proc freeze node
Find leftoversNo standard toolproc orphans --in .
Every command takes the same targets, and almost all take --in to stay inside one project, --json for scripts, and --dry-run before anything changes.
Every command prints JSON with --json (one document per command; watch streams one per refresh), and exit codes always mean the same thing. An agent can read proc the way you do, without parsing tables.
0 success, 1 error, 2 not found, 3 permission denied, 4 invalid input--dry-run shows what would be touched, and nothing else❯ proc on :8080 --json | jq '.process | {pid, cwd, uptime_secs}'
{
"pid": 177,
"cwd": "/home/dev/code/shop",
"uptime_secs": 35
}
Texto de proc-cli.com tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en proc-cli.com · Volver a la noticia de El Autómata