Skip to main content

Find and free busy development ports in seconds.

Project description

PortForge

Find and free busy development ports in seconds.

PortForge helps developers quickly answer the question: what is using port 3000? It shows the process, PID, command, and gives you a safe command when you want to free the port.

Install

pip install portforge

The installed command is:

portforge

Usage

Check one port:

portforge 3000

Scan common development ports:

portforge scan

Scan custom ports:

portforge scan -p 3000,5173,8000

Output JSON:

portforge 3000 --json

Write output to a file:

portforge 3000 -o ports.json --json

Free a busy port after confirmation:

portforge kill 3000 --yes

Safety notes

  • Review the displayed process name, PID, user, and command before killing anything.
  • Prefer the normal kill command first; use --force only when a process does not stop cleanly.
  • Avoid running kill commands against system services or processes you do not recognize.
  • When using --json or --output, review files before sharing them because command paths can include local usernames or project names.

Platform support

PortForge is designed for local development workflows on Unix-like systems where process and port inspection tools are available. Windows support is planned, but it may require different process lookup behavior.

CLI shortcuts

  • -p, --ports: comma-separated ports for scan
  • -j, --json: output JSON
  • -o, --output: write output to file
  • -y, --yes: confirm port-freeing action
  • -f, --force: use a stronger termination signal

Example

$ portforge 3000
Port 3000 is busy

PID      USER         NAME             COMMAND
18422    asim         node             npm run dev

Actions:
  portforge kill 3000
$ portforge scan
PortForge scan

PORT     STATUS   PROCESS
3000     busy     node
3001     free     -
5173     free     -
8000     busy     python

Development

python3 -m unittest discover -s tests -v

Roadmap

  • Check a single port
  • Scan common development ports
  • JSON output
  • Safe port freeing with explicit confirmation
  • Interactive confirmation
  • Project directory detection from process cwd
  • Windows support improvements
  • Rich colored output

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

portforge-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

portforge-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file portforge-0.1.0.tar.gz.

File metadata

  • Download URL: portforge-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for portforge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38af51395760320dcfb15a625f5349bc724884d19559425c2daf9f8a4d4a8e30
MD5 2b227bdabfb0586479426b130c3b75d3
BLAKE2b-256 27615734a9b1650f1a143b41334ecd74de770ef1f5cb449fae8928c9436af27a

See more details on using hashes here.

File details

Details for the file portforge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: portforge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for portforge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8508b92a169040f6fa91e0b26c064e9308b1c34c91fc5bf5854ae8ae1f05a50
MD5 20bba35307ed5da4d36f74750d8dfd61
BLAKE2b-256 178110e18f6ac39b18140d49a178209a228da8f356b5c91d93fa7572e0c5ed21

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