@sheerazmehboob/killmyport
v0.0.3
Published
End port conflicts in one click
Readme
🔪 Kill My Port
End port conflicts in one click.
A cross-platform desktop application for developers to instantly identify, manage, and terminate processes blocking your ports — no terminal wizardry required.
🤔 What Is This?
You're coding. You restart your server. And then:
Error: listen EADDRINUSE :::3000
Error: listen EADDRINUSE :::8000You open a terminal, try lsof -ti:3000 | xargs kill -9, forget the syntax, Google it, repeat for every port. It's painful.
Kill My Port fixes this permanently. It's an always-running desktop application that sits in your system tray and gives you a live view of every port on your machine. One click — process dead. Done.
✨ Features
| Feature | Description |
|---|---|
| 🔍 Live Port Scanner | Real-time view of all active TCP/UDP ports using ss, lsof, or netstat |
| 🐳 Docker Awareness | Detects container-bound ports and terminates the Docker container directly |
| ⚡ Multi-Strategy Kill Engine | 5-stage termination: Docker → PID kill → fuser → lsof → elevated sudo |
| 🛡️ Smart Safety System | Color-coded risk levels, system process warnings, and kill confirmation |
| 🔎 Search & Filter | Filter by port number, process name, protocol (TCP/UDP), or state |
| 📌 Custom Port Watchlist | Pin and label your frequently used ports for instant access |
| 🖥️ System Tray Integration | Minimizes to tray instead of closing — always running, zero overhead |
| 🔄 Auto-Refresh | Configurable live scanning (1s, 5s, 10s, 30s intervals) |
| 📋 Common Port Sidebar | Pre-loaded shortcuts for popular dev ports (React, Django, Postgres, Redis…) |
| 🌍 100% Cross-Platform | Works on Linux, macOS, and Windows |
💻 Command Line Interface (CLI)
Kill My Port now includes a powerful, beautiful CLI for developers who prefer the terminal.
Quick Install
You can install the CLI using either of our official packages:
# Option 1: Standard
npm install -g killmyport-cli
# Option 2: Scoped
npm install -g @sheerazmehboob/killmyportUsage
Run the interactive port killer (shows a beautifully animated, searchable list):
kmp
# or
killmyportList ports in a table:
kmp listKill a specific port instantly:
kmp kill 3000Safety Built-in: The CLI automatically hides and protects system processes (like DNS on port 53) from being killed. You can use
kmp list --allto show them, andkmp kill <port> --forceif you really need to terminate them.
📋 Requirements
Before you start, make sure you have:
| Tool | Version | Check |
|---|---|---|
| Node.js | v20.12+ | node --version |
| npm | v10.5+ | npm --version |
| Git | Any | git --version |
Linux extra requirement:
fuser(part ofpsmisc) andss(part ofiproute2) for full kill functionality.sudo apt install psmisc iproute2 # Debian/Ubuntu sudo dnf install psmisc iproute # Fedora/RHEL
🚀 Installation
For detailed, step-by-step instructions on how to install the pre-built binaries for your operating system (macOS, Windows, or Linux), please see our dedicated Installation Guide:
👉 View the Installation Guide (INSTALL.md)
(Pre-built binaries are available for download on the Releases page).
🛠️ Building from Source (Developers)
🛠️ Management Scripts
All scripts live in the root of the project:
| Script | Platform | What It Does |
|---|---|---|
| ./setup.sh | Linux / macOS | One-time install: deps, build, register launcher, autostart, launch |
| setup.bat | Windows | Same as above for Windows |
| ./launch.sh | Linux / macOS | Open the app manually (skips setup, brings window to focus) |
| ./uninstall.sh | Linux / macOS | Remove autostart, launcher entry, and running instances safely |
| uninstall.bat | Windows | Remove Start Menu & Startup shortcuts safely |
Packaging for Release (Binaries)
If you want to create distributable binaries (AppImage, deb, exe, portable, dmg) for other operating systems or environments, you can use the built-in package scripts:
| Command | Output | Notes |
|---|---|---|
| npm run package:linux | AppImage, .deb | Linux binaries (generated in release/) |
| npm run package:win | NSIS (.exe), portable | Windows binaries (generated in release/) |
| npm run package:mac | .dmg | macOS binaries (skips signing by default) |
| npm run package:all | All of the above | Packages for Mac, Windows, and Linux |
Note: To package for macOS, it's highly recommended to do so on a macOS machine. The current configuration skips code signing (
identity: null), so macOS might show a warning when running the.dmg(allow it via System Settings > Privacy & Security).
Launching Manually (After Setup)
If you ever need to manually open Kill My Port without re-running setup:
./launch.shUninstalling
Linux / macOS:
./uninstall.shWindows:
uninstall.bat🖥️ Using the App
Opening the App
After setup, you have 3 ways to open Kill My Port:
- System Search (recommended): Press
Super/Winkey → typeKill My Port→ press Enter. - System Tray: If already running, find the tray icon in your taskbar. Click it to show/hide the window.
- Manually:
./launch.shfrom the project directory.
Killing a Process — Step by Step
- Locate the port in the table or use the search bar.
- Click the red Kill button on that row.
- A confirmation dialog appears showing:
- The process name and PID
- Whether it's a Docker container
- Risk level (low / medium / high)
- Click Kill Process to confirm.
- Kill My Port attempts termination using up to 5 strategies in sequence:
docker stop/docker kill(for container-bound ports)kill -9 <PID>(direct process termination)fuser -k <port>/tcp(port-based kill)lsof -t -iTCP:<port> | xargs kill -9(fallback)pkexec/sudoelevation (for root-owned processes)
- The app verifies the port is freed before showing success.
- The port list refreshes automatically.
🐳 Docker Container Support
Kill My Port has full Docker awareness. Any port bound by a Docker container is:
- Labeled clearly in the UI as
docker: <container-name>. - Killed correctly — it executes
docker stop <container-id>and falls back todocker killif needed.
🔒 Security & Safety
- No network access — entirely local, offline-first.
- No telemetry — your port data never leaves your machine.
- Confirmation dialogs — every kill requires explicit confirmation.
- System process warnings — clearly flags
sshd,systemd, kernel services. - Verification before success — success toast is only shown after re-checking the socket state.
📄 License
MIT — free to use, modify, and distribute.
Made with ❤️ for developers tired of Googling lsof -ti:3000 | xargs kill -9 at 2am.
