direnv
brew install direnv
Add to ~/.zshrc:
eval "$(direnv hook zsh)"
In directory with .envrc:
direnv allow
This will record a hash of the content of .envrc, and load the file every time cd to this directory, as long as the hash matches.
Emacs Intergration
(use-package envrc
:enaure t
:config (envrc-global-mode))