direnv
« Back to VersTracker
Description:
Load/unload environment variables based on $PWD
Type: Formula  |  Latest Version: 2.37.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  @direnv  |  formulae.brew.sh
Category: Developer tools
Tags: environment shell development automation productivity
Install: brew install direnv
About:
direnv is a shell extension that loads and unloads environment variables depending on your current working directory. It allows you to create per-project environment profiles without complex setup scripts. This improves developer workflow by automatically switching tools, credentials, and paths as you navigate between projects.
Key Features:
  • Automatic environment loading on directory change
  • Supports bash, zsh, fish, and tcsh
  • Simple .envrc file configuration
  • Secure by design (explicit allow required)
  • Lightweight with no background processes
Use Cases:
  • Managing different Python/Node versions per project
  • Setting API keys and credentials per repository
  • Switching database configurations between dev/staging/prod
  • Defining project-specific PATH variables
Alternatives:
  • autoenv – Simpler but less secure and feature-rich
  • asdf – Focuses on version management, broader scope than env vars
  • virtualenv – Python-specific, doesn't handle general environment variables
License: MIT
Dependencies: bash
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 15, 2025 3:43am 0 VERSION_BUMP 2c812d9d
Sep 13, 2025 7:03pm 0 VERSION_BUMP cf565317