A CLI tool to kill processes by port. It helps quickly free occupied ports during local development.
npm install -g kill-port-process-cliTap repository: luckfunc/homebrew-tap
brew tap luckfunc/tap
brew install kill-port-process-cliAvailable commands:
kill-portk-pk
Recommended command:
k 3000 3001Equivalent commands:
k-p 3000 3001
kill-port 3000 3001This tool is compatible with Windows, macOS, and Linux.
- The tool identifies the process ID (PID) using the specified port.
- It terminates the process associated with that PID.
- On Unix-based systems, it uses
lsof. - On Windows, it uses
netstat.
Contributions are welcome. Please open an issue or submit a pull request.