portless

Installation
Summary

Named .localhost URLs for dev servers, eliminating port conflicts and hardcoded port numbers.

  • Assigns random free ports (4000–4999) automatically and routes named subdomains (e.g. myapp.localhost:1355) to the correct app via a reverse proxy on port 1355
  • Auto-detects git worktrees and prepends branch names as subdomain prefixes so each worktree gets a unique URL without configuration changes
  • Supports HTTP/2 with HTTPS via auto-generated local CA certificates; includes CLI commands for proxy management, static route registration, and /etc/hosts syncing for Safari compatibility
  • Auto-injects --port and --host flags for frameworks that ignore the PORT environment variable (Vite, Astro, React Router, Angular, Expo, React Native)
SKILL.md

Portless

Replace port numbers with stable, named .localhost URLs. For humans and agents.

Why portless

  • Port conflicts: EADDRINUSE when two projects default to the same port
  • Memorizing ports: which app is on 3001 vs 8080?
  • Refreshing shows the wrong app: stop one server, start another on the same port, stale tab shows wrong content
  • Monorepo multiplier: every problem scales with each service in the repo
  • Agents test the wrong port: AI agents guess or hardcode the wrong port
  • Cookie/storage clashes: cookies on localhost bleed across apps; localStorage lost when ports shift
  • Hardcoded ports in config: CORS allowlists, OAuth redirects, .env files break when ports change
  • Sharing URLs with teammates: "what port is that on?" becomes a Slack question
  • Browser history is useless: localhost:3000 history is a mix of unrelated projects

Installation

Install globally (recommended) or as a project dev dependency. Do NOT use npx or pnpm dlx for one-off execution.

Related skills
Installs
2.4K
GitHub Stars
9.3K
First Seen
Feb 15, 2026