Options in Runegraft are declared with theDocumentation Index
Fetch the complete documentation index at: https://runegraft.codesft.dev/llms.txt
Use this file to discover all available pages before exploring further.
opt helper. They stay close to your function signatures, so type hints and defaults map directly to your CLI help text.
Adding options
- Short and long flags are defined together:
opt("--dry-run", "-n", default=False, ...). - Defaults show up in generated help output automatically.
- Type hints (
bool,str,int, etc.) are enforced and reflected in the usage string.
Choices and validation
Provide a set of allowed values to restrict input:Pairing with routes
Options layer cleanly on top of your route patterns. Keep positional arguments in the route (e.g.,<env:str>) and reserve options for optional behavior. Combine options with Type Converters to accept richer input like URLs or JSON blobs.