CLI/TUI tool to find and kill dev servers hogging your ports
Project description
porthog
A CLI and TUI tool to find and kill dev servers hogging your ports.
Ever run npm start only to find port 3000 is already in use? porthog helps you quickly identify what's running on your dev ports and kill it with a single command.
Features
- Interactive TUI - Browse all dev server ports in a beautiful terminal UI
- CLI commands - Quick one-liners for scripting and fast actions
- Smart detection - Automatically identifies Node, Python, Java, Ruby, Go, Rust, PHP, and .NET processes
- Framework recognition - Detects Next.js, Vite, Django, FastAPI, Rails, and 20+ other frameworks
- Dev port focused - Filters to common dev ports (3000-9999) by default
- Cross-platform - Works on macOS and Linux
Installation
pip install porthog
Or with uv:
uv tool install porthog
Usage
Interactive TUI
Simply run porthog to launch the interactive terminal UI:
porthog
Keyboard shortcuts:
k- Kill selected process (graceful)K- Force kill selected processr- Refresh the lista- Toggle between dev ports and all portsq/Ctrl+C- Quit
CLI Commands
List dev server ports:
porthog ls
List all listening ports:
porthog ls --all
Get info about a specific port:
porthog info 3000
Kill a process on a port:
porthog kill 3000
Kill multiple ports:
porthog kill 3000 8080 5173
Force kill (SIGKILL):
porthog kill 3000 --force
Kill all dev servers (use with caution!):
porthog kill-all
Skip confirmation prompts:
porthog kill 3000 --yes
Dev Port Ranges
By default, porthog focuses on common development server ports:
- 3000-3999 - React, Next.js, Rails, Express
- 4000-4999 - Phoenix, Gatsby, Remix
- 5000-5999 - Flask, Vite, SvelteKit
- 6000-6999 - Various dev tools
- 8000-8999 - Django, FastAPI, Spring Boot
- 9000-9999 - PHP, SonarQube, various tools
Use --all or press a in the TUI to see all listening ports.
Detected Frameworks
porthog recognizes these frameworks and displays friendly names:
| Framework | Process Type |
|---|---|
| Next.js, Vite, Webpack, Vue CLI, Angular, Nuxt, Gatsby, Remix, Astro, SvelteKit | Node |
| Django, Flask, FastAPI, Uvicorn, Gunicorn | Python |
| Spring Boot | Java |
| Rails | Ruby |
| Phoenix | Elixir |
| Hugo, Jekyll | Static |
Requirements
- Python 3.10+
- macOS or Linux
License
MIT License - see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file porthog-0.1.2.tar.gz.
File metadata
- Download URL: porthog-0.1.2.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc4612f737b30c0619849552459be3fba28bfcda35baf0a0b7a9cca4e76e344e
|
|
| MD5 |
c5d92d66e2c880d5d0737e00d5b7a47b
|
|
| BLAKE2b-256 |
61553594ad987799aac593f1b62492f80d931df59fbf5ac034ed7422a2278649
|
File details
Details for the file porthog-0.1.2-py3-none-any.whl.
File metadata
- Download URL: porthog-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bfe27d9a6acd874df9a88a70fe0aea76d60280e7e68a97ac52d806910521325
|
|
| MD5 |
789477d86b504190d2c3a95dd4e94c45
|
|
| BLAKE2b-256 |
33310c06cffe78e705a1b2cb1e63944ad7748ee5ec3de4ef154f64e431b5dd54
|