--help, and shell completion for free (bake --install-completion).
There are two patterns, depending on whether you define the task before or after instantiating the bakebook:
Pattern 1: On the class
Use@command() on class methods, and access the context through self.ctx:
Pattern 2: On the instance
Use@bakebook.command() on standalone functions, and access the context through bakebook.ctx:
Decorator options
@command() accepts all Typer options: name, help, deprecated, and so on. Rename a task or document it without touching its function:
Typed arguments
Task parameters become typed CLI options. Defaults carry over, and--help documents itself:
Annotated with typer.Option for custom flags: