# dotenv: 6.8 out of 10

Reasonable, with limits. 5th of 9 in [Config and environment variables](https://elestia.ai/opensource/config/index.md).

dotenv is the long-standing, zero-dependency loader that reads a .env file into process.env. It is stable, safe and used everywhere, but it only loads values and does not check them. Node's built-in --env-file and process.loadEnvFile() now cover the basic case, and two major versions in about 15 months, including a period of default promotional log lines, have cost it some goodwill.

**Best for:** Node projects that need a small, proven .env loader with expansion-friendly parsing, on runtimes or tools where Node's built-in --env-file is not an option.

## Scores

- **Overall: 6.8** (likely 5.7 to 7.9)
  - Claude Opus 5.5 (6.5): It is a safe, proven loader that will not hurt a project, but for new work it is rarely the best pick. Node's native --env-file or the framework's own loader covers basic loading, and a validator such as T3 Env or envalid is needed to check values anyway. Recent churn in defaults and major versions also lowers it a little.
  - GPT-6.2 Sol (7.1): Dotenv is a strong pick when a project benefits from its file precedence, override rules, or consistent parsing across Node versions. For basic loading on modern Node, the built-in loader usually suffices. For startup validation, envalid or T3 Env covers more of the job. Active releases and downstream support keep dotenv viable, while slower relative growth limits confidence in it as a default for new projects.
- **Needed by many: 6.9** (likely 5.8 to 8.0)
  - Claude Opus 5.5 (7.5): Most Node backends and scripts need to load settings from a .env file during development, so the job is very common. Built-in loading in Node, Bun, Deno and the frontend frameworks makes the need for this package smaller than the need for the job. It also covers only loading, not the checking half of the category.
  - GPT-6.2 Sol (6.3): Loading settings from files is common in Node.js apps, scripts, and command-line tools. The package covers file loading and parsing, and many projects already get that from their runtime or framework. The developer survey measures runtime use, so demand for a separate loader is an estimate.
- **Helps a lot: 6.6** (likely 5.5 to 7.6)
  - Claude Opus 5.5 (6.0): It does one thing well. The parser is mature, handles multiline values and comments, ships types and has an opt-in fast parser in v18. But it returns raw strings with no validation, coercion or schema, and Node's built-in loader now matches it for the basic case. Peers such as T3 Env, envalid and Varlock do the full job of loading plus checking.
  - GPT-6.2 Sol (7.1): Version 18.0.10 handles multiline values, multiple files, and explicit overrides through a small typed API and CLI. The short examples make basic setup straightforward for developers and coding agents, though callers using `config()` must check its returned file errors. Envalid covers validation and coercion, and dotenvx covers expansion and encryption. The opt-in fast parser has received compatibility fixes, and independent performance evidence for this version is thin.
- **Holds up over time: 6.9** (likely 5.5 to 8.0)
  - Claude Opus 5.5 (7.0): The project is active: 289 commits and 17 npm versions last year, an empty issue queue and a patch release on 2026-11-09. It rests mostly on one maintainer, whose company sells dotenvx as the successor. The recent major versions changed defaults and removed features, and native Node loading pulls new projects away from it.
  - GPT-6.2 Sol (6.8): The project had 289 commits and 17 npm publishes in the past year, with a bundler regression fixed in the latest patch. It has public sponsors, and the depth of release ownership remains uncertain. A v17 user reported rolling back over startup logging, and v18 removed vault support. Node’s built-in loader and Vite’s use of it make future demand harder to predict.
- **Used widely: 8.6** (likely 7.5 to 9.4)
  - Claude Opus 5.5 (9.0): It had over 1 billion downloads in four weeks and 1.23M dependent repos, by far the most direct use in the category. Much of the download count is transitive, through frameworks and tools. Its year-over-year ratio of about 3.6 is below the 4.1 median, so it is slowly losing share as native loading and newer tools spread.
  - GPT-6.2 Sol (8.2): Ecosyste.ms found 1.23 million dependent repositories and 42,583 dependent npm packages. That is broad adoption, with some demand inherited from tools that install dotenv for their users. Downloads rose 3.61 times year over year, below the catalog median of 4.1 and behind dotenvx, T3 Env, c12, and Varlock. The direct share is hard to isolate, and four Bluesky links offer little evidence of fresh demand.
- **Vouched for: 7.6** (likely 6.5 to 8.7)
  - Claude Opus 5.5 (7.5): Major tools have long built on dotenv or its format, and independent guides treat it as the baseline loader. Current write-ups more often recommend Node's native loader plus a validator, and the default-tips episode drew clear negative user feedback. There is little survey data specific to it.
  - GPT-6.2 Sol (7.7): Prisma ORM 7 recommends dotenv and generates a config that imports it. NestJS uses it as its default parser and documents where Node’s built-in parser behaves differently. These integrations support confidence in file loading, with limited evidence on satisfaction and performance for the current major version.
- **Safe: 7.5** (likely 6.3 to 8.6)
  - Claude Opus 5.5 (7.5): It has zero runtime dependencies, no advisories ever and a permissive BSD-2-Clause licence. The OpenSSF Scorecard is weak at 4.8, with no branch protection, no pinned dependencies, no SAST and limited code review. Publishing appears to rest with very few people.
  - GPT-6.2 Sol (7.4): The package has zero runtime dependencies, a permissive BSD-2-Clause license, and zero advisories in the collected OSV record. Its OpenSSF Scorecard is 4.8, with zero scores for branch protection, token permissions, and dependency pinning. The source shows release tests and an npm packaging dry run, and a recent listing reports three maintainers. Current publisher permissions and release provenance remain unverified.

## Good

- It has zero dependencies, a tiny surface and no advisories on record.
- Its .env parsing format is the de facto standard that most other tools copy or build on.
- It works in any Node setup, with config(), a CLI in v18, and environment variable switches.
- It is well understood by AI coding agents and has a huge body of examples.

## Bad

- It does no validation or typing, so a separate tool such as T3 Env or envalid is still needed to check settings.
- Node 20.6+ and most frameworks (Vite, Next.js, Bun, Deno) already load .env files natively, which removes the need for it in many new projects.
- v17 printed a log line with product tips by default until v18 removed them, which annoyed users who only had it as a transitive dependency.
- v18 removed .env.vault and moved users from the -r dotenv/config preload to a CLI, the second major version in about 15 months.

## The numbers

- Downloads, 4 weeks: 1.1B
- In a year: ×3.6
- GitHub stars: 21k
- Commits, 12 months: 289
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: BSD-2-Clause
- GitHub: https://github.com/motdotla/dotenv
- npm: https://www.npmjs.com/package/dotenv

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
