Skip to main content

A robust CLI tool to track, manage, and free up local development ports safely.

Project description

Port Doctor

A small CLI for tracking which local port is reserved for which dev task — and for freeing one up when something's squatting on it.

Features

  • Reserve a port for a task, so you remember why it's taken
  • List your reservations with live status (free, or in use and by what)
  • Free a port by killing whatever's listening on it (asks for confirmation first)
  • Scan every listening port on the system, not just the ones you've reserved

Installation

pip install port-doctor

Requires Python 3.7+ and psutil (installed automatically). Works on Linux, macOS, and Windows.

Usage

# Reserve a port for a task
port-doctor reserve 3000 "Claude Code"

# The shorter alias works too
pd reserve 3000 "Claude Code"

# List your reservations and their live status
port-doctor list
pd list

# Free a port — kills the listening process (prompts for confirmation)
port-doctor free 3000
pd free 3000

# Remove a reservation without touching any running process
port-doctor unreserve 3000
pd unreserve 3000

# See every listening port on the system, reserved or not
port-doctor active
pd active

Add -y/--yes to free or -f/--force to reserve to skip the confirmation prompt, e.g. for scripts.

Notes

  • Reservations live in ~/.port-doctor.json.
  • Inspecting or killing processes you don't own may require sudo/Administrator, depending on your OS.

License

MIT

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

port_doctor-0.1.5.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

port_doctor-0.1.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file port_doctor-0.1.5.tar.gz.

File metadata

  • Download URL: port_doctor-0.1.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for port_doctor-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ee3f32b8fe27962ded623606f1633cd2c11fc1e25b3f7690252994e06038441e
MD5 1ececf4a844749980d52a044b511e968
BLAKE2b-256 9df19ed6ac3a653fe86f05d44c0b2868ed67ada50e50a7122e3727f35d72c922

See more details on using hashes here.

File details

Details for the file port_doctor-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: port_doctor-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for port_doctor-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e18aba09ed537c7d172a63366982932c912a4c362823e09d92fa844729345d16
MD5 d8a38c96a2fe494378fdeb1338aa31d5
BLAKE2b-256 decb4b94ef5e3a1170ba6a2a467d098475aa3b56d5b6801bdeef2e43cb25d7f8

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