Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
Elektra provides a mature, consistent and easily comprehensible API. Its modularity effectively avoids code duplication across applications and tools concerning their configuration tasks. Elektra abstracts from cross-platform-related issues and enables applications to be aware of other applications' configurations, leveraging easy application integration.
Application Developers by making it easier to access configuration settings in a modular, reliable, and extensible way.
System Administrators by making it possible to access configuration settings in the same way applications access them.
Everyone by making application integration and context-aware configuration a reality.
Elektra consists of three parts:
LibElektra is a modular configuration access toolkit to construct and integrate applications into a global, hierarchical key database. The building blocks are:
language bindings (inclusive high-level interfaces)
GenElektra, the code generator for type-safe bindings
plugins for configuration access behavior and validation
SpecElektra is a configuration specification language that is easy to use and self-contained in the same key database (i.e. written in any of the configuration file formats Elektra supports).
Tools on top of LibElektra for system administrators, such as CLI tools, web UIs, and GUIs.
To highlight a few concrete things about Elektra, configuration settings can come from any data source, but usually comes from configuration files that are _mounted_ into Elektra similar to mounting a file system. Elektra is a plugin-based framework, for example, plugins implement various configuration formats like INI, JSON, XML, etc. There is a lot more to discover like executing scripts (python, lua or shell) when a configuration value changes, or, enhanced validation plugins that will not allow corrupted configuration settings to reach your application.
As an application developer you get instant access to various configuration formats and the ability to fallback to default configuration settings without having to deal with this on your own. As an system administrator you can choose your favorite configuration format and mount this configuration for the application. Mounting enables easy application integration as any application using Elektra can access any mounted configuration. You can even mount/etc files such as hosts or fstab, so that there is no need to configure the same values twice in different files.
In case you are worried about linking to such a powerful library. The core is a small library implemented in C, works cross-platform, and does not need any external dependencies. There are bindings for other languages in case C is too low-level for you.
The preferred way to install Elektra is by using packages provided for your distribution, see INSTALL for available packages and alternative ways for installation.
Note: It is preferable to use a recent version: They contain many bug fixes and usability improvements.
Make developer's life easier by proving a well-tested mature library instead of rolling your own configuration system for every application. This reduces rank growth of configuration systems (including but not limited to configuration file parsers) in our ecosystem and fosters well-maintained plugins instead.
Postpone configuration decisions (such as which configuration files to use) from developers to system administrators and package maintainers to provide an overall more consistent and user-friendly system. (Default behavior of applications still is in control of developers, you can even roll your own plugins to provide exactly the same behavior as your application has now.)
Make configuration storage more safe: avoid that applications receive wrong or unexpected values that could lead to undefined behavior.
And in terms of quality, we want:
Simplicity (make configuration tasks, like access of configuration settings, simple),
Robustness (no undefined behavior of applications), and
Extensibility (gain control over configuration access)