Overview
How directory and tag pairs identify a reservation.
Rust CLI
Port reservations for worktrees
trop assigns a port number to a directory and remembers it for the next run. Use it in dev scripts when you run several worktrees at once.
cargo install trop-cli
PORT=$(trop reserve) &&
npm run dev -- --port "$PORT" For an npm dev script that accepts --port.
A directory and an optional tag identify a reservation. Repeated calls return its stored
port; another directory or tag gets a separate reservation. Use --tag web or
--tag api when one directory needs several ports.
Reservations live in a local SQLite database and persist when your server stops.
Run trop prune to remove records for deleted directories.
A reservation records a number; it does not hold a socket open. Programs outside
trop can still take the port.
Reservation limits
How directory and tag pairs identify a reservation.
Install, reserve ports, and clean up old reservations.
YAML settings, port ranges, exclusions, and defaults.
What a reservation guarantees, and what it cannot enforce.