SecretUtils is a Bakebook mixin from bakelib.utils that wires a RefreshableCacheRegistry into your bakebook and adds the bake secret commands. It reuses the same FetchFn you define for the refreshable cache. Override get_secret_fetch_fns to declare which keys are tracked:
bake secret group:
bake secret list- tracked keys with cached/not-cached status (shows the namespace)bake secret get KEY- print a cached valuebake secret set KEY VALUE- store a value (plain, not prompted)bake secret del [KEY]- delete one key, or all if none givenbake secret refresh [KEY]- re-run the fetch functions for one key, or all
MemoryCache + KeyringCache under the namespace "bakebook". Override get_secret_namespace() to isolate secrets per project.
For more details, see the bakelib source.