direnv
Loads and unloads shell environment variables based on the current directory.
Tested on Linux
Use it
Linux x86_64
download direnv.linux-amd64 binary from GitHub releases to ~/.local/bin
curl -L -o /tmp/direnv.linux-amd64 https://github.com/direnv/direnv/releases/latest/download/direnv.linux-amd64 && chmod +x /tmp/direnv.linux-amd64 && mkdir -p ~/.local/bin && mv /tmp/direnv.linux-amd64 ~/.local/bin/direnv && ~/.local/bin/direnv --help
Check that it works
direnv --versionThe output should contain “2.38.2”.
First thing to try
mkdir -p /tmp/testdirenv_f1 && cat > /tmp/testdirenv_f1/.envrc <<'EOF'
export FOO=foo
EOF
cat /tmp/testdirenv_f1/.envrc && echo "F1 setup done"cd /tmp/testdirenv_f1 && direnv allow . && direnv export bashWhat it does
- Load and unload environment variables per directoryTested
- Hook into common shells like bash and zshTested
- Prepend paths with PATH_add stdlib functionTested
- Load .env files via dotenvTested
How far pickfit got
Linux x86_64
- Installs
- Starts
- 4 of 4 features work
- Works offline
macOS: the project says it runs there; pickfit hasn’t tried it.
Good for
- Load 12factor apps environment variables
- Create per-project isolated development environments
- Load secrets for deployment
An alternative to autoenv, asdf, shadowenv and mise.
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
Its main function works
- Replayed from scratch
- Works offline
- Checked on 4 Nov 2026
- Version 2.38.2