\href{https://github.com/ElektraInitiative/libelektra/releases/latest}{\tt } \href{https://build.libelektra.org/jenkins/job/libelektra/job/master/lastBuild}{\tt } \href{https://travis-ci.org/ElektraInitiative/libelektra}{\tt } \href{https://cirrus-ci.com/github/ElektraInitiative/libelektra}{\tt } \href{https://coveralls.io/github/ElektraInitiative/libelektra}{\tt } \href{https://lgtm.com/projects/g/ElektraInitiative/libelektra/alerts}{\tt }

{\itshape 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 A\+PI. 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\textquotesingle{} configurations, leveraging easy application integration.

\subsection*{Often Used Links}


\begin{DoxyItemize}
\item \href{https://build.libelektra.org/}{\tt Build server}
\item \href{https://www.libelektra.org}{\tt Website}
\item \href{https://doc.libelektra.org/api/latest/html/}{\tt A\+PI documentation}
\end{DoxyItemize}

\subsection*{Overview}

Elektra provides benefits for\+:


\begin{DoxyEnumerate}
\item {\itshape Application Developers} by making it easier to access configuration settings in a modular, reliable, and extensible way.
\item {\itshape System Administrators} by making it possible to access configuration settings in the same way applications access them.
\item {\itshape Everyone} by making application integration and context-\/aware configuration a reality.
\end{DoxyEnumerate}

Elektra consists of three parts\+:


\begin{DoxyEnumerate}
\item {\itshape Lib\+Elektra} is a modular configuration access toolkit to construct and integrate applications into a global, hierarchical key database. The building blocks are\+:
\begin{DoxyItemize}
\item language bindings (inclusive high-\/level interfaces)
\item Gen\+Elektra, the code generator for type-\/safe bindings
\item plugins for configuration access behavior and validation
\end{DoxyItemize}
\item {\itshape Spec\+Elektra} 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).
\item Tools on top of Lib\+Elektra for system administrators, such as C\+LI tools, web U\+Is, and G\+U\+Is.
\end{DoxyEnumerate}

To highlight a few concrete things about Elektra, configuration settings can come from any data source, but usually comes from configuration files that are \hyperlink{doc_help_elektra-mounting_md}{\+\_\+mounted\+\_\+} into Elektra similar to mounting a file system. Elektra is a plugin-\/based framework, for example, plugins implement various configuration formats like I\+NI, J\+S\+ON, X\+ML, etc. There is a lot more to discover like executing scripts ({\ttfamily python}, {\ttfamily lua} or {\ttfamily 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 {\itshape mount} this configuration for the application. {\itshape Mounting} enables easy application integration as any application using Elektra can access any {\itshape mounted} configuration. You can even {\itshape mount} {\ttfamily /etc} files such as {\ttfamily hosts} or {\ttfamily 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.

\subsection*{Contact}

Do not hesitate to ask any question on \href{https://issues.libelektra.org/}{\tt Git\+Hub issue tracker} or directly to one of the \hyperlink{doc_AUTHORS_md}{authors}.

\subsection*{Quickstart}

\subsubsection*{Installation}

The preferred way to install Elektra is by using packages provided for your distribution, see \hyperlink{doc_INSTALL_md}{I\+N\+S\+T\+A\+LL} for available packages and alternative ways for installation.

\begin{quote}
Note\+: It is preferable to use a recent version\+: They contain many bug fixes and usability improvements. \end{quote}


\subsubsection*{Usage}

Now that we have Elektra installed, we can start\+:


\begin{DoxyItemize}
\item using the \hyperlink{doc_help_kdb_md}{kdb command},
\item using qt-\/gui for people preferring graphical user interfaces, and
\item using web-\/ui for people preferring web user interfaces.
\end{DoxyItemize}

\subsubsection*{Documentation}

To get an idea of Elektra, you can take a look at the \href{https://www.libelektra.org/ftp/elektra/presentations/2016/FOSDEM/fosdem.odp}{\tt presentation}.

In the Git\+Hub repository the full documentation is available, including\+:


\begin{DoxyItemize}
\item \hyperlink{md_doc_tutorials_README_doc_tutorials_README_md}{tutorials},
\item \hyperlink{doc_help_elektra-faq_md}{F\+AQ},
\item \hyperlink{doc_help_elektra-glossary_md}{glossary}, and
\item \hyperlink{doc_help_elektra-introduction_md}{concepts and man pages}
\end{DoxyItemize}

You can read the documentation for the kdb tool, either


\begin{DoxyItemize}
\item \href{https://www.libelektra.org}{\tt on the Website}
\item \href{https://doc.libelektra.org/api/latest/html/doc_help_kdb_md.html}{\tt in the A\+PI docu}
\item by using {\ttfamily man kdb}
\item by using {\ttfamily kdb -\/-\/help} or {\ttfamily kdb help $<$command$>$}
\item https\+://master.libelektra.\+org/doc/help/kdb.md \char`\"{}on Git\+Hub\char`\"{}
\end{DoxyItemize}

\begin{quote}
Note\+: All these ways to read the documentation provide the same content, all generated from the Git\+Hub repository. \end{quote}


\subsection*{Facts and Features}


\begin{DoxyItemize}
\item Elektra uses simple key-\/value pairs.
\item Elektra uses the B\+SD licence.
\item Elektra implements an \href{https://doc.libelektra.org/api/latest/html/}{\tt A\+PI} to fully access a global key database.
\item Elektra can be thought of a \hyperlink{doc_BIGPICTURE_md}{virtual file system for configuration}.
\item Elektra supports mounting of existing configuration files into a global key database.
\item Elektra has dozens of \hyperlink{src_plugins_README_md}{Plugins} that make it possible to have a tiny core, but still support many features, including\+:
\begin{DoxyItemize}
\item Elektra can import and export configuration files in any \hyperlink{src_plugins_README_md}{supported format}.
\item Elektra is able to log and notify other software on any configuration changes, for example, using \hyperlink{md_src_plugins_dbus_README_src_plugins_dbus_README_md}{Dbus} and \hyperlink{md_src_plugins_journald_README_src_plugins_journald_README_md}{Journald}.
\item Elektra can improve robustness by rejecting invalid configuration via \hyperlink{md_src_plugins_type_README_src_plugins_type_README_md}{type checking}, \hyperlink{md_src_plugins_validation_README_src_plugins_validation_README_md}{regex} and more.
\item Elektra provides different mechanisms to \hyperlink{md_src_plugins_resolver_README_src_plugins_resolver_README_md}{locate configuration files}.
\item Elektra supports different ways to \hyperlink{md_src_plugins_ccode_README_src_plugins_ccode_README_md}{escape} and \hyperlink{md_src_plugins_iconv_README_src_plugins_iconv_README_md}{encode} content of configuration files.
\end{DoxyItemize}
\item Elektra is multi-\/process safe and can be used in multi-\/threaded programs.
\item Elektra (except for some \hyperlink{src_plugins_README_md}{plugins}) is portable and completely written in A\+N\+SI C99.
\item Elektra (except for some \hyperlink{src_plugins_README_md}{plugins}) has no external dependency.
\item Elektra is suitable for embedded systems and early boot stage programs.
\item Elektra provides many powerful Bindings to avoid low-\/level access code.
\item Elektra provides powerful Code Generation Techniques for high-\/level configuration access.
\end{DoxyItemize}

\subsection*{News}

Go to the \href{https://www.libelektra.org}{\tt website}, see the news, and its \href{https://www.libelektra.org/news/feed.rss}{\tt R\+SS feed}.

\subsection*{Download}

Elektra uses a \href{https://github.com/ElektraInitiative/libelektra}{\tt git repository at Git\+Hub}.

You can clone the latest version of Elektra by running\+:


\begin{DoxyCode}
git clone https://github.com/ElektraInitiative/libelektra.git
\end{DoxyCode}


Releases can be downloaded from \href{https://www.libelektra.org/ftp/elektra/releases/}{\tt here}.

\subsection*{Build Server}

The \href{https://build.libelektra.org/}{\tt build server} builds Elektra for every pull request and on every commit in various ways and also produces \href{https://doc.libelektra.org/coverage/master/debian-stable-full/}{\tt L\+C\+OV code coverage report}.

\subsection*{Contributing}

Take a look at \hyperlink{doc_IDEAS_md}{how to start contributing}.

\subsection*{Goals}


\begin{DoxyItemize}
\item Make developer\textquotesingle{}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.
\item 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.)
\item Make configuration storage more safe\+: avoid that applications receive wrong or unexpected values that could lead to undefined behavior.
\end{DoxyItemize}

And in terms of quality, we want\+:


\begin{DoxyEnumerate}
\item Simplicity (make configuration tasks, like access of configuration settings, simple),
\item Robustness (no undefined behavior of applications), and
\item Extensibility (gain control over configuration access)
\end{DoxyEnumerate}

\hyperlink{doc_GOALS_md}{Continue reading about the goals of Elektra} 