awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
direnv avatar

direnv/direnv

0
View on GitHub↗
direnv.net↗

Direnv

direnv is a shell environment manager and directory-based environment loader that automatically loads and unloads environment variables when switching between directories. It functions as a shell hook automation tool, injecting logic into the shell configuration to trigger environment updates based on the current project context.

The project acts as a development environment isolator by localizing shell configurations, which prevents dependency conflicts and removes project-specific exports from global profile files. It includes specialized integration for Nix, allowing the loading of environment variables from Nix shell or flake specifications directly into the session.

Its broader capabilities cover language runtime management, including the automatic switching of versions and the use of predefined layout templates. It also provides security controls such as configuration file authorization and directory hierarchy trust to manage the execution of untrusted code. Additional utility surface includes remote script fetching with integrity verification and integration with various package managers.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Features

  • Environment Variable Loaders - Automatically loads environment variables from external files when switching directories.
  • Shell Environment Managers - Automatically manages terminal sessions by injecting and removing environment variables and system paths based on the current directory.
  • Shell Hook Integrations - Injects hooks into the shell prompt or directory change events to trigger environment updates automatically.
  • Context-Aware Environment Managers - Automatically switches runtime configurations and variables based on the current working directory.
  • Directory-Based Variable Synchronizers - Automatically loads and unloads shell variables when switching directories to ensure a consistent project runtime.
  • Path Variable Resolvers - Resolves relative paths and variable references into absolute values based on the project root directory.
  • Environment Loaders - Provides a system for loading environment variables from local files into the process environment upon directory entry.
  • Directory-Triggered Variable Loading - Loads and unloads environment variables automatically upon entering or leaving a directory using local configuration files.
  • Subshell Environment Isolation - Runs configuration scripts in a separate process to capture environment changes without polluting the primary shell state.
  • Project Workflow Automation - Automatically loads and unloads shell variables and paths when switching between different project directories.
  • Environment State Patching - Calculates the precise difference between current and target environments to export only necessary shell changes.
  • Language Runtime Administration - Automatically switches active language versions and virtual environments based on the current working directory.
  • Local Project - Creates distinct shell configurations for different projects to prevent environment clutter and dependency conflicts.
  • Project-Specific Shell Isolation - Prevents dependency conflicts by creating distinct shell configurations and local binary paths for separate projects.
  • Shell Configuration Isolators - Keeps project dependencies and language runtimes separate by localizing shell configurations.
  • Recursive Directory Traversers - Searches upward through the directory hierarchy from the current working directory to locate configuration files.
  • Context-Isolated - Runs a specific command within a target directory's context without permanently altering the current shell state.
  • Dependency Isolation Tools - Isolates language-specific libraries and binaries by storing them within local project folders.
  • Language Runtimes - Configures language-specific virtual environments, project paths, and binaries for various runtimes.
  • Environment Variable Enforcement - Validates the presence of required environment variables and enforces execution rules.
  • Environment Difference Export - Generates a list of environment variable changes based on a directory configuration for specific shell formats.
  • Environment Variable Management - Expands variable references within environment files to allow dynamic value assignment.
  • Local Profile Managers - Directs Nix package installations to project-specific directories and adds them to the shell path.
  • Nix Shell Integrations - Loads variables and packages from Nix flakes or shell specifications directly into the current shell session.
  • Package Management Integrations - Loads build environments and variables from external package managers based on local configuration.
  • Path Managers - Manages the system search path by adding or removing directories while preserving order.
  • Remote Script Verifiers - Downloads remote scripts and verifies their integrity via hash before loading them into the session.
  • Shell Workflow Optimizers - Reduces shell configuration clutter by moving project-specific exports out of global profile files.
  • File Change Detection - Tracks specific files for modifications and triggers an automatic environment reload when changes are detected.
  • Environment Layouts - Uses predefined layouts to automatically configure the environment for various languages and tools.
  • Configuration File Authorization - Allows users to explicitly authorize or revoke permission for specific environment files to prevent untrusted code execution.
  • Execution Authorization Policies - Maintains an allow-list of authorized files to ensure untrusted code is not executed during environment loading.
  • Script Execution Authorizations - Implements a security model that requires explicit user authorization before executing environment scripts in a directory.
  • Directory Trust Markers - Enables marking specific folders as trusted to automatically evaluate all environment scripts within that hierarchy.
  • Nix Integrations - Integrates with Nix flakes and shell specifications to load project-specific environment variables automatically.
  • Path Resolution Utilities - Calculates absolute paths relative to a directory or searches upward through the folder tree.
  • Command Line Shell Enhancements - Unclutter your shell profile environment variables.
  • Shell Integrations - Manages environment variables per directory.
  • Terminal Productivity - Environment switcher for shell directories.
