Port Kill
Kill processes on a port with one command. Works on macOS, Linux, Windows.
Installation
npm install -g @lxgicstudios/port-kill
Commands
Kill Process on Port
npx @lxgicstudios/port-kill 3000
npx @lxgicstudios/port-kill 8080
Force Kill (SIGKILL)
npx @lxgicstudios/port-kill 3000 -f
List Without Killing
npx @lxgicstudios/port-kill 3000 --list
Check if Port is Used
npx @lxgicstudios/port-kill --check 3000
Find Available Ports
npx @lxgicstudios/port-kill --find 3000
Returns next available ports starting from 3000.
Options
| Option | Description |
|---|---|
-f, --force |
Force kill (SIGKILL) |
-l, --list |
List processes only |
--check <port> |
Check if port is in use |
--find <port> |
Find available ports |
Common Use Cases
Kill stuck dev server:
npx @lxgicstudios/port-kill 3000
Check what's on port 8080:
npx @lxgicstudios/port-kill 8080 --list
Find next available port:
npx @lxgicstudios/port-kill --find 3000
Cross-Platform
- macOS: Uses
lsof - Linux: Uses
lsoforss - Windows: Uses
netstat
Built by LXGIC Studios