Local port management CLI — list, kill, watch, and snapshot listening ports
Project description
portman
A local port management CLI for macOS and Linux.
Installation
pip install portman
Or install from source:
git clone <repo>
cd portman
pip install -e .
Commands
portman list
Show all listening ports with PID, process name, port, protocol, and status. System ports (<1024) are highlighted in yellow, user ports in green.
portman list
# Only show ports opened from this terminal session
portman list --mine
# Machine-readable JSON output
portman list --json
--minenote: this flag filters to processes running under your OS user account. It removes system services (svchost, lsass, etc.) but will still show other user-owned background apps that happen to listen on ports (e.g. Chrome, cloud sync clients). It correctly catches dev servers started in any shell or terminal window.
portman kill <port>
Kill the process listening on a given port. Asks for confirmation unless --force is passed.
portman kill 8080
# Skip confirmation
portman kill 8080 --force
portman kill 8080 -f
portman watch
Live-updating view of all active ports, refreshing every 2 seconds. New ports are highlighted green, closed ports red. Exit with Ctrl+C.
portman watch
# Only watch ports opened from this terminal session
portman watch --mine
portman save <name>
Save a snapshot of all currently active user ports (port ≥1024) to ~/.portman/profiles/<name>.json.
portman save myproject
portman save dev-stack
portman restore <name>
Check a saved profile against currently running ports. Shows which saved processes are still running and which are missing, along with hints for restarting them.
portman restore myproject
portman profiles
List all saved profiles with their creation timestamp and port count.
portman profiles
Requirements
- Python 3.10+
- macOS or Linux (Windows is not supported)
Notes
- Ports below 1024 are system ports and may require
sudoto kill. portman restoredoes not restart processes — it only reports their status and suggests what needs to be restarted.- Profiles are stored in
~/.portman/profiles/as JSON files.
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 portsmith-0.1.0.tar.gz.
File metadata
- Download URL: portsmith-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c163e32279caa7a6967d57070a2531e8b6dafc0d75241d642d980fb4e153c6d9
|
|
| MD5 |
90ae50d9556ec0e648d8cc624ebf9547
|
|
| BLAKE2b-256 |
436ccdbb06ee8e1a260eec6b3a99e1f50be585930fd5e51ea1e55ab40bf3a6d5
|
File details
Details for the file portsmith-0.1.0-py3-none-any.whl.
File metadata
- Download URL: portsmith-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
415445e094537f587d7465973fdc134fd4dbeb03ace498c697e8ec078431c80b
|
|
| MD5 |
82fa1d62a1bdaf55c72ef2cad00c6f98
|
|
| BLAKE2b-256 |
2fcb85d4d0c70cef57f69ebf6153dd18eb21aedfe892460bac549c4639b9a96f
|