15,189 stars·794 forks·Go·MIT·28 views

Star history

Star history chart for direnv/direnvStar history chart for direnv/direnv

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

Frequently asked questions

What does direnv/direnv do?

direnv is a shell environment manager and directory-based environment loader that automatically loads and unloads environment variables when switching between directories. It functions as a shell hook automation tool, injecting logic into the shell configuration to trigger environment updates based on the current project context.

What are the main features of direnv/direnv?

The main features of direnv/direnv are: Environment Variable Loaders, Shell Environment Managers, Shell Hook Integrations, Context-Aware Environment Managers, Directory-Based Variable Synchronizers, Path Variable Resolvers, Environment Loaders, Directory-Triggered Variable Loading.

Which projects share features with direnv/direnv?

Projects with overlapping indexed features include: hyperupcall/autoenv — autoenv is a directory-based environment manager and shell workflow automator that automatically loads and unloads… sorin-ionescu/prezto — Prezto is a Zsh configuration framework and shell environment manager designed to organize environment variables,… jdx/mise — Mise is a development environment orchestrator that manages software runtimes, environment variables, and task… moonrepo/moon — Moon is a monorepo build system and task runner designed to orchestrate complex projects with multiple packages. It… conda/conda — Conda is a binary package manager, cross-platform environment manager, and dependency resolution engine. It serves as… cachix/devenv — Devenv is a Nix-based development environment manager that provides declarative definitions for reproducible shells…

Projects sharing features with Direnv

These projects share indexed features with Direnv. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • hyperupcall/autoenvhyperupcall avatar

    hyperupcall/autoenv

    6,034View on GitHub↗

    autoenv is a directory-based environment manager and shell workflow automator that automatically loads and unloads environment variables and scripts based on the current working directory. It functions as a hierarchical variable loader, applying configuration settings according to the directory hierarchy to isolate project environments. The utility includes a checksum-based script validator that ensures security by requiring user approval before sourcing detected files. Once a file is authorized, the system remembers the trust setting by verifying file hashes, prompting the user again only if

    Shell
    View on GitHub↗6,034
  • sorin-ionescu/preztosorin-ionescu avatar

    sorin-ionescu/prezto

    14,552View on GitHub↗

    Prezto is a Zsh configuration framework and shell environment manager designed to organize environment variables, aliases, and startup scripts through a modular file structure. It functions as a plugin collection and prompt theme engine, utilizing Zsh-native scripting to manage shell behavior across different platforms. The framework distinguishes itself through a modular-based configuration and submodule-driven extensions, allowing users to load discrete functional modules and update core components via Git. It features a dedicated prompt engine that integrates repository metadata and system

    Shell
    View on GitHub↗14,552
  • jdx/misejdx avatar

    jdx/mise

    29,929View on GitHub↗

    Mise is a development environment orchestrator that manages software runtimes, environment variables, and task execution. It functions as a version manager and task runner, providing a unified interface to synchronize project-specific configurations and dependencies across different machines. By automating the installation and switching of tools, it ensures that development environments remain consistent and reproducible. The project distinguishes itself through a hierarchical configuration system that automatically discovers settings by traversing the directory tree. It uses shim-based comma

    Rust
    View on GitHub↗29,929
  • moonrepo/moonmoonrepo avatar

    moonrepo/moon

    3,687View on GitHub↗

    Moon is a monorepo build system and task runner designed to orchestrate complex projects with multiple packages. It functions as a dependency graph orchestrator that executes build targets in topological order and utilizes input hashing to cache results and skip redundant work. The project features a polyglot toolchain manager that automates the installation and versioning of language runtimes and CLI tools to ensure environment consistency. It also includes a plugin framework based on WebAssembly, allowing developers to extend build logic and toolchain behavior using any supported language.

    Rustbuild-systembuild-toolbun
    View on GitHub↗3,687
Compare all 30 related projects→