sema-config 0.1.0

API reference · 6 exports

Source declarations and literal docstrings from this release. Package code was not executed.

config/env-overrides

(config/env-overrides prefix)
Collect all environment variables starting with prefix into a nested map: APP_DB__HOST=x → {:db {:host "x"}}. Double underscores nest; single segments become lowercase kebab-case keywords. Values stay strings — coerce at the consumer via :%env or your own parsing.

Source: package.sema:288

config/get

(config/get cfg key . default)
Get a top-level config value, falling back to default (nil when omitted). Thin wrapper over the stdlib get, kept for API symmetry.

Source: package.sema:307

config/get-in

(config/get-in cfg path . default)
Get a nested config value at a key path, falling back to default (nil when omitted). Same semantics as the stdlib map/get-in, kept for API symmetry.

Source: package.sema:311

config/load

(config/load sources . opts)
Load layered configuration: deep-merge sources left-to-right (later wins), apply the selected profile, then expand :%env/:%ref/:%or directives and ${VAR} strings. Sources are file paths and/or maps; a single path or map is also accepted. Options: {:profile :prod} (falls back to the SEMA_PROFILE env var).

Source: package.sema:273

config/read

(config/read path . opts)
Read one config file by extension (.toml, .json, or .sema) into a keyword-keyed map. Options: {:optional #t} returns {} instead of erroring when the file is missing.

Source: package.sema:263

config/require!

(config/require! cfg paths)
Assert that every key path in paths exists in cfg — errors listing ALL missing paths at once. Returns cfg for chaining.

Source: package.sema:315