dotenvx
A strong pick. 3rd of 9 config and environment variables.
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
Overall7.0
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.5, likely 5.5 to 7.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.
- npm downloads ratio: 21x growth vs 4.1x median.
- varlock.dev/guides/migrate-from-dotenv: Peer with schema-first validation and a migration path from dotenvx.
- raw.githubusercontent.com/dotenvx/dotenvx/main/CHANGELOG.md: Fast feature churn in v2.
GPT-6.2 Sol: 7.5, likely 6.4 to 8.6
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.
- github.com/dotenvx/dotenvx/blob/v2.38.2/README.md: Stable release combines local encryption, runtime loading, and Envfile checks.
- javascripts.com/compare/dotenv-vs-dotenvx__dotenvx: Independent comparison documents the smaller, dependency-free dotenv option.
- env.t3.gg/docs/introduction: Documents the stronger application typing and client/server checks.
- github.com/dotenvx/dotenvx/blob/v2.38.2/CHANGELOG.md: Shows frequent fixes alongside changes that require workflow updates.
- github.com/shadcn-ui/ui/blob/main/packages/shadcn/package.json: A widely installed CLI pulls in dotenvx 1.x transitively.
Needed by many6.2
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.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.
- github.com/dotenvx/dotenvx: Works across platforms and environments, with encryption.
- deployhq.com/guides/dotenvx: Guide aimed at deployment workflows.
GPT-6.2 Sol: 6.4, likely 5.3 to 7.5
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.
- category job: The category covers loading and checking settings and secrets.
- github.com/dotenvx/dotenvx/blob/v2.38.2/README.md: Documents the cross-platform CLI, Node API, layered files, and encryption.
- nodejs.org/api/cli.html#--env-filefile: Node has built-in plain env file loading.
Helps a lot7.4
How well does it do the job for those who need it?
Claude Opus 5.5: 7.0, likely 5.5 to 8.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.
- raw.githubusercontent.com/dotenvx/dotenvx/main/CHANGELOG.md: v2 features; validate/check, lock and --redact added then removed.
- dev.to/kenn/dotenvx-almost-perfect-replacement-for-dotenv-13jl: User calls it an almost perfect replacement for dotenv, with caveats.
- dev.co/security/open-source/dotenvx: The format only works with dotenvx; key rotation is manual.
- npm hasTypes: Ships TypeScript types.
GPT-6.2 Sol: 7.8, likely 6.7 to 8.9
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.
- github.com/dotenvx/dotenvx/blob/v2.38.2/README.md: Shows resolved-value validation, profiles, and per-key errors in the stable version.
- env.t3.gg/docs/introduction: T3 Env offers schema-derived types and client/server separation.
- varlock.dev/reference/cli/cache-and-codegen: Varlock generates typed accessors from its schema.
- pkg.go.dev/github.com/narasaka/dotenvx-go@v0.0.1: An external Go port measured startup and memory overhead for the CLI wrapper.
- github.com/dotenvx/dotenvx/issues/1017: Open user report on concurrent writes to a shared key file.
- github.com/dotenvx/dotenvx/blob/v2.38.2/CHANGELOG.md: Records several recent schema filename and command changes.
Holds up over time7.2
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 5.5 to 8.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.
- github commitsLastYear / releasesLastYear: 1553 commits, 137 releases in the last year.
- github openIssues / closedIssues: 9 open, 453 closed.
- raw.githubusercontent.com/dotenvx/dotenvx/main/CHANGELOG.md: 2.0.0 on 2026-06-30 with breaking changes; Armor customer features.
- github.com/dotenvx/dotenvx/releases: Many releases in October 2026.
GPT-6.2 Sol: 7.3, likely 6.1 to 8.4
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.
- github releasesLastYear, commitsLastYear, contributors, pushedAt: 137 releases, 1,553 commits, 45 contributors, and a November push.
- github.com/dotenvx/dotenvx/issues/1031: A user-reported crash was patched and covered by a test.
- github.com/dotenvx/dotenvx/releases/tag/v2.38.2: The founder published the latest stable GitHub release.
- github.com/dotenvx/dotenvx/blob/v2.38.2/CHANGELOG.md: Version 2.34 removed the lock and unlock workflow.
- dotenvx.com/blog/2026/11/09/rust-radiohead.html: Outlines 3.0 work on a Rust binary and optional Armor support.
- cyberreviewed.com/reviews/dotenvx: Describes the founder-led company and paid Armor tier.
Used widely5.9
How many use it, and is that growing?
Claude Opus 5.5: 6.5, likely 5.0 to 7.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.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 92.7M vs 4.4M, about 21x growth.
- github stars: 5,882 stars.
- dependents: null; no count from ecosyste.ms.
- peers dotenv downloadsLast4Weeks: dotenv still has about 11x more downloads.
GPT-6.2 Sol: 5.3, likely 4.0 to 6.7
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.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo; medianDownloadsRatio: Raw download growth was about 21.2 times against a 4.1-times median.
- github.com/shadcn-ui/ui/blob/main/packages/shadcn/package.json: The shadcn CLI lists dotenvx 1.x as a runtime dependency.
- bellwether.report/npm/shadcn: Shadcn logged 18.4 million npm downloads in the week of November 9.
- bellwether.report/npm/@dotenvx/dotenvx: Dotenvx logged 23.7 million npm downloads that same week.
- npmjs.com/package/%40dotenvx/dotenvx: npm lists 283 dependent packages.
- github stars; dependents; bluesky posts: 5,882 stars, no ecosyste.ms count, and six Bluesky posts.
Vouched for5.3
Who stands behind it being good?
Claude Opus 5.5: 4.5, likely 3.0 to 6.0
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.
- hackerNews: 3 stories, each with 5 points or fewer.
- bluesky posts: 6 posts with almost no likes.
- dev.to/silentwatcher_95/you-should-encrypt-your-environment-variables-n4h: Positive user post, little depth.
- deployhq.com/guides/dotenvx: Third-party deployment guide.
GPT-6.2 Sol: 6.1, likely 4.9 to 7.3
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.
- github.com/shadcn-ui/ui/blob/main/packages/shadcn/package.json: The shadcn CLI ships dotenvx 1.x as a dependency.
- zenn.dev/dgtech/articles/dc854595affade: A team reports more consistent local settings and describes its CI setup.
- dotenvx.com/members/watt: Vendor-hosted case study describes Watt decrypting secrets at deployment runtime.
- dotenvx.com/members/supermemory: Vendor-hosted case study describes Supermemory versioning encrypted settings.
- 2025.stateofjs.com/en-US/libraries: No project-specific usage or satisfaction result.
Safe6.8
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 5.5 to 8.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.
- advisories total: 0 advisories.
- npm dependencies: 6 dependencies.
- scorecard: No Scorecard data.
- npm license: BSD-3-Clause, permissive.
GPT-6.2 Sol: 6.6, likely 5.2 to 7.8
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.
- advisories total; scorecard; npm license, dependencies: Zero direct OSV advisories, no Scorecard, BSD-3-Clause, and six runtime dependencies.
- github.com/dotenvx/dotenvx/blob/v2.38.2/package.json: Configures publish provenance and allows patched Undici 6.x versions.
- github.com/dotenvx/dotenvx/blob/v2.38.2/package-lock.json: The release tag locks Undici to 6.28.1.
- github.com/nodejs/undici/security/advisories/GHSA-2m5v-pch6-74hx: Upstream security advisory identifies 6.29.1 as the patched 6.x release.
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
- npm downloads, 4 weeks
- 93M ×21 in a year
- GitHub stars
- 5.9k
- Commits, 12 months
- 1.6k
- npm version
- 2.38.2 Oct 2026
- Versions, 12 months
- 135
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- BSD-3-Clause
Read on 21 November 2026 from GitHub (dotenvx/dotenvx), npm (@dotenvx/dotenvx), OSV and the OpenSSF Scorecard.