# convict: 4.6 out of 10

Keep, but not for new work. 9th of 9 in [Config and environment variables](https://elestia.ai/opensource/config/index.md).

Convict is Mozilla's older, schema-first config library for Node.js. It merges defaults, JSON files, environment variables and command-line arguments, then validates the result. It still works and is patched when security reports arrive, but it has slowed to one release a year and has a run of prototype-pollution advisories. For new projects, T3 Env, envalid or Varlock do the job better.

**Best for:** Existing Node.js services that already use a convict schema and only need it kept patched.

## Scores

- **Overall: 4.6** (likely 3.5 to 5.6)
  - Claude Opus 5.5 (3.5): Convict still does schema-based config loading for Node.js. But maintenance is slow, it ships no TypeScript types, and it has a pattern of critical pollution bugs. Peers in the bundle do the job better for new work: T3 Env, envalid and Varlock for typed validation, and node-config or c12 for layered files. Keep it where it already runs and pin it to 6.2.5 or later.
  - GPT-6.2 Sol (5.6): Convict earns a place on the shortlist when a Node.js service needs both layered files and schema validation. For a new TypeScript service that mainly reads environment variables, Envalid is a better fit because it infers types and has a more active release cadence. Convict’s slow maintenance and below-baseline download growth lower the recommendation, while the value of its integrated loader depends on how much configuration the app needs to merge.
- **Needed by many: 5.4** (likely 4.3 to 6.6)
  - Claude Opus 5.5 (6.0): Most server-side apps need to load and check their settings, so the category is broad. Convict serves only Node.js servers and has no browser or framework-specific story, which makes it a little narrower than the whole category.
  - GPT-6.2 Sol (4.8): Configuration validation is relevant to a large share of JavaScript backend work. Convict’s nested schema is most useful for Node.js projects that combine several sources of settings. The survey measures backend work but gives no estimate of how many projects need that combination.
- **Helps a lot: 6.1** (likely 5.0 to 7.1)
  - Claude Opus 5.5 (5.0): Convict's feature set is solid: a schema with formats, defaults and env and arg mapping, nested config, file merging, and masking of sensitive values. Its weak points are that it ships no TypeScript types, its API is dated, and its formats were split into add-on packages. Its schema checks are weaker than Zod-based peers such as T3 Env or Varlock. The repeated pollution bugs also show that its handling of input paths was fragile.
  - GPT-6.2 Sol (7.1): Version 6.2.5 combines documented defaults, predictable override order, and useful combined validation errors. The required-field workaround and separate typings add friction, and users have reported type errors with null defaults. A 2022 comparison found load times similar to node-config, but current performance and coding-agent reliability are less well measured.
- **Holds up over time: 3.4** (likely 2.3 to 4.6)
  - Claude Opus 5.5 (3.0): In the last year it had 8 commits, no GitHub releases and one npm patch, and that patch was a security fix. The Scorecard's Maintained check is 0, and third-party trackers flag it as possibly discontinued. It is not archived and it still gets security fixes, so it is not abandoned, but the ecosystem is moving to Zod-based tools.
  - GPT-6.2 Sol (3.8): Convict shipped a security patch in March 2026, its first npm release since January 2023. It recorded eight commits in the past year, and several pull requests have sat open for years. The patch shows maintainers still respond to serious reports, but the public record gives little basis for predicting sustained support.
- **Used widely: 3.8** (likely 2.8 to 4.9)
  - Claude Opus 5.5 (4.0): About 7.4M downloads in 4 weeks, but much of that comes from tools that depend on it rather than from direct choices. Its growth ratio of about 2.5 is well below the 4.1 median, so it is losing share. Its 2,529 dependent repos trail envalid's 2,933 and are far below node-config's 62k. It has no Hacker News or Bluesky attention.
  - GPT-6.2 Sol (3.6): Downloads grew from 2.93 million to 7.45 million over the same four-week window, but the 2.54× ratio trails the catalog’s 4.1× baseline and Envalid’s 2.71×. The collector found 2,529 dependent repositories, fewer than Envalid, T3 Env, or node-config. Automated and transitive installs blur the download count, and the dependent count covers only part of GitHub.
- **Vouched for: 5.3** (likely 4.1 to 6.3)
  - Claude Opus 5.5 (4.0): Mozilla built it and used it for its own services, and some tools such as the Antora docs generator still build on it. Those endorsements are mostly old. Current independent write-ups are thin, mostly auto-generated comparison sites, and no developer survey covers it.
  - GPT-6.2 Sol (6.5): Actual Budget uses Convict in its sync server, and the UK’s Defra recommends it in its Node.js backend examples. Mozilla Accounts uses 6.2.5, which shows continued use within the organization that maintains it. Independent comparative testing is dated, and recent Convict-specific satisfaction data is scarce.
- **Safe: 4.7** (likely 3.5 to 5.9)
  - Claude Opus 5.5 (4.0): It has had five prototype-pollution advisories, three of them critical. The two from March 2026 exist because earlier fixes were incomplete. Version 6.2.5 fixes the known ones, and the package has only two dependencies under Apache-2.0. Its Scorecard of 2.3 shows no security policy, no code review and no SAST.
  - GPT-6.2 Sol (5.4): Both critical March 2026 prototype pollution advisories were fixed in 6.2.5 before public disclosure. The package has two direct dependencies and a permissive Apache-2.0 license. Repeated prototype pollution fixes and the 2.3 OpenSSF Scorecard weigh against it, especially the zero scores for code review, fuzzing, and security policy. The publishing guide describes a manual npm login and Lerna workflow, and current publishing permissions could not be verified.

## Good

- One schema sets the default, the documentation, the env var name and the command-line flag for each setting.
- Handles nested config and merges several JSON or JSON5 files in order, then validates the whole result.
- Pulls in only two runtime dependencies and uses the permissive Apache-2.0 licence.
- Can mark settings as sensitive so they are masked when the config is printed.

## Bad

- Ships no TypeScript types: you need the community @types/convict package, and it infers types from the schema far worse than Zod-based tools do.
- Has had five prototype-pollution advisories since 2022, including two critical ones in March 2026, after earlier fixes proved incomplete.
- Maintenance is slow: 8 commits and one npm release in the last year, an OpenSSF Scorecard of 2.3, and a Maintained check of 0.
- Downloads grew about 2.5x in a year, well below the 4.1 median, so it is losing ground to newer tools.

## The numbers

- Downloads, 4 weeks: 7.4M
- In a year: ×2.5
- GitHub stars: 2.4k
- Commits, 12 months: 8
- Last npm release: Mar 2026
- Advisories, 24 months: 2
- Licence: Apache-2.0
- GitHub: https://github.com/mozilla/node-convict
- npm: https://www.npmjs.com/package/convict

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.
