Idempotent
Same directory, same port
Run trop reserve again from the same worktree and get the same number.
Learn moreRust CLI
Port reservations for worktrees
A small CLI for stable localhost port numbers per worktree.
Terminal
$ cargo install trop-cli
$ PORT=$(trop reserve)
$ npm run dev -- --port $PORT Reservation model
Reservations are keyed by directory and optional tag. Repeated calls return the same port.
What trop provides
Idempotent
Run trop reserve again from the same worktree and get the same number.
Learn moreTagged
Use --tag web, --tag api, or similar names when one worktree needs multiple ports.
Learn moreConcurrent
Concurrent invocations share a local SQLite database.
Learn moreCleanup
Remove reservations whose directories no longer exist.
Learn moreScope
Non-goals
No system-wide enforcement. No multi-user broker. No container orchestration.
Documentation
What trop reserves, why it exists, and where it fits.
Open pageBasic commands and script patterns for local port reservations.
Open pagePort ranges, tags, exclusions, and cleanup behavior.
Open pageWhat trop deliberately does and does not attempt to solve.
Open pageInstall
Use trop reserve where a script expects a port.
$ cargo install trop-cli
$ trop --version
$ PORT=$(trop reserve)