direnv Jonas Chevalier
Use this command to install direnv:
winget install --id=direnv.direnv -e
An extension for to augment existing shells with a new feature that can load and unload environment variables depending on the current directory.
direnv is a shell extension designed to manage project-specific environment variables efficiently. It allows developers to load and unload these variables based on the current directory, ensuring that only relevant settings are active without cluttering global profiles.
Key Features:
- Directory-Based Environment Management: Automatically loads or unloads environment variables when switching directories, using .envrc files for configuration.
- Secure Configuration: Ensures secure execution of .envrc files through authorization checks, preventing unauthorized access.
- Multi-Shell Support: Compatible with various shells including bash, zsh, fish, and others, making it versatile across different environments.
- Lightning-Fast Execution: As a single, static executable, direnv operates quickly, minimizing impact on shell performance.
- Utility Functions via Stdlib: Offers a library of functions to simplify tasks like PATH management, reducing repetitive configuration work.
Audience & Benefit: Ideal for developers working on projects with specific environment requirements, direnv enables isolated development environments. This isolation prevents conflicts between project settings and keeps the global profile clean, enhancing productivity and security.