direnv

Shell extension that loads and unloads environment variables per directory from .envrc files.

HN commenters like it for loading a simple per-project .envrc into the shell12 and for pulling secrets from stores like pass, Vault or Infisical instead of keeping them in plain text.345 No complaints about direnv itself appear in these mentions;6 it suits developers who pair it with Nix, asdf or mise to keep project environments consistent.789
The HN verdict, written from 9 cited comments
5recommend
0warn against
Nov 28, 2025first mention
Oct 9, 2026latest mention
Nov 25 – Oct 26
Used forfor secrets managementfor Nix usersfor teamsfor zsh usersenvironment and credential loadingloading environment config

Why people recommend it

Secrets loading · 3

Commenters use .envrc to fetch secrets at load time from pass, Infisical or Vault rather than storing them in plain text.

“The way I solve the plain text problem is through a combination of direnv[1] and pass[2].”

Show 1 more

“I use direnv (https://direnv.net/) with a hook to infisical's export command.”

Nix integration · 2

Commenters use it with Nix flakes in projects, and one notes that Zed works smoothly with Nix and direnv.

“in my projects (with direnv)”

“I appreciate that Zed works smoothly with Nix and Direnv”

Simple .envrc · 1

One commenter values that it assumes nothing beyond loading a plain .envrc into the shell.

“This is why I love direnv (the tool) and just a simple .envrc (not .env).”

Team version pinning · 1

One team pairs it with asdf so everyone runs the same tool versions.

“We use direnv with asdf to ensure everyone is in the same version now.”

Caveats and dissent

No one in these comments warned against it.

Often compared with

All comments 10

“I use a lot of direnv / mise.”

“This is why I love direnv (the tool) and just a simple .envrc (not .env).”

“I looked at mise to replace direnv in the few places I use it”

“We use direnv with asdf to ensure everyone is in the same version now.”

“I use direnv (https://direnv.net/) with a hook to infisical's export command.”

“I appreciate that Zed works smoothly with Nix and Direnv”

“in my projects (with direnv)”

“The way I solve the plain text problem is through a combination of direnv[1] and pass[2].”

Threads where it came up

Data: direnv.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.

Keyboard shortcuts
j / kNext / previous item
o or EnterOpen selected item
/Search
g hHome
g tTop
g rRising
g cCategories
tToggle dark mode
?This help