This is just a brief overview if CNI, you can also check out the API for the CNI module.
I've also made a local copy of the CNI Specification that cni.d conforms to, but there original can be found at https://github.com/libuconf/cni .
The syntax of CNI is very similar to INI files, where you have a [section] which can act as a namespace for settings, along with a option = value line. The reason to use CNI over INI are few, but important: there is a defined specification (which can allow for verification of files and tooling support), inline comments, and "raw values" (which can allow you to have a value which spans multiple lines, includes excess whitespace, etc.).
[Program Settings] # Where do we store user configuration? CONFIG_DIRECTORY=/home/username/.local/config # Where do we store our data? DATA_DIRECTORY=/home/username/.local/share USER_BIO=`This is a user bio that we display when the information is required to be display, the value is multi-line and "raw" so we can include a good-old # without it being a comment.`
Shortly after beginning medialist-cli, I stumbled across Trivial Technology (TT) (probably the motivator for making this project 0BSD), which is about making projects which are small and simple to understand; and providing the greatest access to software by making it public domain. While interesting, not exactly something I was going to jump on board straight away. Regardless, I took a look at the author's projects where I found CNI. The idea of having a configuration format with a defined specification (and was easily understandable) was appealing, and thus I added it to the TODO file in 2021.
After a few different attempts of making a CNI library (first in C, then in C++), I decided on actually keeping it written in D. So, after a brisk year and a half, I decided to actually make the change and swap from INI to CNI.
Version 0.1.0 is the initial version, which does conform with CNI 0.1.0 (core: 29/29, ini: compliant, ext: more-keys).
In future versions I would like to implement the "suggested API", along with an API which matches ConfigParser.