Configuration
No configuration file is required for trop reserve. The default allocation range is 5000–7000.
Project configuration
Section titled “Project configuration”Put settings in trop.yaml at the project root:
ports: min: 5000 max: 7000
excluded_ports: - 5432 - "6000..6010"
cleanup: expire_after_days: 30Exclusion ranges include both endpoints. Exclusions keep known service ports out of new allocations; they do not move existing reservations.
Check a file before using it:
trop validate ./trop.yamlTo define several tagged ports together, add a reservations mapping as shown in Service groups.
Setting precedence
Section titled “Setting precedence”From highest to lowest:
- Command-line flags
- Environment variables
trop.local.yamlat the project boundarytrop.yamlat the project boundaryconfig.yamlin the data directory (~/.tropby default)- Built-in defaults
Omitted settings inherit from the next source. Exclusions accumulate across files. A reservations mapping replaces the whole inherited group; reservations: null clears the configured group without deleting stored reservations.
Use --data-dir or TROP_DATA_DIR to select another data directory. Callers must use the same database to coordinate.
Cleanup
Section titled “Cleanup”When trop reserve runs out of candidates, it prunes reservations whose directories are gone, expires unused reservations according to the configured age, and retries once. The default expiration threshold is 30 days.
Set disable_autoprune: true or disable_autoexpire: true to disable the corresponding automatic step. These settings do not schedule background cleanup. You can also run cleanup explicitly.
Project metadata
Section titled “Project metadata”project and task label reservations for inspection. The directory and tag still identify the reservation. You can set project in trop.yaml, or pass --project and --task when reserving.
For the remaining options, use trop --help and trop reserve --help.