Multiple plugins can be mounted into the \hyperlink{doc_help_elektra-glossary_md}{key database} (K\+DB). On every access to the key data base they are executed and thus can change the functionality and behavior.

Unlike Elektra\textquotesingle{}s core the plugins have all kinds of dependencies. It is the responsibility of the plugin to find and check its dependencies using C\+Make. If a dependency cannot be found, the plugin will automatically disable itself.

Elektra has a wide range of different plugins. The plugin folders should contain a R\+E\+A\+D\+M\+E.\+md with further information. (Or follow links below.) The plugins are\+:

 

All plugins implement the same interface\+:


\begin{DoxyItemize}
\item {\ttfamily \hyperlink{group__kdb_ga6808defe5870f328dd17910aacbdc6ca}{kdb\+Open()}} calls {\ttfamily \hyperlink{elektra_2plugin_8c_a32a70a7876542c51d153164ac5108a57}{elektra\+Plugin\+Open()}} of every plugin to let them do their initialisation.
\item {\ttfamily \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()}} requests {\ttfamily elektra\+Plugin\+Get()} of every plugin in the queried backends to return a key set.
\item {\ttfamily \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} usually calls {\ttfamily elektra\+Plugin\+Set()} of every plugin in the queried backends to store the configuration.
\item {\ttfamily \hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} also calls {\ttfamily elektra\+Plugin\+Error()} for every plugin when an error happens. Because of {\ttfamily elektra\+Plugin\+Error()}, plugins are guaranteed to have their chance for necessary cleanups.
\item {\ttfamily \hyperlink{group__kdb_gadb54dc9fda17ee07deb9444df745c96f}{kdb\+Close()}} makes sure that plugins can finally free their own resources in {\ttfamily elektra\+Plugin\+Close()}.
\end{DoxyItemize}

Furthermore, plugins might export symbols\+:


\begin{DoxyItemize}
\item {\ttfamily checkconf} can be called during mounting to ensure a plugin has valid configuration.
\item {\ttfamily genconf} can be called to produce all valid configurations of a plugin.
\end{DoxyItemize}


\begin{DoxyItemize}
\item To list all plugins use \hyperlink{doc_help_kdb-plugin-list_md}{kdb-\/plugin-\/list(1)}.
\item To check a plugin use \hyperlink{doc_help_kdb-plugin-check_md}{kdb-\/plugin-\/check(1)}.
\item For information on a plugin use \hyperlink{doc_help_kdb-plugin-info_md}{kdb-\/plugin-\/info(1)}.
\item For mount plugin(s) use \hyperlink{doc_help_kdb-mount_md}{kdb-\/mount(1)}.
\end{DoxyItemize}

For an easy introduction, see \hyperlink{doc_tutorials_plugins_md}{this tutorial how to write a storage plugin}. For more background information of the \hyperlink{doc_dev_plugins-framework_md}{plugins framework, continue here}. Otherwise, you can visit the \href{https://doc.libelektra.org/api/latest/html/group__plugin.html}{\tt the A\+PI documentation}.

Before configuration is actually written, the file name needs to be determined (resolvers will be automatically added by kdb mount)\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md579_src_plugins_resolver_README_md}{resolver} uses advanced P\+O\+S\+IX A\+P\+Is to handle conflicts gracefully
\item \hyperlink{autotoc_md479_src_plugins_noresolver_README_md}{noresolver} does not resolve as no file name is needed (for non-\/file storage plugins)
\item \hyperlink{autotoc_md765_src_plugins_wresolver_README_md}{wresolver} minimalistic resolver for non-\/\+P\+O\+S\+IX systems
\end{DoxyItemize}

Furthermore, there are following experimental resolvers\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md64_src_plugins_blockresolver_README_md}{blockresolver} resolves tagged blocks inside config files
\item \hyperlink{autotoc_md139_src_plugins_curlget_README_md}{curlget} fetches configuration file from a remote host
\item \hyperlink{autotoc_md232_src_plugins_gitresolver_README_md}{gitresolver} checks out and commits files to a local git repository
\item \hyperlink{autotoc_md448_src_plugins_multifile_README_md}{multifile}
\end{DoxyItemize}

Are responsible for reading writing the configuration to configuration files.

