I am pleased to announce the first release of bcfg, a tool and library for manipulating and generating configuration files in the Simple ConFiGuration file format (B stands for “boringly”). The bcfg project stems from Léo Andrès’s (@ancolie) scfg project (see [ANN] First release of scfg), but aims to go a step further:
- it extends the syntax so that non-UTF-8 strings are accepted in a form similar to that specified in RFC822 (including folding-whitespace)
- the dependency set has also been reduced to use only
ocamllexinstead ofsedlex, which is perfectly capable of handling UTF-8 strings - the distribution includes a
bcfgtlibrary based on @dbuenzli’s jsont design and a draft implementation of @swrup onscfg - the tool has been extended to include a linter (allowing configuration files to be reformatted) as well as a “
jq-style” query tool to extract information from an expression and a configuration file - the ability to stream serialisation and deserialisation (as can be done with XML and the SAX model)
The tools are also available on our apt.robur.coop repository via our reproducible infrastructure:
$ curl -fsSL https://apt.robur.coop/gpg.pub | gpg --dearmor > /usr/share/keyrings/apt.robur.coop.gpg
$ echo "deb [signed-by=/usr/share/keyrings/apt.robur.coop.gpg] https://apt.robur.coop debian-13 main" \
| sudo tee /etc/apt/sources.list.d/robur.list
$ sudo apt update
$ sudo apt install bcfg
We recommend reading the bcfg documentation to learn more about this format, these libraries and these tools, in the hope that we might also resolve or further complicate the existential questions regarding the world’s best configuration format.
