# dotenvx: 7.0 out of 10

A strong pick. 3rd of 9 in [Config and environment variables](https://elestia.ai/opensource/config/index.md).

dotenvx is a CLI and library from the creator of dotenv. It loads .env files for any language and adds encrypted secrets, multiple environments and custody of private keys. It is a strong pick if you want encrypted .env files you can commit, but it has no schema validation and its features change fast.

**Best for:** Teams that want to commit encrypted .env files and load them the same way in every language and in CI.

## Scores

- **Overall: 7.0** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (6.5): It is the best maintained way to load and encrypt .env files, and adoption is rising fast. It loses points because it does not check settings against a schema, which is half the category's job, and because its commands change often. Varlock covers schema validation, and plain dotenv or Node's --env-file are simpler for basic loading. For encrypted, shareable secrets it is a strong pick.
  - GPT-6.2 Sol (7.5): Choose dotenvx when encrypted `.env` files in Git and consistent loading across local development and CI are central requirements. Plain dotenv is simpler for basic loading, while T3 Env is a better fit when schema-derived types and client/server checks drive the choice. Rapid maintenance supports the recommendation, while breaking minor changes and the difficulty of measuring direct adoption keep it below a category-wide default.
- **Needed by many: 6.2** (likely 5.2 to 7.3)
  - Claude Opus 5.5 (6.0): Almost every backend and full-stack project loads env vars. dotenvx can replace dotenv wherever dotenv is used. Its main feature, encrypted secrets, matters most to teams that share secrets or deploy to many environments, which is a narrower group. The CLI also serves projects outside JavaScript.
  - GPT-6.2 Sol (6.4): Loading environment variables is a common need for backends, build scripts, and CI jobs. The CLI works across languages and frameworks, which makes it useful in mixed stacks. Its added value is concentrated in teams that can use encrypted files or startup checks, since Node already loads plain `.env` files.
- **Helps a lot: 7.4** (likely 6.1 to 8.5)
  - Claude Opus 5.5 (7.0): The encryption model is sound: XChaCha20-Poly1305 per value, many key storage options, multiple env files and profiles. Its run command works the same in every language. It does not validate settings against a schema, which Varlock and T3 Env do. Fast changes to flags and features make docs and AI-written code go stale quickly.
  - GPT-6.2 Sol (7.8): Version 2.38.2 combines layered loading, per-value encryption, and Envfile checks with per-key error messages. Its SDK has TypeScript declarations, while T3 Env and Varlock give application code schema-derived types. An external Go benchmark found overhead from the CLI wrapper in its setup, and a user reported a shared-key-file race. Tagged examples help coding agents use the released API because the schema filename and commands changed several times.
- **Holds up over time: 7.2** (likely 5.8 to 8.2)
  - Claude Opus 5.5 (7.0): Activity is very high: 1,553 commits, 137 releases, 9 open issues against 453 closed, and the last push was days ago. A company with a commercial key product (Armor) funds the work, which keeps it going but makes it depend on that business. The v2.0 breaking change and constant renaming of commands are a cost for upgraders. Most work seems to come from a small core team.
  - GPT-6.2 Sol (7.3): The project shipped 137 releases in a year and promptly patched a reported Node single-executable crash with a regression test. Paid Armor gives the project a commercial stake in ongoing maintenance, and the maintainer has published a 3.0 roadmap. Release activity is concentrated around the founder, and the removal of lock and unlock in a minor release makes upgrades less predictable.
- **Used widely: 5.9** (likely 4.5 to 7.1)
  - Claude Opus 5.5 (6.5): Downloads went from 4.4M to 92.7M per 4 weeks, about 21x against a median of 4.1x. That is the fastest growth in the category apart from the much smaller Varlock. Part of the jump is probably installs pulled in by other tools; I could not confirm the cause, and there is no dependents count. Its 5.9k stars are close to Varlock and T3 Env, but social attention is low.
  - GPT-6.2 Sol (5.3): Four-week npm downloads rose from 4.4 million to 92.7 million, about 21 times year over year versus the catalog median of 4.1 times. The shadcn CLI depends on dotenvx 1.x and has downloads on a comparable scale, so it likely accounts for a large share of the apparent growth. About 5,900 stars, a few hundred npm dependents, and installs outside npm support a meaningful direct audience. The missing repository-dependent count and modest discussion activity leave direct growth hard to pin down.
- **Vouched for: 5.3** (likely 4.0 to 6.7)
  - Claude Opus 5.5 (4.5): The main backing is that the dotenv author made it and that adoption is growing. Independent write-ups are mostly tutorials and short dev.to posts. I found no surveys, benchmarks or well-known production users. Hacker News and Bluesky threads have very little engagement.
  - GPT-6.2 Sol (6.1): The shadcn CLI is a prominent downstream user of the 1.x package, and an independent team reported fewer configuration mismatches after adopting dotenvx. Watt and Supermemory describe real deployment workflows in case studies published by the vendor. The 2025 State of JavaScript survey gives no dotenvx satisfaction measure, and most endorsements concern encryption and loading, leaving less evidence for the newer validation features.
- **Safe: 6.8** (likely 5.4 to 7.9)
  - Claude Opus 5.5 (7.0): There are no OSV advisories, the package has 6 dependencies, and the licence is BSD-3-Clause. There is no OpenSSF Scorecard, and the CLI handles private keys, so a compromised release would be serious. Very frequent releases from a small team raise supply-chain exposure.
  - GPT-6.2 Sol (6.6): The package uses the permissive BSD-3-Clause license, declares six runtime dependencies, and enables npm publish provenance in its manifest. The bundle records zero direct advisories. The 2.38.2 source lockfile pins an affected Undici version, although the npm dependency range permits the patched version. Exposure depends on the resolved or bundled dependency, and the missing Scorecard and unclear publisher coverage widen the range.

## Good

- Encrypts each value in place with a public key, so .env files can be committed and shared safely.
- `dotenvx run -- <cmd>` works with any language or framework and ships as standalone binaries.
- Very active development: about 1,500 commits and 137 releases in the last year, with few open issues.
- Private keys can live in the OS keychain, 1Password or Bitwarden, and the CLI accepts op:// and bw:// references.

## Bad

- It does not check types or required variables, so you still need Zod, T3 Env, envalid or Varlock for that part of the job.
- Flags and commands change quickly: v2.0 made set/get async and removed rotate, and features such as lock and --redact were added and then removed within months.
- The encrypted file format only works with dotenvx, and key rotation is manual.
- A paid key service (Armor) runs through the CLI, and most development comes from one company.

## The numbers

- Downloads, 4 weeks: 93M
- In a year: ×21
- GitHub stars: 5.9k
- Commits, 12 months: 1.6k
- Last npm release: Oct 2026
- Advisories, 24 months: 0
- Licence: BSD-3-Clause
- GitHub: https://github.com/dotenvx/dotenvx
- npm: https://www.npmjs.com/package/@dotenvx/dotenvx

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.
