Skip to main content

Port manager for containerised development on macOS, Linux, and Windows

Project description

portman — Port Manager for containerised development

Engineered by Codermasky

A global port registry and conflict-free port assignment system for all your Docker Compose projects on macOS, Linux, and Windows.


Quick Start

bash ~/Sandbox/portman/install.sh
source ~/.zshrc
portman new myproject
portman list

Files

  • portman.py — Main CLI tool (Python 3.7+)
  • install.sh — One-time installation script
  • GUIDE.md — Complete user guide with examples and troubleshooting

What It Does

Problem: Running 15+ projects in ~/Sandbox, each with docker-compose, and manually tracking which ports are in use? Constant conflicts.

Solution: portman auto-assigns ports from predefined ranges and prevents collisions:

portman new myapp        # Auto-assigns: frontend:3000, backend:8000, postgres:5432, redis:6379, langfuse:3200
portman list             # View all assigned ports across all projects
portman check            # Detect conflicts (should never happen)
portman scan             # See what's actually listening on your Mac/Linux/WSL2
portman export myapp     # Copy-paste docker-compose ports snippet

Installation

cd ~/Sandbox/portman
bash install.sh
source ~/.zshrc    # or ~/.bashrc, ~/.bash_profile, etc.

Then:

portman --help
portman new myproject

Port Ranges

Service Range Purpose
frontend 3000–3099 React, Vue, Next.js, Vite
backend 8000–8099 FastAPI, Node.js, Flask, Django
postgres 5432–5532 PostgreSQL databases
redis 6379–6479 Redis cache
langfuse 3200–3299 Langfuse observability
clickhouse 8123–8222 ClickHouse analytics
minio 9000–9099 MinIO object storage
grafana 3300–3399 Grafana dashboards

Full Documentation

Read the complete guide:

cat ~/Sandbox/portman/GUIDE.md

Or open in your editor:

code ~/Sandbox/portman/GUIDE.md

Registry Location

All port assignments are stored in:

~/.portman/registry.json

This is a global file shared across all projects, persists across terminal sessions, and is auto-created on first run.


Cross-Platform Support

  • macOS — ✅ Full support (uses lsof)
  • Linux — ✅ Full support (uses lsof)
  • Windows (WSL2) — ✅ Full support
  • Windows (native) — ⚠️ Basic support (uses netstat)

Recommended: Use WSL2 on Windows for the best experience.


Common Commands

portman list               # Show all ports
portman new myapp          # Create new app with standard services
portman assign svc --app myapp    # Add a service
portman release svc --app myapp   # Remove a service
portman check              # Detect conflicts
portman scan               # See what's listening
portman export myapp       # Get docker-compose snippet
portman rm myapp           # Delete entire app
portman dashboard          # Open visual dashboard in browser

Getting Help

portman --help             # Show all commands
portman list --help        # Help for specific command
cat ~/Sandbox/portman/GUIDE.md   # Full guide

Why portman?

No more port conflicts — Auto-assign + enforcement ✅ Works across all projects — Global registry at ~/.portman/Copy-paste readyportman export myapp → docker-compose snippet ✅ Cross-platform — macOS, Linux, WSL2, Windows ✅ Zero config — Just portman new myapp and go ✅ Live scanningportman scan shows what's actually listening


Engineered with ❤️ by Codermasky

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

portman-1.0.2.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

portman-1.0.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file portman-1.0.2.tar.gz.

File metadata

  • Download URL: portman-1.0.2.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for portman-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e88448546ab5fb29693b2ae13a980d336f226a459bf5eea29b557085c30fc3aa
MD5 8002405e001f84d0278e6411fb1ceff8
BLAKE2b-256 1eea95c2f00302f3c16282a55b24772d00fce5810a41aea9d2abe8f57c36050b

See more details on using hashes here.

File details

Details for the file portman-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: portman-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for portman-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f98c55ad7ced939f97e99114359d97e2229447f3439b9f99f2448ffc1cb38c1
MD5 87c62b728715e8b6c26cf554c7b8cea4
BLAKE2b-256 41280fbbadd07995e7db8878e9af03b33cf7aac6a592b49bc8a30c25772f21f8

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