# envalid: 6.6 out of 10

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

envalid is a small, mature, zero-dependency library that checks environment variables against built-in validators and exits with clear errors. It is still a sound choice for plain Node or Bun servers. T3 Env and Standard Schema-based tools now win most new TypeScript projects, and envalid's usage is growing more slowly than the category.

**Best for:** Backend Node or Bun services that want simple, typed env checks without adding Zod or another schema library.

## Scores

- **Overall: 6.6** (likely 5.6 to 7.6)
  - Claude Opus 5.5 (6.0): envalid is a well-kept, safe, focused validator that suits server apps where adding Zod is not wanted. For most new TypeScript projects, T3 Env or another Standard Schema-based tool gives the same checks plus framework support and reuse of existing schemas. Its growth below the median and its reliance on one maintainer keep it in the reasonable-but-not-default band.
  - GPT-6.2 Sol (7.2): Envalid is a strong pick for new Node.js and Bun services that need a small, typed startup check. T3 Env is a better fit for shared client and server schemas, and Varlock covers projects that need to load and validate secrets in one workflow. The recent release supports choosing Envalid today, while below-baseline adoption growth and concentrated release ownership limit confidence over two years.
- **Needed by many: 6.2** (likely 5.1 to 7.3)
  - Claude Opus 5.5 (6.0): Most server-side JS/TS apps read environment variables and benefit from checking them. envalid covers only the validation half of the job and works best on servers. It has no special support for frontend frameworks, so it is narrower than the whole category.
  - GPT-6.2 Sol (6.3): Checking settings at startup serves a large group of backend and CLI developers, and Envalid works across frameworks on Node.js and Bun. Its audience is narrower than the full config category because loading files and fetching secrets happen upstream. Runtime surveys show how common those platforms are, but give little evidence about how many projects need a dedicated validator.
- **Helps a lot: 6.9** (likely 5.9 to 7.9)
  - Claude Opus 5.5 (6.0): envalid does validation well, with built-in validators, type inference, readable errors and new options such as requiredWhen and testDefault. It does not accept Standard Schema validators, has no framework presets, does no client/server split and does not load .env files, all of which T3 Env, Varlock and dotenvx offer in some form. Its API is small and stable, so AI agents usually write correct code for it.
  - GPT-6.2 Sol (7.8): Version 9 infers types, converts common values, and reports missing and invalid settings together. A small API and clear examples make basic setup straightforward for developers and coding agents. Strict numeric parsing takes a custom validator, and T3 Env offers stronger support for shared client and server configuration. Comparative performance and agent accuracy remain unmeasured in the available evidence.
- **Holds up over time: 6.4** (likely 5.0 to 7.8)
  - Claude Opus 5.5 (6.0): The project is still actively maintained. It had 27 commits and 3 releases in the last year, v9.0.0 shipped in October 2026, and only 4 issues are open. Most of the work comes from one maintainer with no visible funding, and the v9 breaking changes (ESM-only, Node 22 minimum) may slow upgrades. Its 14-year history and careful beta-then-release pattern help, but the ecosystem is moving toward Standard Schema tools.
  - GPT-6.2 Sol (6.8): Envalid had 27 commits, two stable npm releases, and a small open backlog over the latest year. A user-reported QuickJS issue led to a fix and documentation within weeks, although some other requests have been open for years. Releases still center on one maintainer in the public record, and v9 changed module packaging and blank-value handling. Confirmed funding and backup release authority would make the two-year outlook clearer.
- **Used widely: 4.4** (likely 3.4 to 5.6)
  - Claude Opus 5.5 (5.0): envalid had about 4.5M downloads in 4 weeks and 2,933 dependent repos, a solid mid-sized base. Its year-over-year ratio of 2.7 is below the 4.1 median, while T3 Env grew 7x, dotenvx 21x and Varlock from almost nothing. Its share of new projects is shrinking.
  - GPT-6.2 Sol (3.8): The 2,933 indexed repositories and 373 npm packages put Envalid near Convict and T3 Env by observed use. Downloads rose from 1.65 million to 4.47 million, but that 2.71× increase fell below the 4.1× catalog median and T3 Env's 7.19×. Its 1,590 stars and quiet social snapshot add little evidence of fresh adoption. The dependency index misses projects and npm counts repeated installs, leaving the total number of direct choices uncertain.
- **Vouched for: 4.5** (likely 3.3 to 5.9)
  - Claude Opus 5.5 (4.0): Third-party guides call it battle-tested and a good pick for plain servers, and many packages depend on it. I found no current survey data, no framework that builds on it and no named large company backing it. Community attention on Hacker News and Bluesky is nil.
  - GPT-6.2 Sol (5.0): Doop uses Envalid at server startup, and a separate user reports using it to stop misconfigured Kubernetes pods before they become ready. The Zenvalidate author reports years of use and identifies reusable Zod schemas and client/server separation as reasons to switch. These are concrete examples, with limited evidence from large production deployments, satisfaction surveys, or current comparative benchmarks.
- **Safe: 7.4** (likely 6.3 to 8.5)
  - Claude Opus 5.5 (8.0): It has no runtime dependencies, no advisories ever, an MIT licence, and npm trusted publishing from GitHub workflows since v9. The Scorecard is 6.3, with weak code review, no branch protection and no security policy, which reflects a single maintainer pushing directly. The attack surface is small.
  - GPT-6.2 Sol (6.7): The MIT license, zero runtime dependencies, and npm trusted publishing keep the package's supply-chain exposure relatively small. OSV records zero advisories, so there is little evidence on how quickly security fixes would ship. The 6.3 OpenSSF Scorecard flags weak code review and gives zero for branch protection, a security policy, and fuzzing. Some built-in validators include rejected values in errors that the default reporter logs, which matters when those values contain secrets.

## Good

- It has zero runtime dependencies, and since v9 it is published through npm trusted publishing.
- Its built-in validators, defaults, testDefault and choices options cover most server needs with very little code.
- Error messages are readable, a reporter can be swapped in, and the docs option links each variable to its documentation.
- It is written in TypeScript and infers the type of the cleaned env object from the spec.

## Bad

- It does not support Standard Schema, Zod or Valibot, and it has no client/server split for Next.js, Vite or Nuxt.
- v9 is ESM-only and needs Node 22 or later, which breaks older CommonJS setups.
- It does not load .env files or manage secrets, so you still need dotenv or a runtime loader.
- One maintainer does most of the work, and branch protection and code review are weak.

## The numbers

- Downloads, 4 weeks: 4.5M
- In a year: ×2.7
- GitHub stars: 1.6k
- Commits, 12 months: 27
- Last npm release: Oct 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/af/envalid
- npm: https://www.npmjs.com/package/envalid

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.
