Hacker ApprovedDepartments

direnv

Hacker Approved

The most recommended of 5 dev environment managers

Developers recommend direnv for loading per-project environment variables and tools automatically when entering a directory, especially alongside Nix flakes. One critic reports it slows shells.

Developers recommend direnv for loading per-project environment variables and tools automatically when entering a directory, especially alongside Nix flakes. One critic reports it slows shells.

37 people gave an opinion

recommend it
34
criticize it
3
approval share
92%
Each figure is one person. RecommendsCriticizes

Recommended in 10 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: recommended
  4. February 2026: not recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: not recommended
  10. August 2026: recommended
  11. September 2026: recommended
  12. October 2026: recommended
  13. November 2026: not recommended (month in progress)

Why it carries the badge

  • 34 people recommend itNeeds 10 or more, met.
  • 11 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 10 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Works well with Nix flakes

    “the integration of flakes/devshells and direnv is great to create reproducible development environments”

    Comment from 29 Jun 2026 in “NixOS 26.05 Released”

    “I personally use direnv with nix to have per-project dependency versions installed automatically”

    Comment from 8 Aug 2026 in “The Nixpkgs core team has disbanded”

    “This makes the only system dependencies for a great dev environment nix and direnv.”

    Comment from 29 Jun 2026 in “NixOS 26.05 Released”
  • Loads environment automatically per directory

    “I've been personally relying more on direnv to automatically activate certain shell configurations”

    Comment from 17 Jun 2026 in “Bringing down my ZSH load times from ~3.1s to ~230ms”

    “if you're using long-running shells then direnv can load and unload env vars”

    Comment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

    “direnv is great for switching any envnvariables let given directory.”

    Comment from 28 Nov 2025 in “Installing Java in 2025, and Version Managers”
  • Simple, stable, does one thing well

    “It does everything I want, nothing I don't, and has been stable for me for years.”

    Comment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

    “I show this to people as there's so little friction to using it.”

    Comment from 22 Jan 2026 in “Show HN: Dotenv Mask Editor: No more embarrassing screen leaks of your .env”

    “Direnv is the right way to go if you want a tool for this.”

    Comment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”
  • Keeps secrets out of .envrc

    “Everything that isn't secret just lives in .envrc and gets loaded by direnv”

    Comment from 23 May 2026 in “Ask HN: How do small teams securely share env files?”

    “This solves the problem of plain-text files”

    Comment from 28 Nov 2025 in “GitLab discovers widespread NPM supply chain attack”

    “source_env_if_exists .envrc.local”

    Comment from 23 Sep 2026 in “Two Git ignore files nobody told me about”

Other dev environment managers people recommend

The four most recommended other dev environment managers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

direnv compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
direnvThis page34392%10—Approved
devenv26293%11—Approved
Devbox by Jetify10191%5—Approved
Coasts80100%2——
Flox7370%5——
See all 5 dev environment managers, ranked

What people said

39 of the 40 comments that mention it, newest first. Each links to the original comment.

“I've torched entire weekends trying to get the same workflow out of direnv and pamac/homebrew.”

CriticizesComment from 20 Oct 2026 in “NixOS is making me less afraid”

“Install direnv, enter the project repo, and `direnv allow`”

RecommendsComment from 11 Oct 2026 in “I paid people to try and follow my README”

“it has already fully replaced brew, stow and direnv”

MixedComment from 8 Oct 2026 in “Zerobrew: A faster alternative to Homebrew”

“one can use direnv, nix-direnv and flake.nix”

RecommendsComment from 25 Sep 2026 in “Dutch governments builds alternative for Microsoft based on NixOS”

“source_env_if_exists .envrc.local”

RecommendsComment from 23 Sep 2026 in “Two Git ignore files nobody told me about”

“Incredible combo for development.”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“if you're using long-running shells then direnv can load and unload env vars”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“direnv does one thing really well”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“you actually have real environment variables”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“Direnv is the right way to go if you want a tool for this.”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“It does everything I want, nothing I don't, and has been stable for me for years.”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“Direnv's first stable release was in 2013, .env was 2012 (adopted by Heroku).”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“direnv + nix flakes solved so many problems for me”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“Am I weird or old-fashioned for relying on direnv over .env?”

