Install latest/stable of direnv

Ubuntu 16.04 or later?

Make sure snap support is enabled in your Desktop store.


Install using the command line

sudo snap install direnv

Don't have snapd? Get set up for snaps.

Channel Version Published

direnv -- Unclutter your .profile

direnv is an environment switcher for the shell. It knows how to hook into bash, zsh, tcsh, fish shell and elvish to load or unload environment variables depending on the current directory. This allows project-specific environment variables without cluttering the ~/.profile file.

Before each prompt, direnv checks for the existence of a ".envrc" file in the current and parent directories. If the file exists (and is authorized), it is loaded into a bash sub-shell and all exported variables are then captured by direnv and then made available to the current shell.

Because direnv is compiled into a single static executable, it is fast enough to be unnoticeable on each prompt. It is also language-agnostic and can be used to build solutions similar to rbenv, pyenv and phpenv.

Details for direnv

License
  • MIT

Last updated
  • 31 May 2019 - latest/stable
  • 31 May 2019 - latest/edge

Websites

Contact

Share this snap

Generate an embeddable card to be shared on external websites.


Install direnv on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.


Where people are using direnv

Users by distribution (log)

Ubuntu 22.04
Ubuntu 20.04
Ubuntu 18.04
Ubuntu 23.10
CentOS 7
rhel 8.9
Manjaro
pop 22.04

Is there a problem with direnv? Report this app