Variable types
Configorama variables use ${...} syntax to describe where a value should come from. The common shape is ${source:name, fallback} for keyed sources and ${source(...)} for function-style helpers.
stage: ${opt:stage, "dev"}
host: ${env:API_HOST, "localhost"}
schedule: ${cron(every 5 minutes)}| Type | Source class | Page |
|---|---|---|
env | user | Environment |
opt / option | user | Options |
param | user | Params |
self / bare path | config | Self |
file | config | File |
text | config | Text |
git | readonly | Git |
cron | readonly | Cron |
eval | readonly data-flow | Eval |
if | readonly data-flow | If |
Custom variable sources are extension points rather than core types. See write a custom variable source for the user-provided resolver API and safe inspection for execution policy.
Last updated on