🛫 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, PID, or command line
- 🎨 Highlighting - Common dev ports (3000, 8000, 5432, etc.) are color-coded
- ⚡ Quick commands - CLI mode with meaningful exit codes for scripting and one-liners
- 📊 Detailed info - See memory usage, start time, command line, and more
- 👀 Watch mode - Monitor specific ports in real-time
- 💻 Cross-platform - Linux, macOS (no
sudoneeded for your own processes) and Windows
📦 Installation
# Recommended: isolated install
uv tool install portpilot # or: pipx install portpilot
# Or with pip
pip install portpilot
Try it without installing:
uvx portpilot
🚀 Usage
Interactive TUI
Just run:
portpilot
# or use the short alias
pp
Keyboard shortcuts:
| Key | Action |
|---|---|
↑/↓ |
Navigate |
k |
Kill selected process (SIGTERM, with confirmation) |
K |
Force kill (SIGKILL, no confirmation) |
r |
Refresh list |
f or / |
Focus filter (Enter returns to the table) |
Esc |
Clear filter |
q |
Quit |
CLI Commands
# List all listening ports
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 (refresh every second)
pp watch 3000 8000 -i 1
# Watch all ports
pp watch
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Nothing listening on the port, or the kill failed |
2 |
You declined the confirmation prompt |
🎨 Port Colors
| Color | Ports | Common Use |
|---|---|---|
| 🟢 Green | 3000, 3001, 27017 | React, Next.js, MongoDB |
| 🟡 Yellow | 8000, 8080 | Django, General |
| 🔵 Cyan | 5000, 5001 | Flask |
| 🟣 Magenta | 5432 | PostgreSQL |
| 🔴 Red | 6379 | Redis |
🔧 Examples
Free a port before starting a dev server
# `|| true` so the server still starts when nothing was listening
pp kill 3000 -y || true; 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
🖥️ Platform notes
- macOS: listing every socket on the system requires root. Without it, PortPilot automatically falls back to per-process lookup, which shows all ports opened by your processes — usually exactly what you need during development. Use
sudo ppto see system services too. - Linux: processes owned by other users show up with limited details unless you run with
sudo. - Windows: run the terminal as Administrator to inspect or kill services.
🛠️ Development
PortPilot uses uv for environments and dependencies.
git clone https://github.com/cyber-emreclskn/portpilot.git
cd portpilot
uv sync # creates .venv with dev dependencies
uv run pre-commit install # ruff + mypy on every commit
uv run pytest --cov # tests (unit, CLI and headless TUI)
uv run ruff check . && uv run ruff format .
uv run mypy
uv run portpilot # run your local checkout
See CONTRIBUTING.md for the full workflow, including commit message conventions and how releases work.
🤝 Contributing
Contributions are welcome! Check the good first issues and read CONTRIBUTING.md. Please report security issues privately as described in SECURITY.md.
📄 License
MIT License - see LICENSE for details.
Maintained by Emre Çalışkan · Made with ❤️ for developers who are tired of port conflicts
Metadata
Release files for portpilot 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| portpilot-0.2.0.tar.gz | 16.5 kB | With provenance | Details for portpilot-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| portpilot-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for portpilot-0.2.0-py3-none-any.whl |
Total release size: 29.9 kB
Release files / portpilot-0.2.0.tar.gz
| Download URL | portpilot-0.2.0.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c1f5ba587db79ad26723139f8351faa2acc021c787218e4493ce7b1d0d10df7
|
|
BLAKE2b-256 checksum How to use checksums |
0172dc3068c3798a9e8f80f5c8dbc9caf34190b29cba42828df1ddfaf382b0f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / portpilot-0.2.0-py3-none-any.whl
| Download URL | portpilot-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b047407afe0a0abc1c2f23f37ebf945040572c1401f30cc33be9a3e7d3296355
|
|
BLAKE2b-256 checksum How to use checksums |
e723f5a1f8b1234bc9166ca0770ca0e3fa739b5933f5600b25db4a1225799622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for portpilot 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for portpilot-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.