RecommendsComment from 17 Aug 2026 in “We Are Forking dotenvy into dotenv-ng”

“I personally use direnv with nix to have per-project dependency versions installed automatically”

RecommendsComment from 8 Aug 2026 in “The Nixpkgs core team has disbanded”

“It has none of the problems posited in the OP's article.”

RecommendsComment from 4 Aug 2026 in “Where .env Went Wrong”

“You setup a flake.nix in your code repo along with direnv”

RecommendsComment from 29 Jun 2026 in “NixOS 26.05 Released”

“This makes the only system dependencies for a great dev environment nix and direnv.”

RecommendsComment from 29 Jun 2026 in “NixOS 26.05 Released”

“the integration of flakes/devshells and direnv is great to create reproducible development environments”

RecommendsComment from 29 Jun 2026 in “NixOS 26.05 Released”

“you don't need to build your own lightsaber with direnv and nix”

CriticizesComment from 17 Jun 2026 in “Bringing down my ZSH load times from ~3.1s to ~230ms”

“In my experience direnv is also a source of slowness”

CriticizesComment from 17 Jun 2026 in “Bringing down my ZSH load times from ~3.1s to ~230ms”

“I've been personally relying more on direnv to automatically activate certain shell configurations”

RecommendsComment from 17 Jun 2026 in “Bringing down my ZSH load times from ~3.1s to ~230ms”

“Would pair well with direnv to set the right keys per project.”

RecommendsComment from 30 May 2026 in “MCP Is Dead”

“Everything that isn't secret just lives in .envrc and gets loaded by direnv”

RecommendsComment from 23 May 2026 in “Ask HN: How do small teams securely share env files?”

“that's just N=mod(hash based on the worktree name) and then port=default_port+N”

RecommendsComment from 23 May 2026 in “Open source Kanban desktop app that runs parallel agents on every card”

“you can use tools like direnv to make them available to your shell”

RecommendsComment from 19 May 2026 in “CISA Admin Leaked AWS GovCloud Keys on GitHub”

“integration with direnv to activate it”

RecommendsComment from 19 Apr 2026 in “Binary Dependencies: Identifying the Hidden Packages We All Depend On”

“adding flake.nix+direnv on a per project basis is just magical”

RecommendsComment from 3 Apr 2026 in “Show HN: Home Maker: Declare Your Dev Tools in a Makefile”

“direnv, .envrc, "layout uv"”

RecommendsComment from 19 Mar 2026 in “Astral to Join OpenAI”

“I show this to people as there's so little friction to using it.”

RecommendsComment from 22 Jan 2026 in “Show HN: Dotenv Mask Editor: No more embarrassing screen leaks of your .env”

“it's direnv support is great”

RecommendsComment from 5 Jan 2026 in “I switched from VSCode to Zed”

“I appreciate that Zed works smoothly with Nix and Direnv, even through remote projects.”

RecommendsComment from 5 Jan 2026 in “I switched from VSCode to Zed”

“things like direnv and mise make that disappear”

RecommendsComment from 30 Dec 2025 in “Go Away Python”

“Less overall to think about if you bind the two states together.”

RecommendsComment from 23 Dec 2025 in “Ask HN: Why Did Python Win?”

“Then you can do e.g. use other persons python scripts without modifying their shebang.”

RecommendsComment from 13 Dec 2025 in “Using Python for Scripting”

“in my projects (with direnv)”

RecommendsComment from 1 Dec 2025 in “NixOS 25.11 released”

“This solves the problem of plain-text files”

RecommendsComment from 28 Nov 2025 in “GitLab discovers widespread NPM supply chain attack”

“There's nothing like direnv + nix + a flake with the appropriate dev shell config”

RecommendsComment from 28 Nov 2025 in “Installing Java in 2025, and Version Managers”

“direnv is great for switching any envnvariables let given directory.”

RecommendsComment from 28 Nov 2025 in “Installing Java in 2025, and Version Managers”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.