# allan2/dotenvy

A well-maintained fork of the dotenv crate

Repository: https://github.com/allan2/dotenvy
Canonical: https://ross.abutalabs.com/products/dotenvy
Language: Rust
License: MIT
License Family: permissive
Last push: 2026-08-18T01:50:26+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 8, longevity 100
- inputs: {"age_days": 1647, "days_push": 16, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1245, forks 80 (observed 2026-08-28T04:04:07.025461+00:00)

## What it is
dotenvy is a well-maintained Rust fork of the dotenv crate for loading environment variables from .env files, recommended as the replacement in RUSTSEC-2021-0141. It offers a library API (including a non-environment-modifying loader), compile-time and runtime macros, and a binary that loads an env file before running a command.

## Use cases
- load environment variables from a .env file in a Rust app
- replace the unmaintained dotenv crate flagged by RUSTSEC-2021-0141
- parse env files without mutating process environment
- run a command with variables from an env file
- inspect env variables at compile time in Rust
- support variable substitution in env files

## When to choose
- you are writing a Rust application or service that reads configuration from .env files
- you need a maintained, secure alternative to the dotenv crate
- you want a CLI to preload env files before executing commands
- you need compile-time env inspection via macros

## When to avoid
- your project is not in Rust
- you need full configuration management beyond simple key-value env files (e.g., YAML/TOML configs)
- you rely on the unpublished 0.16 API, which is still subject to change

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, developer-tools, cli
- domain: developer-tools, backend
- platform: rust, cross-platform, cli
- tags: dotenv, env-file, environment-variables, rust-crate, config-loading, command-line

## Member repositories
- allan2/dotenvy (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:07.025461+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-30T05:08:07.775261+00:00, confidence not recorded.
  - readme: https://github.com/allan2/dotenvy (fetched 2026-08-28T04:04:07.025461+00:00, sha c5e5d2206f82)
  - registry_crates: https://crates.io/api/v1/crates/dotenvy (fetched 2026-08-29T12:19:26.052382+00:00, sha f061549f8765)
- Data as of 2026-08-30T08:39:29.467469+00:00.
