{"repo":"direnv/direnv","free":true,"listed":false,"github":"https://github.com/direnv/direnv","clone":"git clone https://github.com/direnv/direnv.git","description":"unclutter your .profile","language":"Go","stars":15371,"topics":["direnv","environment","shell-extension","bash","zsh","tcsh","fish","shell","buildbot-numtide"],"license":"MIT","category":"cli-tools","readme_excerpt":"direnv -- unclutter your .profile ================================= 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. Use cases Load 12factor apps environment variables Create per-project isolated development environments Load secrets for deployment How it works Before each prompt, direnv checks for the existence of a .envrc file (and optionally a .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. 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. Getting Started Prerequisites Unix-like operating system (macOS, Linux, ...) A supported shell (bash, zsh, tcsh, fish, elvish, powershell, murex, nushell) Basic Installation 1. direnv is packaged in most distributions already. See the installation documentation for details. 2. hook direnv into your shell. Now restart your shell. Quick demo To follow along in your shell once direnv is installed. The stdlib Exporting variable","default_branch":null,"files":null,"tree":[],"storefront":"/r/direnv","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/direnv/direnv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}