Skip to main content

Dynamic environment

Omni provides a dynamic environment for repositories. During omni up, omni will store the environment that needs loading when you navigate to the current repository.


The following configuration parameters lead to dynamic environment.

ConfigurationDynamic environment
envEach entry in the map leads to setting an environment variable to the defined value
bash operationSee details
bundler operationSee details
go operationSee details
node operationSee details
python operationSee details
ruby operationSee details
rust operationSee details
terraform operationSee details

Behind the scene

The __omni_dynenv environment variable

Omni's dynamic environment is set when entering an omni up-ed repository directory, and updated or unset when leaving this directory. Omni uses the __omni_dynenv environment variable to keep track of this.

This variable is structured with a blake3 hash, semicolon-separated from a JSON object. The hash allows to easily identify if the current dynamic environment corresponds to the expected one. The JSON object indicates all the changes that have been operated on the environment.

This is inspired from the way shadowenv keeps track of environment changes so it can restore the environment when leaving a directory.