Direnv Alternatives

Similar projects and alternatives to direnv

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.

Suggest an alternative to 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 2021-11-16.
  • One Environment per Project: Manage Directory-Scoped envs with direnv in POSIX Systems
    1 project | dev.to | 20 Nov 2021
    One of the more common practices in software projects is to keep certain information separated but accessible from the codebase which uses it. This is usually done with secrets such as passwords or private keys, but is also commonly done with user or context-specific info pieces. However, management of environment variables can be confusing. The solutions to deal with it are many, and there are even built-in ones such as bash_profile. One solution I've discovered recently and found particularly convenient is direnv, a shell extension which enables the definition of a list of environment variables scoped by a directory. After installing & hooking the extension, direnv will execute every time you change directories, looking for an .envrc file in the same or in a superior directory tree level. It will then load the defined variables to the current environment, and unload them if it ceases to detect the same .envrc. Also note that direnv will load the first detected .direnv file, which means that the environment will **not* inherit values from a .direnv in a parent directory*.
  • How do you keep tools/toolchain in sync with different cabal/stack projects?
    2 projects | reddit.com/r/haskell | 16 Nov 2021
    I think this can be solved by direnv. You can write and .envrc file in each project and direnv will set up the environment for you automatically for each project. But I'm not aware of any ready script that you can take. Maybe someone else knows better here.
  • Writing a QML Application in Rust (Part 2)
    2 projects | dev.to | 1 Nov 2021
    While this works, it would be preferable not to set RUST_LOG every time for the project. I decided to use direnv to set the RUST_LOG variable for the directory rather than a global variable. The instructions are given below:
  • I'm curious about developer dependencies for library projects
    7 projects | reddit.com/r/golang | 16 Oct 2021
    Use direnv to sandbox each project's binaries, defining a minimum of PATH and GOBIN, should be enough.
  • For the love of everything that is good, tell me how to get rid of/uninstall/disable keychain access completely.
    1 project | reddit.com/r/MacOS | 12 Sep 2021
    For git on the command line, I have several 'identities' local to a few projects, so I typically run the config user.name etc. options per-repo. You could do something like create a new user named something like 'work' and su work at the cli and have a different global git config there, and use something like direnv to automate this
  • Managing issues with the Haskell Stack projects under NixOS
    5 projects | reddit.com/r/NixOS | 28 Aug 2021
    Use direnv: https://direnv.net/ (nix package - you could probably look at nix-direnv) and then use https://github.com/purcell/envrc with emacs, whenever you load a file that's in a project with a .envrc file emacs will get your nix environment for that project (shell.nix)
  • Are there any plugins available to fix exrc not working when you use init.lua?
    3 projects | reddit.com/r/neovim | 25 Aug 2021
    This works, but it's not quite as good as exrc in secure mode. Are there any plugins available to work around this? Something like direnv which calculates a checksum of any .nvimrc.lua files and forces you to approve them would be ideal.
  • What are your favorite packages to use?
    55 projects | reddit.com/r/golang | 15 Aug 2021
    Direnv Very useful for maintaining environments per directory
  • Automatically Set/Unset Environment Variables when Changing Directories
    1 project | reddit.com/r/devops | 15 Aug 2021
    What made you choose dotenv over https://direnv.net/ ?
  • export PATH or run a sript when cd-ing into a dir
    1 project | reddit.com/r/linuxquestions | 28 Jul 2021
  • 6 Command Line Tools for Productive Programmers
    12 projects | dev.to | 27 Jul 2021
    If you live in the terminal, and you want to use your terminal as an IDE, then it's helpful to have your terminal change based on the current directory. There are many ways to do this. DirEnv loads and unloads .env files as you enter directories. smartcd is similar. It lets you run a shell script whenever you change to a certain path -- you can start and stop services, change the prompt, or anything else you want.
  • Issues with setting up HLS + Vim
    3 projects | reddit.com/r/haskellquestions | 25 Jul 2021
    If you need different GHC versions of HLS for different projects (as I often encounter), you can either use Nix or simply direnv to dynamically link the binary to the correct version of HLS.
  • Best Plugin to Autosource Python Virtualenv When Entering Directory?
    6 projects | reddit.com/r/zsh | 17 Jul 2021
    Take a look at direnv.
  • niv, naersk, napalm: moving on
    7 projects | reddit.com/r/NixOS | 9 Jul 2021
    lorri integrates with direnv. When you enter a directory with a Nix shell and lorri+direnv enabled, direnv automatically changes the environment to the one declared by (for example) shell.nix. lorri builds this environment in the background; without this, it sometimes takes a while before the environment is changed. Nix Flakes can also be configured to integrate with direnv, and because the caching is better with Flakes than it was before, I personally don’t find it necessary to use lorri when using Flakes.
    7 projects | reddit.com/r/NixOS | 9 Jul 2021
    Not specifically, but nix-direnv is a way to use direnv with Nix. direnv also has a built-in way to use Nix (just create a file called .envrc with the line use nix). lorri is another option. Another still is use flake which is described on the Nix Wiki page on Flakes (and may also be built-in now, but I’m not sure). And there are even more similar projects; the direnv wiki has a list of them.


Basic direnv repo stats
about 16 hours ago

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote Go jobs at our new job board 99remotejobs.com. There are 8 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.