Skip to content

devmilon923/Process-Killer-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Process Killer CLI ⚑

A fast, cross-platform utility to safely kill processes using specific ports on Windows, macOS, and Linux.

npm version license node version

🎯 Features

✨ Cross-Platform - Works on Windows, macOS, and Linux
🎯 Interactive Menu - Easy OS selection (no need to memorize commands)
πŸ›‘οΈ Safe - Always asks for confirmation before killing processes
βš™οΈ Zero Dependencies - Uses only Node.js built-in modules
πŸš€ Fast - Kills ports instantly
🎨 Beautiful UI - Colorized output with Unicode borders
πŸ“Š Developer Info - Shows package info on success

πŸ“¦ Installation

npm install -g process-killer-cli

The -g flag installs globally, making the command available everywhere.

πŸš€ Quick Start

process-killer

Then follow the prompts:

  1. Select OS - Choose your operating system (1=Windows, 2=macOS, 3=Linux)
  2. Enter Port - Type the port number (e.g., 3001, 8080, 5000)
  3. Confirm - Review the process info and confirm
  4. Done! - Port is freed and ready to use

πŸ’‘ Common Use Cases

Kill Node.js Server

$ process-killer

Select your Operating System:
  1) Windows
  2) macOS
  3) Linux

Enter your choice (1, 2, or 3): 2
βœ“ macOS selected

Enter the port number you want to stop (e.g., 8087): 3000

➜ Searching for processes using port 3000...

Found process with PID: 12345 using port 3000
Process Name: node
Port: 3000
PID: 12345

Do you want to kill this process? (y/n): y

βœ“ Port 3000 has been killed!

You can now start your backend server on this port.

Kill Java Application (Port 8080)

$ process-killer
...
Enter the port number you want to stop: 8080
βœ“ Port 8080 has been killed!

Kill Python Flask (Port 5000)

$ process-killer
...
Enter the port number you want to stop: 5000
βœ“ Port 5000 has been killed!

πŸ–₯️ Supported Operating Systems

OS Status Notes
Windows βœ… Fully Supported Uses netstat, tasklist, taskkill
macOS βœ… Fully Supported Uses lsof, ps, fuser
Linux βœ… Fully Supported Uses lsof, ps, fuser

πŸ“‹ Requirements

  • Node.js >= 12.0.0
  • npm or yarn

πŸ”§ How It Works

Windows

  • Uses netstat -ano to find process by port
  • Uses tasklist to get process name
  • Uses taskkill /PID X /F to terminate process

macOS & Linux

  • Uses lsof -ti:PORT to find process by port
  • Uses ps to get process name
  • Uses fuser -k PORT/tcp to terminate process

⚠️ Troubleshooting

Port Still Shows as In Use

Some ports enter TIME_WAIT state. Wait 30-60 seconds and try again.

Permission Denied (macOS/Linux)

The tool may need elevated privileges:

sudo process-killer

Process Not Found

Verify the port number is correct using:

Windows:

netstat -ano | findstr :3000

macOS/Linux:

lsof -i :3000

Command Not Found

Make sure you installed it globally with the -g flag:

npm install -g process-killer-cli

πŸ—‘οΈ Uninstall

npm uninstall -g process-killer-cli

πŸ“š Advanced Usage

Manual Port Killing (Without Tool)

Windows:

netstat -ano | findstr :3000
taskkill /PID 12345 /F

macOS/Linux:

lsof -i :3000
sudo kill -9 12345
# OR
sudo fuser -k 3000/tcp

πŸ”„ Update to Latest Version

npm install -g process-killer-cli@latest

πŸ“ What's New in v1.0.8

  • ✨ Fixed installation documentation
  • 🎨 Beautiful colorized UI with Unicode borders
  • 🌍 Cross-platform support (Windows, macOS, Linux)
  • πŸ“‹ Interactive OS selection menu
  • 🎯 Safe operation with confirmation
  • πŸ“Š Developer information display
  • ⚑ Zero external dependencies

🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

Visit GitHub Repository

πŸ“„ License

MIT Β© Milon Mia

This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Author

Milon Mia

πŸ™ Support

If you found this tool helpful, please:

  • ⭐ Star on GitHub
  • πŸ“’ Share with friends
  • πŸ› Report issues
  • πŸ’‘ Suggest improvements

FAQ

Q: Is it safe to use?
A: Yes! The tool always asks for confirmation before killing any process.

Q: Can I use this on Windows?
A: Yes! Full native Windows support without WSL.

Q: Do I need to remember commands?
A: No! Interactive menu guides you through every step.

Q: What if I kill the wrong process?
A: The tool shows process details before killing, so you can verify.

Q: Can I use this in scripts?
A: This tool is interactive. For automation, use OS-specific commands directly.

Q: Why do I need the -g flag?
A: The -g flag installs the tool globally so you can use the process-killer command from any folder on your computer.

πŸŽ“ Learn More

πŸ“ž Feedback

Have questions or suggestions? Open an issue on GitHub: GitHub Issues


Made with ❀️ for Developers

Happy coding! πŸš€

About

A fast, cross-platform utility to safely kill processes using specific ports on Windows, macOS, and Linux.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors