Leaf Config

leaf config - configure and customize leaf options

$ leaf config [--root PACKAGESROOT]

leaf config allows users to configure the leaf tool behavior.

If used without specifying any option, the command will simply outputs the location of the current configuration file (cf LEAF_CONFIG variable description below).

If used with --root option, the command will set the packages install location.

Beyond this command, the leaf tool is also configured through a set of environment variables, described in this page as well.

Options

--root PACKAGESROOT

Sets the location where packages are installed. A package named myPackage1.0 will be extracted and installed in the PACKAGESROOT/myPackage1.0 folder. Default value for this parameter is $HOME/.leaf

Variables

The following environment variables can be used to configure the leaf tool behavior.

LEAF_CONFIG

Location for the leaf configuration folder. Default value is $HOME/.config/leaf

LEAF_CONFIG stores the following files/folders:

config.json

The main leaf configuration file which stores:

  • the packages root install folder (cf --root option above)
  • the configured remotes list (see leaf remote)
  • the user's global environment (see leaf env)

Global configuration for leaf behavior is a combination of the default configuration file with the config.json file present in the user configuration folder (if any).

Leaf will search for config.json in the following order: /etc/leaf/, /usr/share/leaf/ and then $HOME/.local/share/leaf/

Modifying the default configuration (e.g. disabling a remote present in the default configuration) will be stored in the user config.json file and override any default values.

Note
In order to reset to the default configuration, delete the config.json file from the user configuration folder.

themes.ini

Contains the colors themes definition.

If the themes.ini file is not found in the user configuration folder, leaf will search for themes.ini in the following folders: /etc/leaf/, /usr/share/leaf/ and then $HOME/.local/share/leaf/

Note
In order to reset to the default color theme configuration, delete the themes.ini file from the user configuration folder.

gpg

The gpg keyring folder that contains the keyrings used by leaf for remotes gpg signing.

LEAF_CACHE

Location of cached information. Default value: $HOME/.cache/leaf

It may contain:

  • info from remote indexes
  • package artifacts before install

The content of this folder can be deleted at any time to save disk space. A warning message will be regularly displayed as soon as this cache size exceeds 5 GB.

LEAF_TIMEOUT

Duration (in seconds) of the download timeout. Default value is 10

Timeout that leaf waits to download data when the remote falls into an inactive state.

LEAF_DEBUG

When set, will print a stack trace to the screen when an error occurs