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
--forceonly when a process does not stop cleanly. - Avoid running kill commands against system services or processes you do not recognize.
- When using
--jsonor--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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38af51395760320dcfb15a625f5349bc724884d19559425c2daf9f8a4d4a8e30
|
|
| MD5 |
2b227bdabfb0586479426b130c3b75d3
|
|
| BLAKE2b-256 |
27615734a9b1650f1a143b41334ecd74de770ef1f5cb449fae8928c9436af27a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8508b92a169040f6fa91e0b26c064e9308b1c34c91fc5bf5854ae8ae1f05a50
|
|
| MD5 |
20bba35307ed5da4d36f74750d8dfd61
|
|
| BLAKE2b-256 |
178110e18f6ac39b18140d49a178209a228da8f356b5c91d93fa7572e0c5ed21
|