Skip to content
PluginStats

zod-config weekly downloads statistics

By alexmarqs · npm · Vite plugins

Load configuration variables from multiple sources with flexible adapters, ensuring type safety with Zod.

View on npm Fresh · Dec 6, 2026

zod-config has 17,074 recorded weekly downloads on npm, an increase of 25.5% over the past 30 days, ranking #1087 of 3,247 tracked listings.

Weekly downloads
17,074
Official API · Dec 5, 2026
7-day growth
+26.8%
+3.6K weekly downloads
30-day growth
+25.5%
+3.5K weekly downloads
90-day growth
+16.7%
+2.4K weekly downloads
Rank
#1087
▲ 63 in 7 days

About zod-config

<p align="center"> <img src="https://github.com/alexmarqs/zod-config/blob/main/.github/assets/logo.png?raw=true" alt="Zod Config logo" width="180" /> </p>

Zod Config

Load configuration variables from multiple sources type safely using Zod.

NPM

The new major version supports both Zod 4 and Zod 3 out of the box. Check the compatibility section for more details.

Features

  • 👮‍♂️ Type safety. Zod Config uses Zod;
  • 🤌 Tiny. Zod Config is a tiny library with no dependencies, tree-shaking friendly;
  • ✨ Flexible. Combine multiple adapters to load the configuration from different sources. We deeply merge the configuration from different sources, following the order of the adapters provided; Create your own adapters easily; Use the callback functions to handle errors and success due to the async nature of the adapters;
  • 🪴 Easy to use. Zod Config is designed to be easy to use, with a simple API;
  • 🔄 Async / Sync support. Zod Config provides both asynchronous and synchronous APIs to fit different application needs;
  • ▲ Next.js, Vite, Astro, TanStack Start. Type-safe environment variables with server and client schemas, checked when the build starts;

Install

npm install zod-config zod # npm
pnpm add zod-config zod # pnpm
yarn add zod-config zod # yarn

Table of contents:

Quick Start

Zod Config provides both asynchronous and synchronous APIs for loading configuration:

  • loadConfig: Asynchronous function that takes a Zod Object schema and returns a promise resolving to the validated configuration object;
  • loadConfigSync: Synchronous version that takes the same configuration but returns the result directly without a promise;

Note: loadConfigSync only supports synchronous adapters and schemas. For details on compatibility, see Synchronous loading.

Here are the available configuration options:

Here are the available configuration options for loadConfig and loadConfigSync:

PropertyTypeDescriptionRequiredGlobalAdapter
schemaAnyZodObjectA Zod Object schema to validate the configuration.✅N/AN/A
adaptersArray<Adapter | SyncAdapter> | Adapter | SyncAdapterAdapter(s) to load the configuration from. If not provided, process.env will be used.❌N/AN/A
onError(error: InferredErrorConfig<T>) => void)A callback to be called when an error occurs.❌✅❌
onSuccess(data: InferredDataConfig<S>) => voidA callback to be called when the configuration is loaded successfully.❌✅❌
loggerLoggerA custom logger to be used to log messages. By default, it uses console.❌✅❌
keyMatching'strict' | 'lenient'How to match keys between the schema and the data of the adapters. By default, it uses strict.❌✅✅
silentbooleanWhether to suppress errors. By default, it is false.❌✅✅
transform(obj: { key: string; value: unknown }) => { key: string; value: unknown } | falseFunction to transform key-value pairs before processing. If the function returns false, the key-value pair will be dropped.❌✅✅

Note: Options marked as both "Global" and "Adapter" can be set at the global level (affecting all adapters) or at individual adapter level (affecting only that adapter). When both are provided, the adapter-level option takes precedence. For specific adapter options, check the section of the adapter you are using.

From the package we also expose the necessary types in case you want to use them in your own adapters. Some of the options are shared between the global config and the adapter config, so you can use them in your own adapters as well.

This library provides some built in adapters to load the configuration from different sources via modules. You can easily import them from zod-config/<built-in-adapter-module-name>.

Compatibility

Zod Config supports both Zod 4 and Zod 3 out of the box. To start using it, just make sure you have the correct versions of zod-config (zod-config@^1.0.0) and zod (zod@^3.25.1 or zod@^4.0.0)!

[!WARNING] Zod 3 support is deprecated and will be removed in the next major version. Use Zod 4 or Zod 4 Mini for new code.…

Description from the npm listing.

  • zod
  • config
  • env
  • json
  • json5
  • yaml
  • toml
  • dotenv
  • typescript
  • nextjs
  • vite
  • vite-plugin
  • astro
  • tanstack-start
  • environment-variables
  • secrets
  • adapters
  • typesafe
  • aws
  • secrets-manager

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

zod-config weekly downloads on npm, last 90 days: 17,074 weekly downloads as of Dec 5, 2026, +16.7% over 90 days.zod-configWeekly downloads on npm · Last 90 days17,074downloads / week+16.7% over 90 days05K10K15K20KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
zod-config weekly downloads on npm, last 90 days: 17,074 weekly downloads as of Dec 5, 2026, +16.7% over 90 days.

7/30/90-day growth

zod-config weekly downloads growth on npm: +26.8% over 7 days, +25.5% over 30 days, +16.7% over 90 days.zod-configWeekly downloads growth on npm17,074downloads / week now7-day growth+3,607 weekly downloads+26.8%30-day growth+3,469 weekly downloads+25.5%90-day growth+2,445 weekly downloads+16.7%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
zod-config weekly downloads growth on npm: +26.8% over 7 days, +25.5% over 30 days, +16.7% over 90 days.

Ranking history

zod-config npm ranking history: currently #1087 (by weekly downloads).zod-confignpm ranking · by weekly downloads · Last 90 days#1087current rank#1020#1040#1060#1080#1100#1120#1140#1160#1180Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankNov 23, 2026 – Dec 6, 2026 · 14 observations · Updated Dec 5, 2026pluginstats.com
zod-config npm ranking history: currently #1087 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 55, #7 (overall #1,087)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 10, #6 (overall #186)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (128)
Recent weekly downloads observations for zod-config
Date (UTC)Weekly downloadsChange vs. previous
17,074+81
16,993-183
17,176-946
18,122+540
17,582+2.2K
15,355+1.8K
13,511+44
13,467+75
13,392+321
13,071+858
12,213+795
11,418+46
11,372-1.3K
12,639—

Similar npm Vite plugins plugins

All 20 zod-config alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/zod-config. First seen Nov 23, 2026; last successful collection Dec 6, 2026. See the methodology.