wtfport
v0.2.1
Published
A CLI tool for monitoring and managing network ports - Kill ports like a boss
Downloads
10
Maintainers
Readme
wtfport
A cross-platform CLI tool for monitoring and managing network ports. Provides a terminal UI (TUI) for viewing active ports, killing processes, and managing port usage.

Installation
Quick Install (Recommended)
macOS and Linux:
Install with a single command:
curl -fsSL https://raw.githubusercontent.com/behnamazimi/wtfport/main/install.sh | bashOr download and run the installer:
curl -fsSL https://raw.githubusercontent.com/behnamazimi/wtfport/main/install.sh -o install.sh
chmod +x install.sh
./install.shWindows:
For native Windows (PowerShell/CMD), download the .exe manually from Releases.
Standalone Binary
Download the pre-built binary for your platform from Releases.
npm
npm install -g wtfportFrom Source
# Clone the repository
git clone <repository-url>
cd wtfport
# Install dependencies
npm install
# Build
npm run build:ts
# Run
npm run dev # Development with Node.js
# or
node dist/cli.js # Production with Node.jsUsage
Interactive TUI Mode
Launch the terminal UI:
wtfportCommand Line Mode
Kill a process on a specific port:
wtfport kill 3000
wtfport kill --port 3000 --forceFilter and sort:
wtfport --type dev-server
wtfport --type "dev-*" --user "j*"
wtfport --sort port --type apiKeyboard Shortcuts (TUI Mode)
↑/↓- Navigate ports/- Search port (likelsof -i :PORT)k- Kill selected portr- Restart processc- Copy command to clipboardv- View full commandl- View process logsd- Toggle details view1/2/3- Sort by port/process/pidg- Toggle group collapse?- Show/hide helpq- Quit
Platform Support
macOS / Linux
Uses lsof and ps commands for port detection and process management.
Windows
Uses netstat, tasklist, taskkill, and wmic for port detection and process management.
Requirements
- Runtime: Node.js >= 18.0.0
- Development: Node.js >= 18.0.0
- Binary Build: Node.js 18.x (pkg currently supports up to Node.js 18)
For standalone binaries, no runtime is required - they are self-contained executables with Node.js 18 embedded.
Note: The pkg tool currently supports up to Node.js 18. When Node.js 22 support is added to pkg, update the build scripts to use node22-* targets.
Build Process: Binaries are created by bundling the code with esbuild (to handle ES modules) and then packaging with pkg.
Development
Run in development mode
npm run devType checking
npm run check-typesBuild TypeScript
npm run build:tsLicense
MIT
