port-selector

Installation
SKILL.md

Port Selector

Use port-selector instead of hard-coded ports or hand-written lsof loops. Allocate from the same working directory in which the service runs because allocations are stable per (directory, name).

Start a local service

  1. Confirm the CLI is available with command -v port-selector. If it is missing, install it with the repository's documented method before continuing.
  2. Choose a short stable service name such as web, api, docs, preview, or e2e. Use different names for services that run concurrently from the same directory.
  3. Allocate and start the process in one shell command. Quote the port variable.
PORT="$(port-selector --name preview)"
python3 -m http.server "$PORT"

Adapt how the port is passed to the program:

Installs
15
GitHub Stars
4
First Seen
Aug 17, 2026
port-selector — dapi/port-selector