Read and write everything a Key\+Set might contain\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md191_src_plugins_dump_README_md}{dump} makes a dump of a Key\+Set in an Elektra-\/specific format
\item \hyperlink{autotoc_md526_src_plugins_quickdump_README_md}{quickdump} uses binary portable format based on \hyperlink{autotoc_md191_src_plugins_dump_README_md}{dump}, but more efficient
\item \hyperlink{autotoc_md398_src_plugins_mmapstorage_README_md}{mmapstorage} uses binary, not portable memory mapped file for a high performance storage
\end{DoxyItemize}

Read (and write) standard config files\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md635_src_plugins_toml_README_md}{toml} reads and writes data using a parser generated by \href{https://github.com/westes/flex}{\tt Flex} and \href{https://www.gnu.org/software/bison}{\tt Bison}
\item \hyperlink{autotoc_md261_src_plugins_hosts_README_md}{hosts} reads/writes hosts files
\item \hyperlink{autotoc_md317_src_plugins_kconfig_README_md}{kconfig} reads/writes K\+Config ini files
\item \hyperlink{autotoc_md341_src_plugins_line_README_md}{line} reads/writes any file line by line
\item \hyperlink{autotoc_md777_src_plugins_yajl_README_md}{yajl} reads/writes J\+S\+ON.
\item \hyperlink{autotoc_md43_src_plugins_augeas_README_md}{augeas} reads/writes many different configuration files using the Augeas library
\end{DoxyItemize}

Using semi-\/structured data for config files, mainly suitable for spec-\/namespace (put a focus on having nice syntax for metadata)\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md469_src_plugins_ni_README_md}{ni} parses I\+NI files based on (including metadata) \href{https://lab.burn.capital/chaz-attic/bohr/-/blob/main/include/bohr/ni.h}{\tt ni}.
\end{DoxyItemize}

Only suited for import/export\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md371_src_plugins_mini_README_md}{mini} dependency free, line based key-\/value storage plugin.
\item \hyperlink{autotoc_md599_src_plugins_simpleini_README_md}{simpleini} line-\/based key-\/value pairs with configurable format (without sections). Only works on glibc systems.
\item \hyperlink{autotoc_md767_src_plugins_xerces_README_md}{xerces} uses X\+ML (without a specific schema).
\item \hyperlink{autotoc_md773_src_plugins_xmltool_README_md}{xmltool} uses X\+ML in the deprecated Elektra X\+ML schema for importing configuration from Elektra 0.\+7.
\item \hyperlink{autotoc_md889_src_plugins_yamlsmith_README_md}{yamlsmith} exports key sets in the Y\+A\+ML format
\item \hyperlink{autotoc_md69_src_plugins_c_README_md}{c} writes Elektra C-\/structures ({\ttfamily ks\+New(.. key\+New(...})
\end{DoxyItemize}

Plugins that just show some functionality, (currently) not intended for productive use\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md122_src_plugins_csvstorage_README_md}{csvstorage} for csv files
\item \hyperlink{autotoc_md190_src_plugins_dpkg_README_md}{dpkg} reads /var/lib/dpkg/\{available,status\}
\item \hyperlink{autotoc_md214_src_plugins_file_README_md}{file} reads and writes a file from/to a single key
\item \hyperlink{autotoc_md228_src_plugins_fstab_README_md}{fstab} for fstab files.
\item \hyperlink{autotoc_md441_src_plugins_mozprefs_README_md}{mozprefs} for Mozilla preference files
\item \hyperlink{autotoc_md480_src_plugins_passwd_README_md}{passwd} for passwd files
\item \hyperlink{autotoc_md618_src_plugins_specload_README_md}{specload} calls an external application to request its specification, depends on \hyperlink{autotoc_md526_src_plugins_quickdump_README_md}{quickdump}
\item \hyperlink{autotoc_md807_src_plugins_yamlcpp_README_md}{yamlcpp} reads and writes data in the \href{http://www.yaml.org}{\tt Y\+A\+ML} format using \href{https://github.com/jbeder/yaml-cpp}{\tt yaml-\/cpp}
\item \hyperlink{autotoc_md897_src_plugins_yanlr_README_md}{yanlr} reads data using a parser generated by \href{http://www.antlr.org}{\tt A\+N\+T\+LR}
\end{DoxyItemize}

Information compiled in Elektra\+:


\begin{DoxyItemize}
\item version is a built-\/in plugin directly within the core so that it cannot give wrong version information
\item \hyperlink{autotoc_md102_src_plugins_constants_README_md}{constants} various constants fixed when Elektra was compiled
\item \hyperlink{autotoc_md167_src_plugins_desktop_README_md}{desktop} contains information which desktop is currently running
\end{DoxyItemize}

Providing information found on the system not available in persistent files\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md752_src_plugins_uname_README_md}{uname} information from the uname syscall.
\end{DoxyItemize}

{\itshape Filter plugins} process keys and their values in both directions. In one direction they undo what they do in the other direction. Most filter plugins available now encode and decode values. Storage plugins that use characters to separate key names, values or metadata will not work without them.

Rewrite unwanted characters within strings ({\bfseries code}-\/plugins)\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md79_src_plugins_ccode_README_md}{ccode} using the technique from arrays in the programming language C
\item \hyperlink{autotoc_md253_src_plugins_hexcode_README_md}{hexcode} using hex codes
\end{DoxyItemize}

Rewrite unwanted characters within binary data ({\bfseries binary}-\/plugins)\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md51_src_plugins_base64_README_md}{base64} using the Base64 encoding scheme (R\+F\+C4648)
\end{DoxyItemize}

