Skip to main content

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.

PortPilot Demo

✨ 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/emre/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

  1. Fork the repository and create a feature branch:
  • git checkout -b feature/my-change
  1. 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]"
  1. Run checks before opening a PR:
  • pytest
  • ruff check portpilot/
  • black portpilot/
  1. Open a Pull Request against main and 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

portpilot-0.1.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portpilot-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file portpilot-0.1.1.tar.gz.

File metadata

  • Download URL: portpilot-0.1.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for portpilot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f43f8f37e440bea0523e672224fdaddc592df95da2592f91815e11cb131df9c3
MD5 43b5c2dde0d0984a85548acb146cd7a0
BLAKE2b-256 15ed69547b37370e30b3adffcc1be7203f19e9542451e8c597df09a5d098d951

See more details on using hashes here.

File details

Details for the file portpilot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: portpilot-0.1.1-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

Hashes for portpilot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5ba19de821de75fdfcbe91766f705056111986bb5b38377ad20911ff2a61c5b
MD5 2f772a93d4bf31761bc510d5231cf417
BLAKE2b-256 6757178d52ae340585f5a5d9f478e453e670c124191648ac888e94febaaa2cd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page