npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@frxncisxo/envoy

v0.1.0

Published

Auto-generate Zod schemas, TypeScript types and .env.example from your .env files

Downloads

66

Readme

envoy ⚡

Auto-generate Zod schemas, TypeScript types, and .env.example from your .env file.

Stop writing validation boilerplate by hand. envoy reads your .env, infers the type and purpose of every variable, and generates everything you need in one command.

npx envoy generate --all

The problem

Every JS project needs:

  1. A .env.example for onboarding teammates
  2. Runtime validation so bad env crashes early
  3. TypeScript types for autocomplete

Most devs either skip these, or write them by hand — and they go stale instantly.

envoy does all three, automatically.


Install

npm install -g @envoy-cli/envoy
# or use without installing
npx envoy <command>

Commands

envoy generate — Generate files from your .env

envoy generate                  # Generates Zod schema (default)
envoy generate --all            # Generates everything
envoy generate --types          # TypeScript types only
envoy generate --example        # .env.example only
envoy generate -i .env.prod -o ./config  # Custom input/output

Output: env.schema.ts

import { z } from 'zod'

export const envSchema = z.object({
  /** Runtime environment */
  NODE_ENV: z.enum(['development', 'staging', 'production', 'test']),

  /** Port number (1-65535) */
  PORT: z.coerce.number().int().min(1).max(65535),

  /** ⚠️  Secret — never commit the real value */
  JWT_SECRET: z.string().min(1),

  /** Boolean flag (true/false) */
  DEBUG: z.enum(['true', 'false']).transform(v => v === 'true'),
})

export type Env = z.infer<typeof envSchema>

// Usage:
// export const env = envSchema.parse(process.env)

Output: .env.example

# Runtime environment
NODE_ENV=development

# Port number (1-65535)
PORT=3000

# ⚠️  Secret — never commit the real value
JWT_SECRET=

envoy inspect — See what envoy infers about your variables

envoy inspect
envoy inspect -i .env.staging
NODE_ENV        enum       Runtime environment
PORT            port       Port number (1-65535)
DATABASE_URL    url        A valid URL
JWT_SECRET      secret     [secret] ⚠️  Never commit
DEBUG           boolean    Boolean flag

envoy check — Validate that your .env has all required variables

envoy check
# ✅ All 12 variables are present in .env

envoy check
# ❌ Missing 2 variable(s) in .env:
#   • STRIPE_SECRET_KEY
#   • SENDGRID_API_KEY

Great for CI pipelines.


Inference rules

envoy detects types using key name patterns and value heuristics:

| Pattern | Inferred type | Zod | |---|---|---| | *_URL, *_ENDPOINT | url | z.string().url() | | PORT | port | z.coerce.number().int().min(1).max(65535) | | *_SECRET, *_KEY, *_TOKEN | secret | z.string().min(1) | | DEBUG, IS_*, ENABLED | boolean | z.enum(['true','false']).transform(...) | | NODE_ENV, APP_ENV | enum | z.enum(['development','staging','production','test']) | | *_TIMEOUT, *_LIMIT, PORT | number | z.coerce.number() | | Value starts with https:// | url | z.string().url() | | Value is true/false | boolean | — | | Value is digits only | number | — |


Roadmap

  • [ ] --watch mode to regenerate on .env changes
  • [ ] AI-powered inference for ambiguous variables (via OPENAI_API_KEY or ANTHROPIC_API_KEY)
  • [ ] VSCode extension
  • [ ] Support for multiple .env.* files

License

MIT