Other filters\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md109_src_plugins_crypto_README_md}{crypto} encrypts / decrypts confidential values
\item \hyperlink{autotoc_md200_src_plugins_fcrypt_README_md}{fcrypt} encrypts / decrypts entire files
\item \hyperlink{autotoc_md244_src_plugins_gpgme_README_md}{gpgme} encrypts / decrypts confidential values (with G\+P\+G\+ME)
\item \hyperlink{autotoc_md279_src_plugins_iconv_README_md}{iconv} makes sure the configuration will have correct character encoding
\end{DoxyItemize}

Experimental transformations (are {\bfseries not} recommended to be used in production)\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md170_src_plugins_directoryvalue_README_md}{directoryvalue} converts directory values to leaf values
\item \hyperlink{autotoc_md257_src_plugins_hexnumber_README_md}{hexnumber} converts between hexadecimal and decimal
\item \hyperlink{autotoc_md333_src_plugins_keytometa_README_md}{keytometa} transforms keys to metadata
\item \hyperlink{autotoc_md563_src_plugins_rename_README_md}{rename} renames keys according to different rules
\item \hyperlink{autotoc_md502_src_plugins_profile_README_md}{profile} renames keys according to current profile
\end{DoxyItemize}

Log/\+Send out all changes to configuration to\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md151_src_plugins_dbus_README_md}{dbus} sends notifications for every change via dbus {\ttfamily notification}
\item \hyperlink{autotoc_md315_src_plugins_journald_README_md}{journald} logs key database changes to journald
\item \hyperlink{autotoc_md626_src_plugins_syslog_README_md}{syslog} logs key database changes to syslog
\item \hyperlink{autotoc_md946_src_plugins_zeromqsend_README_md}{zeromqsend} sends notifications for every change via Zero\+MQ sockets {\ttfamily notification}
\end{DoxyItemize}

Notification of key changes\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md285_src_plugins_internalnotification_README_md}{internalnotification} get updates automatically when registered keys were changed
\item \hyperlink{autotoc_md163_src_plugins_dbusrecv_README_md}{dbusrecv} receives notifications via dbus {\ttfamily notification}
\item \hyperlink{autotoc_md940_src_plugins_zeromqrecv_README_md}{zeromqrecv} receives notifications via Zero\+MQ sockets {\ttfamily notification}
\end{DoxyItemize}

Trace everything that happens within K\+DB\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md104_src_plugins_counter_README_md}{counter} count and print how often a plugin is used
\item \hyperlink{autotoc_md632_src_plugins_timeofday_README_md}{timeofday} prints timestamps
\item \hyperlink{autotoc_md742_src_plugins_tracer_README_md}{tracer} traces all calls
\item \hyperlink{autotoc_md304_src_plugins_iterate_README_md}{iterate} iterate over all keys and run exported functions on tagged keys
\item \hyperlink{autotoc_md357_src_plugins_logchange_README_md}{logchange} prints the change of every key on the console
\end{DoxyItemize}

Copies metadata to keys\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md236_src_plugins_glob_README_md}{glob} using globbing techniques (needed by some plugins)
\item \hyperlink{autotoc_md605_src_plugins_spec_README_md}{spec} copies metadata from spec namespace (the standard way)
\end{DoxyItemize}

