Skip to main content

Beautiful Port Inspector TUI — see who's using your ports

Project description

pview

pview

Beautiful Port Inspector TUI — see who's using your ports

PyPI Python Versions CI License Release


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 -i output 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


Download files

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

Source Distribution

pview-1.0.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

pview-1.0.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

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

Hashes for pview-1.0.0.tar.gz
Algorithm Hash digest
SHA256 73ab57b8a4427129c7a078ae01facfb5845edfc45ba5c6accafe42c965ddc6dc
MD5 96787198adb9f94fb998882b78580810
BLAKE2b-256 069dedfa4696804087e1f7a7392362a7a856009027818a073c52489ccd87d764

See more details on using hashes here.

Provenance

The following attestation bundles were made for pview-1.0.0.tar.gz:

Publisher: release.yml on bhayanak/port-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pview-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3246c7f800b9f3080cca7d65b3711331dd8ce7b128dbed350f8bbf8c90273f03
MD5 dc7c84b52cd46d2166e95c307fb6595b
BLAKE2b-256 82afaa34f2914c4a9252a764bb36ce630cf49aab0ead7ef6fbfd3bc12c0689cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pview-1.0.0-py3-none-any.whl:

Publisher: release.yml on bhayanak/port-view

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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