Skip to main content

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

Metadata

Release files for portforge 0.1.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 portforge 0.1.0
File Size Uploaded
portforge-0.1.0.tar.gz 7.3 kB Details

Built distribution (wheel)

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

Total release size: 14.9 kB

Release files / portforge-0.1.0.tar.gz

Download URL portforge-0.1.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38af51395760320dcfb15a625f5349bc724884d19559425c2daf9f8a4d4a8e30
BLAKE2b-256 checksum
How to use checksums
27615734a9b1650f1a143b41334ecd74de770ef1f5cb449fae8928c9436af27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / portforge-0.1.0-py3-none-any.whl

Download URL portforge-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8508b92a169040f6fa91e0b26c064e9308b1c34c91fc5bf5854ae8ae1f05a50
BLAKE2b-256 checksum
How to use checksums
178110e18f6ac39b18140d49a178209a228da8f356b5c91d93fa7572e0c5ed21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.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