Beautiful Port Inspector TUI — see who's using your ports
Project description
pview
Beautiful Port Inspector TUI — see who's using your ports
A gorgeous, fast alternative to lsof -i and netstat. See which processes are listening on which ports — with CPU/memory usage, one-key kill, live refresh, and beautiful terminal output.
Why?
lsof -ioutput is ugly and hard to parse- Developers constantly debug port conflicts
- No existing tool combines port listing + process info + kill in a single TUI
- "What's on port 3000?" is one of the most-asked developer questions
Features
| Feature | Description |
|---|---|
| Interactive TUI | Full Textual app with table, filter, detail panel, kill dialog |
| Port Listing | All listening TCP/UDP ports with process info |
| Process Details | PID, name, command, user, CPU%, memory |
| One-Key Kill | Select process → press k → confirm → done |
| Filter/Search | Filter by port number or process name |
| Watch Mode | Live-updating view with configurable interval |
| Port Check | Quick check: pview check 3000 |
| JSON/CSV Export | Machine-readable output for scripting |
| Safety Guards | Refuses to kill system-critical processes |
Install
pip install pview
Requires Python 3.10+. Works on macOS and Linux.
Usage
Interactive TUI (default)
pview
Non-interactive listing
# Rich table output
pview list
# JSON output
pview list --format json
# CSV output
pview list --format csv
# Filter by process name
pview list --filter postgres
# Watch mode (live refresh)
pview list --watch
# TCP only
pview list --no-udp
Check a specific port
pview check 3000
# → Port 3000: node (PID 12345) — node server.js
pview check 9999
# → ✅ Port 9999 is free.
Kill a process by port
pview kill 3000
# → Kill node (PID 12345) on port 3000? [y/N]
# Skip confirmation
pview kill 3000 --yes
# Force kill (SIGKILL)
pview kill 3000 --force --yes
TUI Keybindings
| Key | Action |
|---|---|
/ |
Focus filter input |
Escape |
Clear filter |
k |
Kill selected process |
d |
Toggle detail panel |
r |
Refresh data |
q |
Quit |
TUI Preview
╭─ pview ──────────────────────────────────────────────────╮
│ Filter: [________] │
├──────┬──────────┬───────┬──────────┬──────┬─────────┬───────┤
│ Port │ Process │ PID │ User │ CPU% │ Memory │Status │
├──────┼──────────┼───────┼──────────┼──────┼─────────┼───────┤
│ 80 │ nginx │ 1234 │ www │ 0.2 │ 12.3 MB │LISTEN │
│ 443 │ nginx │ 1234 │ www │ 0.2 │ 12.3 MB │LISTEN │
│ 3000 │ node │ 5678 │ dev │ 1.5 │ 85.2 MB │LISTEN │
│ 5432 │ postgres │ 9012 │ postgres │ 0.8 │156.7 MB │LISTEN │
│ 8080 │ java │ 7890 │ dev │ 3.2 │512.0 MB │LISTEN │
├──────┴──────────┴───────┴──────────┴──────┴─────────┴───────┤
│ [k] Kill [d] Details [r] Refresh [/] Filter [q] Quit │
╰─────────────────────────────────────────────────────────────╯
Development
git clone https://github.com/bhayanak/pview.git
cd pview
pip install -e ".[dev]"
# Run tests
pytest --cov=pview --cov-report=term-missing
# Lint & format
ruff check src/ tests/
ruff format --check src/ tests/
See CONTRIBUTING for more details.
License
MIT — use it, fork it, improve it.
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 pview-1.0.0.tar.gz.
File metadata
- Download URL: pview-1.0.0.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73ab57b8a4427129c7a078ae01facfb5845edfc45ba5c6accafe42c965ddc6dc
|
|
| MD5 |
96787198adb9f94fb998882b78580810
|
|
| BLAKE2b-256 |
069dedfa4696804087e1f7a7392362a7a856009027818a073c52489ccd87d764
|
Provenance
The following attestation bundles were made for pview-1.0.0.tar.gz:
Publisher:
release.yml on bhayanak/port-view
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pview-1.0.0.tar.gz -
Subject digest:
73ab57b8a4427129c7a078ae01facfb5845edfc45ba5c6accafe42c965ddc6dc - Sigstore transparency entry: 1506774265
- Sigstore integration time:
-
Permalink:
bhayanak/port-view@7d602246c94e64c5314d7ddf67c2ab9f3aff06e5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bhayanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7d602246c94e64c5314d7ddf67c2ab9f3aff06e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pview-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pview-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3246c7f800b9f3080cca7d65b3711331dd8ce7b128dbed350f8bbf8c90273f03
|
|
| MD5 |
dc7c84b52cd46d2166e95c307fb6595b
|
|
| BLAKE2b-256 |
82afaa34f2914c4a9252a764bb36ce630cf49aab0ead7ef6fbfd3bc12c0689cf
|
Provenance
The following attestation bundles were made for pview-1.0.0-py3-none-any.whl:
Publisher:
release.yml on bhayanak/port-view
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pview-1.0.0-py3-none-any.whl -
Subject digest:
3246c7f800b9f3080cca7d65b3711331dd8ce7b128dbed350f8bbf8c90273f03 - Sigstore transparency entry: 1506774409
- Sigstore integration time:
-
Permalink:
bhayanak/port-view@7d602246c94e64c5314d7ddf67c2ab9f3aff06e5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/bhayanak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7d602246c94e64c5314d7ddf67c2ab9f3aff06e5 -
Trigger Event:
push
-
Statement type: