A CLI tool to kill processes by port. This tool allows you to terminate processes running on specified ports. It is useful for developers who need to quickly free up ports during development.
npm install kill-port-process-clinpm install -g kill-port-process-cliYou can use the tool by running the k or k-p or kill-port command followed by one or more port numbers.
We recommend using the k command for simplicity and ease of use.
To kill processes running on ports 3000 and 3001:
k 3000 3001or
k-p 3000 3001or
kill-port 3000 3001This tool is compatible with Windows, macOS, and Linux.
- The tool identifies the process ID (PID) using the specified port.
- It then terminates the process associated with that PID.
- On Unix-based systems, it uses the
lsofcommand. - On Windows, it uses the
netstatcommand.
Contributions are welcome! Please open an issue or submit a pull request.