portman

Manages per-worktree port allocations for git worktrees and docker-compose services.

14|1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/jpoutrin/product-forge --skill portman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portman
Source: https://github.com/jpoutrin/product-forge/tree/main/plugins/devops-data/skills/portman
Command: npx skills add https://github.com/jpoutrin/product-forge --skill portman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running multiple local development instances or git worktrees of the same project often leads to port conflicts, making parallel development tedious and error-prone. This Skill provides patterns for managing port allocations with portman.

Core Features & Use Cases

  • Core Workflow: Setup, booking, getting, and exporting ports for services.
  • Integration with Docker Compose: Configure docker-compose.yml to use dynamic ports via environment variables.
  • Direnv Integration: Automatically set port environment variables when entering a project directory.
  • Context-Aware Port Allocation: portman automatically assigns unique ports per worktree context, ensuring isolation.
  • Maintenance Commands: Tools for viewing allocations, pruning orphaned entries, and troubleshooting.
  • Use Case: Setting up a new git worktree for a feature branch, configuring docker-compose.yml to use dynamic ports, cleaning up orphaned port allocations, or ensuring unique ports for parallel CI jobs.

Quick Start

Use the portman skill to generate a docker-compose.yml snippet that uses environment variables for PostgreSQL and Redis ports.

Frequently Asked Questions about portman

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent port conflicts when running multiple git worktrees locally?

Port conflicts arise when parallel worktrees run the same services on identical ports. Portman resolves this by automatically assigning unique ports per worktree context, isolating each environment so services like PostgreSQL and Redis run without collisions across branches.

How do I configure docker-compose to use dynamic ports across worktrees?

Portman discovers services in docker-compose.yml, books unique ports per worktree, and exports environment variables for each service. Configure your compose file to reference these variables—portman handles port allocation and environment setup automatically.

Can I integrate portman with direnv for automatic port setup?

Yes. Portman integrates with direnv to automatically export port environment variables when you enter a project directory. This eliminates manual port configuration and ensures the correct ports load for each worktree context without extra steps.

What do I need to set up before using portman in my project?

Portman requires git worktrees and docker-compose configured in your project. No external dependencies are needed—portman auto-discovers your services from docker-compose.yml and manages port allocation via context-aware workflows and environment export.

How do I clean up orphaned port allocations after deleting worktrees?

Portman includes maintenance commands to view current allocations, prune orphaned entries from deleted worktrees, and verify port status. Use these tools to troubleshoot conflicts and keep your port registry clean as worktrees are created and removed.

Does portman support parallel CI jobs with unique port requirements?

Yes. Portman's context-aware port allocation assigns unique ports per job context, making it suitable for CI pipelines that run multiple parallel instances. Each job receives isolated ports, eliminating conflicts in containerized or distributed testing environments.