direnv

unclutter your .profile (by direnv)

Direnv Alternatives

Similar projects and alternatives to direnv

  1. nixpkgs

    Nix Packages collection & NixOS

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. ohmyzsh

    626 direnv VS ohmyzsh

    πŸ™ƒ A delightful community-driven (with 2,500+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

  4. fzf

    451 direnv VS fzf

    :cherry_blossom: A command-line fuzzy finder

  5. nix

    430 direnv VS nix

    Nix, the purely functional package manager

  6. Poetry

    417 direnv VS Poetry

    Python packaging and dependency management made easy

  7. asdf

    390 direnv VS asdf

    Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

  8. Git

    329 direnv VS Git

    Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.

  9. starship

    329 direnv VS starship

    β˜„πŸŒŒοΈ The minimal, blazing-fast, and infinitely customizable prompt for any shell!

  10. pyenv

    284 direnv VS pyenv

    Simple Python version management

  11. tmux

    252 direnv VS tmux

    tmux source code

  12. just

    225 direnv VS just

    πŸ€– Just a command runner

  13. Home Manager using Nix

    Manage a user environment using Nix [maintainer=@khaneliman, @rycee]

  14. mise

    143 direnv VS mise

    dev tools, env vars, task runner

  15. codex

    131 direnv VS codex

    Lightweight coding agent that runs in your terminal

  16. devenv

    109 direnv VS devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments using Nix

  17. chi

    116 direnv VS chi

    lightweight, idiomatic and composable router for building Go HTTP services

  18. pyenv-virtualenv

    a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)

  19. nix-direnv

    29 direnv VS nix-direnv

    A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]

  20. pixi

    21 direnv VS pixi

    Powerful system-level package manager for Linux, macOS and Windows written in Rust – building on top of the Conda ecosystem.

  21. envrc

    19 direnv VS envrc

    Emacs support for direnv which operates buffer-locally

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better direnv alternative or higher similarity.

direnv discussion

Log in or Post with

direnv reviews and mentions

Posts with mentions or reviews of direnv. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2026-05-23.
  • Ask HN: How do small teams securely share env files?
    2 projects | news.ycombinator.com | 23 May 2026
    IMO env files are a bit of an anti-pattern, env vars should be set outside the context of your app so that your app doesn't need to care where they come from, it just uses standard env var APIs to read them.

    With that said, the problem still exists just one layer higher. If they are secrets, I use Infisical (https://infisical.com/) which is free and self-hostable, and let's you inject secrets at runtime via their CLI. Very handy for small teams.

    On top of that, I use direnv (https://direnv.net/) with a hook to infisical's export command. This means when I 'cd' into a project, infisical runs and injects the secrets for my developer environment.

    Everything that isn't secret just lives in .envrc and gets loaded by direnv, and you can just send those files however you want because they aren't sensitive.

  • Multiple Claude Code Accounts, One Terminal
    1 project | dev.to | 9 May 2026
    This works because direnv checks the current directory and parent directories for an authorized .envrc, then loads and unloads those variables as you move around your filesystem.
  • 7 Free Tools for Managing Secrets and Environment Variables in Web Projects
    7 projects | dev.to | 5 May 2026
    direnv is a shell extension that automatically loads and unloads environment variables when you enter or leave a directory. Instead of manually sourcing a .env file at the start of each terminal session, you drop a .envrc file in the project root and direnv picks it up whenever you navigate into that directory.
  • Reproducible Dev Environments with Nix and direnv
    5 projects | dev.to | 9 Apr 2026
    Nix solves the first problem. It's a package manager that can install any version of any package side-by-side without conflicts. direnv solves the second β€” it automatically activates environment variables and tools when you enter a directory.
  • Agentic workflows with Aerie
    6 projects | dev.to | 7 Apr 2026
    ⚠️ warning While it is common practice to use system/account-wide environment variables, there are security concerns stemming from this. One alternative is to use direnv to limit its scope by directory. However, this requires API key to be stored as plain text.
  • Migrating from asdf and direnv to mise
    9 projects | dev.to | 29 Mar 2026
    For managing versions of development tools like Ruby and Node.js, I had gone through *env tools like rbenv and nodenv, then switched to asdf in 2019. For environment variable management, I had been using direnv since even earlierβ€”2014.
  • Show HN: enveil – hide your .env secrets from prAIng eyes
    13 projects | news.ycombinator.com | 23 Feb 2026
    FWIW, I looked into it myself too, and found e.g. this direnv setup:

    https://github.com/direnv/direnv/wiki/Sops

  • Mise : The Ultimate Dev Tool Manager for Seamless Workflows
    4 projects | dev.to | 26 Jan 2026
    Environments : Allows to load your environment variables, by projects (alternative to Direnv)
  • GitLab discovers widespread NPM supply chain attack
    8 projects | news.ycombinator.com | 28 Nov 2025
    The way I solve the plain text problem is through a combination of direnv[1] and pass[2].

    For a given project, I have a `./creds` directory which is managed with pass and it contains all the access tokens and api keys that are relevant for that project, one per file, for example, `./creds/cloudflare/api_token`. Pass encrypts all these files via gpg, for which I use a key stored on a Yubikey.

    Next to the `./creds` directory, I have an `.envrc` which includes some lines that read the encrypted files and store their values in environment variables, like so: `export CLOUDFLARE_API_TOKEN=$(pass creds/cloudflare/api_token)`.

    Every time that I `cd` into that project's directory, direnv reads and executes that file (just once) and all these are stored as environment variables, but only for that terminal/session.

    This solves the problem of plain-text files, but of course the values remain in ENV and something malicious could look for some well known variable names to extract from there. Personally I try to install things in a new termux tab every time which is less than ideal.

    I'd like to see if and how other people solve this problem

    [1]: https://direnv.net/

  • Load secrets automatically with 1password and direnv
    1 project | dev.to | 24 Oct 2025
    direnv
  • A note from our sponsor - SaaSHub
    www.saashub.com | 9 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more β†’

Stats

Basic direnv repo stats
197
15,158
7.8
2 months ago

direnv/direnv is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of direnv is Go.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that Go is
the 4th most popular programming language
based on number of references?