Skip to content

Portless: Need of the Hour

Published:

I often run several AI agents on the same project, each in its own Git worktree. My workflow has a verification step where the agent starts the dev server and checks its own changes. With multiple agents doing this at once, they all fight for the same port. One gets 3000, the next gets “port already in use”, and the verification breaks or lands on the wrong app.

That’s where Portless comes in.

How it works

Portless is a local reverse proxy. It picks a free port itself, passes it to your app through the PORT environment variable (or a --port flag for tools that ignore it), and serves the app at a named URL.

npm install -g portless

portless myapp next dev       # https://myapp.localhost
portless api pnpm start       # https://api.localhost
portless api.myapp pnpm start # https://api.myapp.localhost

Run portless with no arguments and it runs your dev script, taking the name from the package, Git root or directory. You can also pin the name in portless.json:

{ "name": "myapp" }

Why I like it

Scan codebase with deepsec
Emoji in Domain Names