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.

✨ 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/cyber-emreclskn/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.3.tar.gz (12.0 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.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for portpilot-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c83d619643bb9eefb492f199c16e8030fca8b2a2e7fa1c8b86f58677bd1173e0
MD5 357deca58dfa4db8eaf562fed38c590c
BLAKE2b-256 328e6993e2a7bfe4fe77e5187303205515ba6fcff5ffa63744c189a0bc507f9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: portpilot-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5adb5863e62df035a4298bc0b38155aafaf74e1ae9fc3272cd17d9ef2fb89f
MD5 aeea7eff8c0fae83c8c69fd380c0e518
BLAKE2b-256 3db9adf0598bfdff114b39c1c987370d51d16aad2fffbd7b8ca75b6577ef7e08

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