joetjen.net
EN DE
← All libraries
Elixir

cooper

Loads CASC config files — hierarchical, with imports, variables, interpolation, environment reads and loops — into native Elixir terms.

Intention

Config libraries either parse a fixed format or hand you a bespoke DSL with no formal grammar behind it. CASC has a real specification, and Cooper implements it through Ichor rather than hand-rolled string parsing, so the interpreter tracks the grammar and not the other way around.

Example
database {
  *password = ${DB_PASSWORD}
  host = "db.@{region}.internal"
  timeout = 500ms
}
Install
{:cooper, "~> 0.2.0"}
ElixirConfigurationCASC