direnv

Load/unload environment variables based on current directory

brewmacoslinux
Try with needOr install directly
Source

About

Load/unload environment variables based on $PWD

Commands

direnv

Examples

Initialize direnv in your shell (add to shell config)$ eval "$(direnv hook bash)"
Create a .envrc file in a project directory$ echo 'export NODE_ENV=development' > .envrc && direnv allow
View currently loaded environment variables from direnv$ direnv status