zoxide
A smarter cd that learns the directories you use most.
Load and unload environment variables automatically when you cd into a project.
No votes yet. Tried it? Be the first to say.
One vote per person. No account needed.
direnv runs a project's .envrc when you enter the directory and reverts it when you leave, so each project gets its own env vars, PATH additions and secrets without polluting your shell.
Manually sourcing .env files, exports in ~/.bashrc
Different projects need different credentials, endpoints or tool paths.
Runs a directory's .envrc when you cd in and reverts every change when you leave.
Nothing runs until you direnv allow it, and you must allow again after every edit.
Helpers like dotenv, PATH_add bin, source_up, layout python and use nix.
bash, zsh, fish, tcsh, elvish and more.
Plugins for VS Code, Vim and Emacs so editors see the same environment.
brew install direnv # or apt install direnv
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc # or zsh/fish equivalents# Load variables from .env (kept out of git)
dotenv
# Put the project's local scripts and node_modules/.bin on PATH
PATH_add bin
PATH_add node_modules/.bin
# Project-specific settings
export AWS_PROFILE=myapp-dev
export DATABASE_URL=postgres://localhost/myapp_dev
# Inherit settings from a parent folder's .envrc (useful in monorepos)
source_up_if_existsdirenv allow # approve it once
cd .. # variables unloaded
cd - # variables loaded again.envrc.example and gitignore the real .envrc or .env.layout python creates and activates a virtualenv automatically for Python projects.direnv status shows what's loaded and why..envrc change is safe but occasionally tedious..envrc is bash syntax even if you use fish or zsh interactively..envrc or .env files are plain text; keep them out of git and consider a secrets manager.brew install direnv
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
echo 'export API_URL=http://localhost:3000' > .envrc
direnv allow If you already use mise, it can set per-project variables too.
Load .env inside the app, which works everywhere but only for that process, not your shell.
A similar idea with a simpler, older implementation.
Other tools that share topics with direnv.
A smarter cd that learns the directories you use most.
One tool to pin Node, Python, Go and more per project, plus env vars and tasks.
Searchable shell history with context, and optional encrypted sync between machines.