Plugins that check if values are valid based on metadata (typically copied by the {\ttfamily spec} plugin just before) to validate values\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md745_src_plugins_type_README_md}{type} type checking (C\+O\+R\+BA types) with enum functionality
\item \hyperlink{autotoc_md287_src_plugins_ipaddr_README_md}{ipaddr} checks IP addresses using regular expressions
\item \hyperlink{autotoc_md453_src_plugins_network_README_md}{network} by using network A\+P\+Is
\item \hyperlink{autotoc_md486_src_plugins_path_README_md}{path} by checking files on file system
\item \hyperlink{autotoc_md756_src_plugins_unit_README_md}{unit} validates and normalizes units of memory (e.\+g. 20\+KB to 20000 Bytes)
\end{DoxyItemize}

The same but experimental\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md84_src_plugins_conditionals_README_md}{conditionals} by using if-\/then-\/else like statements
\item \hyperlink{autotoc_md147_src_plugins_date_README_md}{date} validates date and time data
\item \hyperlink{autotoc_md368_src_plugins_mathcheck_README_md}{mathcheck} by mathematical expressions using key values as operands
\item \hyperlink{autotoc_md364_src_plugins_macaddr_README_md}{macaddr} checks if M\+AC addresses are valid and normalizes them
\item \hyperlink{autotoc_md533_src_plugins_range_README_md}{range} checks if a value is within a given range
\item \hyperlink{autotoc_md557_src_plugins_reference_README_md}{reference} checks if a value is a valid reference to another key
\item \hyperlink{autotoc_md589_src_plugins_rgbcolor_README_md}{rgbcolor} validates and normalizes hexcolors
\item \hyperlink{autotoc_md760_src_plugins_validation_README_md}{validation} by using regex
\end{DoxyItemize}

Other validation mechanisms not based on metadata\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md226_src_plugins_filecheck_README_md}{filecheck} does sanity checks on a file
\item \hyperlink{autotoc_md351_src_plugins_lineendings_README_md}{lineendings} tests file for consistent line endings
\end{DoxyItemize}

These plugins start an interpreter and allow you to execute a script in an interpreted language whenever Elektra’s key database gets accessed. Note that they depend on the presence of the respective binding during run-\/time\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md305_src_plugins_jni_README_md}{jni} java plugins started by jni, works with jna plugins
\item \hyperlink{autotoc_md359_src_plugins_lua_README_md}{lua} Lua plugins
\item \hyperlink{autotoc_md504_src_plugins_python_README_md}{python} Python 3 plugins
\item \hyperlink{autotoc_md592_src_plugins_ruby_README_md}{ruby} Ruby plugins
\item \hyperlink{autotoc_md597_src_plugins_shell_README_md}{shell} executes shell commandos
\end{DoxyItemize}


\begin{DoxyItemize}
\item \hyperlink{autotoc_md70_src_plugins_cache_README_md}{cache} caches keysets from previous {\ttfamily \hyperlink{group__kdb_ga28e385fd9cb7ccfe0b2f1ed2f62453a1}{kdb\+Get()}} calls
\item \hyperlink{autotoc_md624_src_plugins_sync_README_md}{sync} uses P\+O\+S\+IX A\+P\+Is to sync configuration files with the hard disk
\item \hyperlink{autotoc_md241_src_plugins_gopts_README_md}{gopts} global plugin to automatically call {\ttfamily elektra\+Get\+Opts}
\item \hyperlink{autotoc_md495_src_plugins_process_README_md}{process} proxy plugin that executes other plugins in a separate process (useful for interpreter plugins and plugins with global setup like {\ttfamily xerces})
\end{DoxyItemize}


\begin{DoxyItemize}
\item \hyperlink{autotoc_md627_src_plugins_template_README_md}{template} to be copied for new plugins
\item \hyperlink{autotoc_md106_src_plugins_cpptemplate_README_md}{cpptemplate} a template for C++ based plugins
\item \hyperlink{autotoc_md189_src_plugins_doc_README_md}{doc} contains the documentation of the plugin interface
\item \hyperlink{autotoc_md196_src_plugins_error_README_md}{error} yields errors as described in metadata (handy for test purposes)
\end{DoxyItemize}

Please avoid, if possible, to use following plugin\+:


\begin{DoxyItemize}
\item \hyperlink{autotoc_md353_src_plugins_list_README_md}{list} loads other plugins 
\end{DoxyItemize}