BaseSettings, so every class attribute is typed, validated configuration:
.env files, or defaults. Values are validated when the bakebook instantiates, so a bad value fails with a Pydantic error before any task runs: BAKE_PORT=99999 never reaches your task code.
Using settings in tasks
Tasks read settings as plain attributes, so configuration and the tasks that use it live in the same class:Secrets
UseSecretStr for sensitive values. They stay masked in bakefile env and bakefile export output until you explicitly pass --secret:
Getting settings out
bakefile env prints values or injects them into a command’s environment, and bakefile export writes them to shell, dotenv, JSON, or YAML. See the bakefile CLI.