Skip to content

MoaKK/KillPort-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

killport-cli

Kill whatever is running on a port, without digging through lsof output yourself.

Install

npm install -g @moakk/killport-cli

Usage

killport 3000
killport 3000 8080 5432

Skip the confirmation prompt:

killport 3000 --force

What it shows

Port 3000 is in use:
  Process : node
  PID     : 12345
  User    : bob
  Command : /usr/local/bin/node server.js

Kill it? [y/N]

Notes

  • Tries SIGTERM first, falls back to SIGKILL if the process doesn't exit within 2 seconds
  • If you get a permission error, re-run with sudo
  • macOS and Linux only (uses lsof and ps under the hood)

License

ISC

About

Kill whatever's running on a port, without digging through lsof output.

Topics

Resources

Stars

Watchers

Forks

Contributors