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.1.tar.gz (21.4 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.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: portman-1.0.1.tar.gz
  • Upload date:
  • Size: 21.4 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.1.tar.gz
Algorithm Hash digest
SHA256 96a5bc562078389c478fd1764b3bc7a9ffef3e83c7cea5b65ecf1ee58acb3f82
MD5 704400b2b5b9093650a0111374135eef
BLAKE2b-256 3babc62d77d0e32f028ba1333a437177a6063f8aec669c95369ad656cbabdbfc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: portman-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ecc3b83b4824cfe11f0f4b1f8d62239a2a0777e37db2d7f72ed872bb08063da
MD5 1a69e1fd03433d7ad5876c390c3b2c51
BLAKE2b-256 d40a9025c41c619d90e2aaff1cd6f051abe72bb3a24d6df972c11e6f7f0aadf5

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