Skip to main content

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.

Metadata

Release files for pview 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pview 1.0.0
File Size Uploaded
pview-1.0.0.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pview 1.0.0
File Interpreter ABI Platform
pview-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / pview-1.0.0.tar.gz

Download URL pview-1.0.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
73ab57b8a4427129c7a078ae01facfb5845edfc45ba5c6accafe42c965ddc6dc
BLAKE2b-256 checksum
How to use checksums
069dedfa4696804087e1f7a7392362a7a856009027818a073c52489ccd87d764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 11, 2026.

Transparency log

Release files / pview-1.0.0-py3-none-any.whl

Download URL pview-1.0.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3246c7f800b9f3080cca7d65b3711331dd8ce7b128dbed350f8bbf8c90273f03
BLAKE2b-256 checksum
How to use checksums
82afaa34f2914c4a9252a764bb36ce630cf49aab0ead7ef6fbfd3bc12c0689cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page