Skip to content

Direnv

Direnv is a program that automatically loads and unloads environment variables based on the current directory.

Installation

Via your package manager, e.g. apt install direnv. You also need to add a shell hook, e.g. with Bash:

echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
source ~/.bashrc

Usage

You need to run direnv allow .envrc only from the root of the monorepo. From there on, Direnv will automatically load/unload a number of LYC_PATH* environment variables when you enter/leave the monorepo.