direnv
CLILoad and unload environment variables depending on the current directory.
Auto-load .env files when entering a project directory
Recipes
Curated from documentation and usage. Percentages are estimates, not measurements.
Allow .envrc in current directory
direnv allow .Create a basic .envrc
echo 'export API_KEY=your_key' > .envrc && direnv allowEdit .envrc
direnv edit .Install
Homebrew
brew install direnvAgent notes
- When to use
- Managing per-project environment variables
Use from an agent
curl -s https://clihub.com/api/tools/direnv | jq '.agentHints.provenRecipes[] | {task, command, verified}'Or call get_tool with slug direnv on the MCP server at https://clihub.com/mcp.