<name>.env
files..envrc
file.bash
cargo install rs-env
<name>.env
and must be prefixed with export
command
(see examples)# rsenv: <name.env>
or via rsenv link <root.env> <child1>.env <child2>.env
.That's it. Now you can source the resulting set of variables as usual:
bash
source <(rsenv build <leaf-node.env>)
```bash Hierarchical environment variable management
Usage: rsenv [OPTIONS] [NAME] [COMMAND]
Commands: build Build the resulting set of environment variables (evaluate branch) envrc Write the resulting set of variables to .envrc (requires direnv) files Show all files involved in branch, forming the resulting variable set edit Edit the FZF selected branch select FZF based selection of environment and update of .envrc file (requires direnv) link Link files into a dependency branch/tree branches Show all branches (linear representation) tree Show all trees (hierarchical representation) tree-edit Edit branches of all trees side-by-side (vim required in path) help Print this message or the help of the given subcommand(s)
Arguments: [NAME] Optional name to operate on
Options:
-d, --debug... Turn debugging information on
--generate
-h, --help Print help
-V, --version Print version
```
direnv activates environments automatically.
- rs-env can update the .envrc
file with the selected dependency graph variables.
Life injection of environment variables:
- Plugin EnvFile can be used to life-inject environment variables.
- Use the script runenv.sh
as the "EnvFile" script (tick executable checkbox !).
- The environment variable RUN_ENV
parametrizes which environment to load.
- It will look for a file <RUN_ENV>.env
in the specified directory.
rsenv select
: run debug target and check rsenv .envrc file.