SyConf is a simple configuration language that keeps your configuration lean.
Why another configuration language?
Software configuration is getting larger and more complex. Modern software require more complex and large configurations. Configuration files of Kubernetes, Prometheus, AlertManager, Concourse, Vector.dev, etc. tend to get large, repetitive, clumsy, and at the end less maintainable.
Existing configuration languages either do not support templating and functions, like JSON, YAML, TOML, or have complex grammars and multiple features that often go beyond the scope of a configuration language, e.g. JsonNet, Dhall.
SyConf is a simple, pure functional, not Turing complete configuration language that supports user defined functions, powerful string interpolation, and helps to keep complex configurations concise and maintainable.
let house_number = 53
let my_hash = {
name: "john",
age: 33,
}
in
{
person: my_hash,
address: "Awesome Street ${house_number}",
}
let add2 = (x) => x + 2
in
[3, add2(4)]
let name = "alexei"
in
"hello ${name}"
let instance_x = import "./instance_x.sy"
let instance_y = import "./instance_y.sy"
in
{
instances: [instance_x, instance_y]
}
SyConf objects have a small set of meaningful methods
let hash = {
aa: 3,
bb: 4,
}
in
hash.map( (key, value) => [key, value * 10])
let region = getenv("AWS_REGION", "eu-central-1")
let prom_config = read_file("prometheus.yaml").parse_yaml()
let x = if getenv("MY_VAR", "default_value") == "abc" then "this" else "that"
let func = (x) => {
let a = x + 2
in
a * 4
}
The letters S
and Y
in the name SyConf are the first and the last letter in the word simplicity.