Skip to main content

Environment variables

Writeable

Omni supports a number of environment variables for its configuration. Setting those will generally override equivalent configuration options or precede them.

VariableTypeDescription
OMNIPATHcolon-delimited list of pathsProvides the paths to different omni commands. See parameters/path for more details.
OMNI_CONFIGfilepathThe path to an omni global configuration file. See files.
OMNI_FORCE_UPDATEstringForce-triggers omnipath and self updates when set to anything but an empty string, even if it should have triggered. It is recommended to either set to 1 or empty/unset. Is superseded by OMNI_SKIP_UPDATE and OMNI_SKIP_SELF_UPDATE.
OMNI_GITpathThe worktree where omni will clone and look for repositories. Overrides the configuration. See parameters/worktree for more details.
OMNI_NONINTERACTIVEstringDisables interactive prompts when set to anything but an empty string. It is recommended to either set to 1 or empty/unset.
OMNI_ORGcomma-delimited list of stringsPrepend organizations to be considered by omni. e.g.: OMNI_ORG="git@github.com:XaF,github.com/XaF". See parameters/org for more details.
OMNI_SKIP_SELF_UPDATEstringDisables self updates when set to anything but an empty string, even if it should have triggered. It is recommended to either set to 1 or empty/unset.
OMNI_SKIP_UPDATEstringDisables omnipath and self updates when set to anything but an empty string, even if it should have triggered. It is recommended to either set to 1 or empty/unset.

Read-only

VariableTypeDescription
OMNI_LOCAL_LOOKUPbooleanWhen using omni --local to prioritize local commands lookup over global ones, this variable will be set to true. It is not used by omni in any way, but can be used by scripts to determine if omni is running in local mode.
OMNI_ARG_LISTstringThe list of arguments parsed by the argument parser for the command.
OMNI_ARG_<argname>_TYPEstringThe type of the argument <argname> parsed by the argument parser for the command. Can be one of str, int, float, bool for single-value arguments, or any <type>/<size> where <type> is one of the previous types and <size> is the number of values for multi-value arguments. The type can also take the shape <type>/<size1>/<size2> when a parameter is configured to group occurrences.
OMNI_ARG_<argname>_TYPE_<index>stringThe type at index <index> of the argument <argname> parsed by the argument parser for the command, if the type is a multi-value type. The index is 0-based.
OMNI_ARG_<argname>_VALUEstringThe value of the argument <argname> parsed by the argument parser for the command, if the type is a single-value type.
OMNI_ARG_<argname>_VALUE_<index>stringThe value at index <index> of the argument <argname> parsed by the argument parser for the command, if the type is a multi-value type. The index is 0-based.
OMNI_ARG_<argname>_VALUE_<index1>_<index2>stringThe value at index <index2> of the occurrence group <index1> of the argument <argname> parsed by the argument parser for the command, if the type is a multi-value type and the parameter is configured to group occurrences. The index is 0-based.