SaaSHub helps you find the best software and product alternatives Learn more β
Direnv Alternatives
Similar projects and alternatives to direnv
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
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.
-
-
-
-
-
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.
-
-
-
-
-
-
-
-
-
-
-
nix-direnv
A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]
-
pixi
Powerful system-level package manager for Linux, macOS and Windows written in Rust β building on top of the Conda ecosystem.
-
direnv discussion
direnv reviews and mentions
-
Ask HN: How do small teams securely share env files?
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
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
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
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
β οΈ 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
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
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
Environments : Allows to load your environment variables, by projects (alternative to Direnv)
-
GitLab discovers widespread NPM supply chain attack
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
direnv
-
A note from our sponsor - SaaSHub
www.saashub.com | 9 Jun 2026
Stats
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.