npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kill-my-port

v1.1.2

Published

Easily kill processes running

Readme

npm npm downloads npm bundle size GitHub last commit Maintenance GitHub license GitHub issues Contribute GitHub stars GitHub forks platform Node.js GitHub Workflow Status

kill-my-port – Kill Processes Running on a Port Instantly 🚀

kill-my-port is a simple and efficient CLI tool that helps developers quickly free up ports by terminating processes running on them. It works across Windows, macOS, and Linux and provides an interactive mode if no port is specified.

📦 Installation

Option 1: Run Without Installation (NPX)

You can use kill-my-port instantly without installing it:

npx kill-my-port 3000

Option 2: Install Globally (for Persistent Use)

To use kill-my-port as a command without npx:

npm install -g kill-my-port

Now, you can run it like this:

kill-my-port 3000

🛠️ Usage

1️⃣ Kill a Process on One or More Ports

kill-my-port 3000 5000 8080

This will find and terminate processes running on ports 3000, 5000, and 8080.

2️⃣ Auto-Detect Running Ports and Choose One to Kill

If you run the command without specifying a port, it will list active ports and let you pick one:

kill-my-port

Example output:

🔍 Active ports:

COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
node      1234  user    22u  IPv4 0x1234  0t0  TCP 127.0.0.1:3000 (LISTEN)
python    5678  user    23u  IPv4 0x5678  0t0  TCP 127.0.0.1:5000 (LISTEN)

Enter a port to kill: 3000
❗ Kill process running on port 3000? (y/n): y
✅ Port 3000 has been freed.

3️⃣ Handling a Port Not in Use

If you try to kill a port that has no active process, it will inform you:

kill-my-port 8000
⚠️ No process is running on port 8000.

🔥 Features

Kill multiple ports at once (e.g., kill-my-port 3000 5000 8080)
Cross-platform: Works on Windows, macOS, and Linux
Zero setup required: Use instantly with npx
Auto-detect active ports if no port is provided
Confirmation prompt before killing a process
Safe & efficient


⚙️ How It Works

Internally, kill-my-port executes OS-specific commands to find and terminate processes:

| OS | Command Used | | --------------- | ----------------------------------------------------------- | | Windows | Get-NetTCPConnection + Stop-Process -Id <PID> -Force | | macOS/Linux | lsof -ti :PORT \| xargs kill -9 |

This ensures proper compatibility across different operating systems.


🚑 Troubleshooting

1️⃣ Command Not Found (kill-my-port: command not found)

  • If using kill-my-port without npx, ensure it’s installed globally:
    npm install -g kill-my-port
  • If installed but still not found, try:
    npx kill-my-port 3000

2️⃣ Permission Denied on macOS/Linux

If you see a permission error, try:

sudo kill-my-port 3000

3️⃣ Port Not Found (No process is running on port X)

  • Ensure the process is actually running by using:
    netstat -ano | findstr :3000  # Windows
    lsof -i :3000                 # macOS/Linux
  • Try running kill-my-port without a port number to list all active ports.

💡 Contributing

If you’d like to improve this tool, feel free to contribute on GitHub!

🔗 GitHub Repository: https://github.com/TenEplaysOfficial/kill-my-port


❤️ Support & Funding

If you find kill-my-port useful, consider supporting its development:

Patreon: https://www.patreon.com/teneplays


📜 License

kill-my-port is open-source and released under the MIT License.