# nix-community/nix-direnv

A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]

Repository: https://github.com/nix-community/nix-direnv
Canonical: https://ross.abutalabs.com/products/nix-direnv
Language: Shell
License: MIT
License Family: permissive
Topics: hacktoberfest, managed-by-renovate
Last push: 2026-08-26T13:55:13+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 71, longevity 100
- inputs: {"age_days": 2532, "days_push": 7, "days_rel": 36, "gap_med": 169, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2762, forks 146 (observed 2026-08-28T04:07:18.513862+00:00)

## What it is
A fast, persistent implementation of direnv's use_nix and use_flake functions for Nix-based development environments. It caches nix-shell environments and protects build dependencies from garbage collection, replacing direnv's slower built-in implementation.

## Use cases
- speed up direnv with nix-shell environments
- keep nix build dependencies from being garbage collected
- set up automatic per-project nix flake environments
- load nix development shell when entering a project directory
- work offline with cached nix-shell environments
- replace lorri with a simpler direnv integration

## When to choose
- you use direnv with Nix and want faster environment loading
- you want persistent nix-shell caches that survive garbage collection
- you need use_flake support in direnv without a background daemon

## When to avoid
- you don't use the Nix package manager
- you need a direnv replacement rather than an enhancement
- your system only has bash 3.2 and you cannot install a newer bash

## Facets
- artifact type: plugin
- maturity: active
- function: developer-tools, configuration-management, caching, cli
- domain: developer-tools
- platform: cli
- tags: nix, direnv, shell-environment, reproducible-environments, nix-flakes, development-environment, command-line, devops, linux, macos

## Member repositories
- nix-community/nix-direnv (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:18.513862+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:18:42.748908+00:00, confidence not recorded.
  - readme: https://github.com/nix-community/nix-direnv (fetched 2026-08-28T04:07:18.513862+00:00, sha bebb34240710)
- Data as of 2026-08-30T08:39:29.467469+00:00.
