Interactive terminal port manager for developers
Project description
🛫 PortPilot
Interactive terminal port manager for developers
Tired of running lsof -i :3000 and then kill -9 <pid> every time? PortPilot gives you a beautiful TUI to see all listening ports and kill them with a keystroke.
✨ Features
- 🖥️ Interactive TUI - Navigate with keyboard, search, and kill processes instantly
- 🔍 Real-time filtering - Filter by port, process name, or PID
- 🎨 Syntax highlighting - Common dev ports (3000, 8000, 5432, etc.) are color-coded
- ⚡ Quick commands - CLI mode for scripting and one-liners
- 📊 Detailed info - See memory usage, start time, command line, and more
- 👀 Watch mode - Monitor specific ports in real-time
📦 Installation
pip install portpilot
Or install from source:
git clone https://github.com/cyber-emreclskn/portpilot.git
cd portpilot
pip install -e .
🚀 Usage
Interactive TUI
Just run:
portpilot
# or use the short alias
pp
Keyboard shortcuts:
| Key | Action |
|---|---|
↑/↓ |
Navigate |
k |
Kill selected process (SIGTERM) |
K |
Force kill (SIGKILL) |
r |
Refresh list |
f or / |
Focus filter |
Esc |
Clear filter |
q |
Quit |
CLI Commands
# List all listening ports
portpilot list
pp list
# Filter by port
pp list -p 3000
# Filter by name
pp list -n python
# Output as JSON (great for scripting)
pp list --json
# Kill a specific port
pp kill 3000
# Force kill
pp kill 3000 -f
# Skip confirmation
pp kill 3000 -y
# Kill multiple ports
pp killall 3000 8000 5432
# Get detailed info about a port
pp info 3000
# Watch specific ports
pp watch 3000 8000
# Watch all ports
pp watch
🎨 Port Colors
PortPilot highlights common development ports:
| Color | Ports | Common Use |
|---|---|---|
| 🟢 Green | 3000, 3001 | React, Next.js |
| 🟡 Yellow | 8000, 8080 | Django, General |
| 🔵 Cyan | 5000, 5001 | Flask |
| 🟣 Magenta | 5432 | PostgreSQL |
| 🔴 Red | 6379 | Redis |
🔧 Examples
Quick port cleanup before starting dev server
pp kill 3000 -y && npm run dev
Find what's using a port
pp info 8000
Kill all common dev ports
pp killall 3000 3001 8000 8080 5000 -y
Script integration
# Check if port is in use
if pp list -p 3000 --json | jq -e '.[0]' > /dev/null; then
echo "Port 3000 is in use"
fi
🛠️ Development
# Clone the repo
git clone https://github.com/emre/portpilot.git
cd portpilot
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black portpilot/
ruff check portpilot/
📄 License
MIT License - see LICENSE for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to contribute
- Fork the repository and create a feature branch:
git checkout -b feature/my-change
- Set up a virtual environment and install dev dependencies:
python -m venv venv- Activate it (Windows:
venv\Scripts\activate, macOS/Linux:source venv/bin/activate) pip install -e ".[dev]"
- Run checks before opening a PR:
pytestruff check portpilot/black portpilot/
- Open a Pull Request against
mainand describe:
- What changed and why
- How to test it locally
Maintainer: Emre Çalışkan
Made with ❤️ for developers who are tired of port conflicts
Project details
Release history Release notifications | RSS feed
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 portpilot-0.1.2.tar.gz.
File metadata
- Download URL: portpilot-0.1.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99acf222c648c537a8acd7bf90cacb410b0d3a4e1db8d62a4b2dcd3e917120c
|
|
| MD5 |
48e0f6664f36585d5f646201adbf418c
|
|
| BLAKE2b-256 |
5ca6cf8d98cd59902e8da940ebbd26a59dad1ce9da65a824de266d81ac07d874
|
File details
Details for the file portpilot-0.1.2-py3-none-any.whl.
File metadata
- Download URL: portpilot-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c55a28c90b697f657e100e158b37d2d16f9a06486a7c83c9c722717095573b93
|
|
| MD5 |
46de6ba7a896cca3acf0e61a4c9921cb
|
|
| BLAKE2b-256 |
7e93746c9287263e2544f6945e850b1028ee2a4c278acfd9b0820f45eedfc793
|