← Back to tools

direnv

Load and unload environment variables depending on the current directory

System & Monitoring linuxmacoswindows Go MIT

Description

direnv loads and unloads environment variables depending on the current directory. It supports .envrc files that are automatically sourced when you enter a directory and cleaned up when you leave.

AI Summary

Automatically load and unload environment variables based on the current directory

Capabilities

  • + Auto-load .envrc files when entering directories
  • + Auto-unload variables when leaving directories
  • + Support for multiple shells
  • + Nix integration
  • + Security model with directory allowlisting

Use When

  • When you need per-project environment variables
  • When you want automatic environment setup per directory

Avoid When

  • x When you prefer manual environment management

Related Tools

View AGENTS.md for direnv