Skip to main content

🛜 Portman

A developer-friendly port manager for Linux and macOS. Inspect active ports, see what's running on them, and free them with a single safe command — from the terminal or a live web dashboard.

No more lsof -i :3000 → squint at the PID → kill -9. Just:

portman kill 3000

Why

During local development, ports get stuck behind orphaned or forgotten processes. The usual fix is multi-step and easy to get wrong — including killing the wrong thing. Portman collapses it into intuitive commands with a safety net: it refuses to casually kill critical daemons (systemd, sshd, dockerd, databases, PID 1 …) and escalates gracefully (SIGTERM → wait → SIGKILL) instead of going straight to kill -9.

Install

pipx install portm

(The PyPI package is portm; the command it installs is portman.)

From source (with the dashboard):

cd web && npm install && npm run build && cd ..
pip install .

CLI

portman list [--range 3000-9999] [--all] [--json]   # what's listening
portman check <port>                                 # free? or what's on it
portman info <port>                                  # full detail
portman kill <port> [--force] [--yes] [--force-protected]
portman watch [--range 3000-9999]                    # live auto-refresh table
portman serve [--port 8765] [--expose]               # launch the web dashboard

Exit codes: 0 success · 1 port occupied (check) · 2 failed · 3 blocked by the safety guard. Read commands accept --json for scripting.

The hero command

portman kill <port> discovers every PID on the port, refuses protected processes (unless --force-protected), previews exactly what will die, sends SIGTERM, waits, then SIGKILLs any stragglers, and finally verifies the port is actually free.

Web dashboard

portman serve

Opens a polished dark dashboard (live table via SSE, filters, per-row "Free" with a confirmation modal and graceful/force toggle). The server binds to 127.0.0.1 only and gates the destructive DELETE endpoint behind a per-launch token (passed in the launch URL), so a malicious page in your browser can't free your ports behind your back. Use --expose to bind on 0.0.0.0 (with a loud warning).

API docs are auto-generated at /docs.

Architecture

A shared core library holds all logic; the CLI and the web API are thin layers over it, so behaviour is identical everywhere and the risky part (killing) lives in one well-tested place.

portman/core/   scanner · killer · safety · models · exceptions
portman/cli/    Typer + Rich
portman/api/    FastAPI + uvicorn (serves the bundled UI)
web/            Vite + React + Tailwind dashboard → builds into portman/api/static

Develop

pip install -e ".[dev]"
pytest                      # core + API + CLI tests (psutil mocked)
ruff check portman tests

cd web
npm install
npm run dev                 # Vite dev server, proxies to `portman serve --no-token`

Metadata

Release files for portm 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 portm 0.1.0
File Size Uploaded Provenance Actions
portm-0.1.0.tar.gz 105.7 kB With provenance Details for portm-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 184.4 kB

Release files / portm-0.1.0.tar.gz

Download URL portm-0.1.0.tar.gz
Size 105.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b91f99abf0803d7429709d02d7ed0b6530aa5b3512e7cf0b989000a450a142f5
BLAKE2b-256 checksum
How to use checksums
a7dec1539171115dbc969d6654cbb6cf727a8e74c7a45c9dd0c1ce15303c7cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

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

Download URL portm-0.1.0-py3-none-any.whl
Size 78.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9482b239d0c8e564acc1a6241ad5a58f05f293e511fa9ef5c4a064524f03636
BLAKE2b-256 checksum
How to use checksums
7ee8f26ad67b6e245db1b7c06de32679ec1ce3e6e566b3f313a2f32aee95be36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Security for portm 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for portm-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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