A minimalist tool to kill any process and manage every port forward and tunnels.
A

A minimalist tool to kill any process and manage every port forward and tunnels.

A minimalist tool to kill any process and manage every port forward and tunnels.

4,917 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Port Killer: The Minimalist's Swiss Army Knife for Processes and Ports

Ever had a stubborn process hogging a port, and you find yourself juggling between lsof, netstat, and kill -9 just to free it up? Or maybe you've lost track of all the SSH tunnels and port forwards you've spun up for local development. We've all been there, and the context switching adds up.

Enter Port Killer. It's a single, focused tool designed to solve these exact problems with minimal fuss. No bloat, no complicated flags—just a straightforward way to kill processes and clean up network tunnels.

What It Does

Port Killer is a command-line utility that does two things exceptionally well. First, it can kill any process by its PID or, more usefully, by the port number it's occupying. Second, it provides a clear overview and management for all your active port forwards and tunnels, letting you list them and shut them down easily. It consolidates what usually takes multiple commands and a bit of parsing into one simple interface.

Why It's Cool

The beauty of Port Killer is in its simplicity and direct approach. Instead of stitching together shell commands, you get a dedicated tool that speaks the language of ports and tunnels directly.

  • Port-Centric Killing: The classic kill -9 $(lsof -ti:3000) incantation is powerful, but you have to remember it. With Port Killer, it's just port-killer kill 3000. It's a small quality-of-life win that saves brain space.
  • Tunnel Management: It shines in development environments where you might have multiple SSH tunnels (-L, -R, -D) or other forwards running for databases, microservices, or APIs. Getting a clean list and being able to terminate them from one place is a huge help for staying organized.
  • Minimalist by Design: It doesn't try to be a system monitor or a full network diagnostics suite. It has a clear scope and executes it well, which makes it reliable and easy to understand.

How to Try It

Getting started is straightforward. The project is on GitHub, and you can clone it and run it directly with Go.

# Clone the repository
git clone https://github.com/productdevbook/port-killer.git
cd port-killer # Run it directly with Go
go run main.go # Or, build and install it
go build -o port-killer main.go
sudo mv port-killer /usr/local/bin/ # Or another directory in your PATH

Once installed, you can start exploring:

  • port-killer list to see active tunnels.

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Jan 15, 2026