No description
Find a file
2026-03-28 09:02:05 -07:00
src feat: prompt global install on first run 2026-02-24 23:07:41 -08:00
.gitignore feat: cli-killport — kill any process by port, zero zombies 2026-02-24 22:52:45 -08:00
CLAUDE.md Add remote build instructions to CLAUDE.md 2026-03-28 09:02:05 -07:00
LICENSE feat: cli-killport — kill any process by port, zero zombies 2026-02-24 22:52:45 -08:00
Makefile Add remote build instructions to CLAUDE.md 2026-03-28 09:02:05 -07:00
package-lock.json fix(banner): use figlet ANSI Shadow font for proper ASCII art 2026-02-24 23:02:59 -08:00
package.json feat: prompt global install on first run 2026-02-24 23:07:41 -08:00
README.md docs: rewrite readme to match lowercase gold standard style 2026-03-02 02:26:38 -08:00
tsconfig.json feat: cli-killport — kill any process by port, zero zombies 2026-02-24 22:52:45 -08:00

kill any process occupying a port. unix-first, zero-zombie, one command.

npx cli-killport 3000

what it does

  1. finds every process bound to the given port (lsof, fuser, ss)
  2. shows you what it found — pid, name, user, command, state, children
  3. kills the entire process tree bottom-up (children first, parent last)
  4. sends SIGTERM → brief grace → SIGKILL (-9) → kills process group
  5. reaps zombie children by signaling parent processes
  6. verifies the port is actually free before exiting

install

# use directly with npx (no install needed)
npx cli-killport 1420

# or install globally
npm i -g cli-killport
killport 1420

# short alias
kp 1420

usage

killport <port> [options]

options

flag description
-h, --help show help
-v, --version show version
-s, --silent suppress banner and verbose output

examples

killport 1420          # kill whatever is on port 1420
killport 3000          # free up port 3000
kp 5173                # short alias
npx cli-killport 8080  # no install needed

platforms

  • macOS — first-class support via lsof
  • Linux — lsoffuserss fallback chain

why

because lsof -i :1420 | awk '{print $2}' | tail -1 | xargs kill -9 is not a real workflow. and it leaves zombie children behind.

license

MIT