# motdotla/dotenv

Loads environment variables from .env for nodejs projects.

Repository: https://github.com/motdotla/dotenv
Canonical: https://ross.abutalabs.com/products/dotenv
Homepage: https://www.dotenv.org
Language: JavaScript
License: BSD-2-Clause
License Family: permissive
Topics: dotenv, environment-variables, javascript, node, nodejs, secrets, secret-management, secret-manager, security-tools, configuration-file, env
Last push: 2026-08-04T12:48:39+00:00

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

## Adoption (not part of the score)
Stars 20525, forks 960 (observed 2026-08-28T04:11:30.166717+00:00)

## What it is
A zero-dependency Node.js module that loads environment variables from a .env file into process.env, following the Twelve-Factor App configuration methodology. It is the de facto standard for .env file handling in the JavaScript ecosystem.

## Use cases
- load environment variables from a .env file in node
- manage app secrets and config outside of source code
- store api keys in a config file for a javascript project
- configure environment-specific settings for nodejs apps
- keep database credentials out of my git repository
- set up twelve-factor app configuration in node

## When to choose
- you need the standard, battle-tested way to load .env files in Node.js
- you want a zero-dependency, lightweight config loader
- you follow twelve-factor configuration practices in JavaScript projects

## When to avoid
- you need encrypted .env files - use dotenvx instead
- your runtime natively supports .env loading (e.g. recent Node.js --env-file or Bun)
- you are not working in a JavaScript/Node.js ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, secrets-management, developer-tools
- domain: developer-tools, backend, security
- platform: bun, cross-platform
- tags: dotenv, env-files, twelve-factor, zero-dependency, npm, nodejs, deno

## Member repositories
- motdotla/dotenv (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:30.166717+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-29T16:58:47.015478+00:00, confidence not recorded.
  - readme: https://github.com/motdotla/dotenv (fetched 2026-08-28T04:11:30.166717+00:00, sha 826eb29c73a5)
  - homepage: https://www.dotenv.org (fetched 2026-08-29T07:57:46.140540+00:00, sha 1f0c11aa15dd)
  - registry_npm: https://registry.npmjs.org/dotenv (fetched 2026-08-29T07:57:46.149710+00:00, sha ab9291bd56f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
