direnv is an extension for your shell. It augments existing shells with a new feature that can load and unload environment variables depending on the current directory. Before each prompt, direnv checks for the existence of a .envrc or .env 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. If both .envrc and .env files exists, the .envrc will always be chosen first. It supports hooks for all the common shells like bash, zsh, tcsh and fish. This allows project-specific environment variables without cluttering the ~/.profile file. 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.

Features

  • Load 12factor apps environment variables
  • Create per-project isolated development environments
  • Load secrets for deployment
  • It supports hooks for all the common shells
  • Requires Unix-like operating system (macOS, Linux, …)
  • Requires a supported shell (bash, zsh, tcsh, fish, elvish)

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow direnv

direnv Web Site

Other Useful Business Software
PRTG Catches Network Issues Before They Cause Downtime Icon
PRTG Catches Network Issues Before They Cause Downtime

Threshold-based alerts flag problems early, so your team can act before users notice, not after.

Reactive troubleshooting usually means hearing about a problem from frustrated users, not your monitoring tool. PRTG sets threshold-based alerts across devices, servers and applications, notifying your team by email, SMS or push the moment a metric crosses a set limit. That means catching a failing disk or overloaded server before it becomes an outage and getting time back from firefighting. Start a free trial and set your first alerts today.
Download 30-Day Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of direnv!

Additional Project Details

Operating Systems

Linux, Mac

Programming Language

Go

Related Categories

Go Software Development Software

Registered

2022-04-11