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

ultraenv

v1.0.4

Published

The Ultimate Environment Variable Manager — Validate, Type, Encrypt, Sync, and Never Ship Broken Configs Again

Readme

╔═══════════════════════════════════════════════════╗
║                                                   ║
║     ██████╗ ██████╗ ███████╗██╗  ██╗██╗  ██╗     ║
║    ██╔════╝██╔═══██╗██╔════╝██║ ██╔╝██║ ██╔╝     ║
║    ██║     ██║   ██║███████╗█████╔╝ █████╔╝      ║
║    ██║     ██║   ██║╚════██║██╔═██╗ ██╔═██╗      ║
║    ╚██████╗╚██████╔╝███████║██║  ██╗██║  ██╗     ║
║     ╚═════╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝     ║
║                                                   ║
║   The Ultimate Environment Variable Manager        ║
║   v1.0.0                                          ║
╚═══════════════════════════════════════════════════╝

Validate, Type, Encrypt, Sync, and Never Ship Broken Configs Again.

npm version License: MIT Node.js Zero Dependencies TypeScript Coverage

Getting Started · Schema Reference · CLI Reference · Vault Guide · Docs


🤔 Why ultraenv?

Every project uses environment variables. Every project gets them wrong eventually.

  • Missing variables crash production at 3 AM.
  • Wrong types (process.env.PORT is always a string) cause silent bugs.
  • Leaked secrets in .env files end up in git history forever.
  • Drifting .env.example files lead to confusing onboarding for new developers.
  • No validation means you find out about missing configs at runtime.

ultraenv solves all of these problems with a single, zero-dependency library that provides:

| Problem | ultraenv Solution | |---|---| | No type safety for process.env | Full TypeScript inference from schema | | Secrets leaked in git | Built-in secret scanner with 55+ patterns | | No .env validation | Schema engine with 30+ validators | | Secrets in plain text | AES-256-GCM encrypted vault | | .env.example out of sync | Auto-sync with watch mode | | No multi-environment support | Multi-env management (dev, staging, prod) | | Can't use in CI/CD | CI commands with SARIF output | | Hard to migrate from dotenv | Drop-in replacement with load() |


📊 Feature Comparison

| Feature | ultraenv | dotenv | envalid | @t3-oss/env | |---|:---:|:---:|:---:|:---:| | Parse .env files | ✅ | ✅ | ✅ | ✅ | | TypeScript inference | ✅ Full | ❌ | ✅ Partial | ✅ Full | | Schema validators | ✅ 30+ | ❌ | ✅ 8 | ✅ Via zod | | String validators | ✅ 20+ | ❌ | ❌ | Via zod | | Secret scanning | ✅ 55+ patterns | ❌ | ❌ | ❌ | | Encrypted vault | ✅ AES-256-GCM | ❌ | ❌ | ❌ | | Key rotation | ✅ | ❌ | ❌ | ❌ | | .env.example sync | ✅ Watch mode | ❌ | ❌ | ❌ | | Type generation | ✅ .d.ts / module / JSON Schema | ❌ | ❌ | ✅ | | Multi-environment | ✅ 11 file variants | ❌ | ❌ | ❌ | | Framework presets | ✅ 9 presets | ❌ | ❌ | ❌ | | CI/CD integration | ✅ SARIF output | ❌ | ❌ | ❌ | | Variable interpolation | ✅ $VAR / ${VAR} | ✅ | ❌ | ❌ | | File cascade | ✅ Priority-based | ❌ | ❌ | ❌ | | Hot reload watcher | ✅ | ❌ | ❌ | ❌ | | Health check API | ✅ | ❌ | ❌ | ❌ | | Express middleware | ✅ | ❌ | ❌ | ❌ | | Fastify plugin | ✅ | ❌ | ❌ | ❌ | | SARIF output | ✅ | ❌ | ❌ | ❌ | | Git hook integration | ✅ | ❌ | ❌ | ❌ | | dotenv-compatible API | ✅ | — | ❌ | ❌ | | Zero dependencies | ✅ | ✅ | ❌ | ❌ | | Node.js | ≥ 18 | ≥ 12 | ≥ 14 | ≥ 18 |


🚀 Quick Start

Get started in three steps:

Step 1 — Install

npm install ultraenv

Step 2 — Define your schema

Create an env.ts file:

import { defineEnv, t } from 'ultraenv';

const env = defineEnv({
  DATABASE_URL: t.string().format('url').required(),
  PORT: t.number().port().default(3000),
  NODE_ENV: t.enum(['development', 'staging', 'production'] as const).required(),
  DEBUG: t.boolean().default(false),
  ADMIN_EMAIL: t.email().optional(),
  ALLOWED_ORIGINS: t.array().separator(';').default(['http://localhost:3000']),
  CACHE_TTL: t.duration().default('1h'),
  MAX_UPLOAD_SIZE: t.bytes().default('10MB'),
});

export default env;

Step 3 — Use your typed env everywhere

import env from './env';

const server = createServer({
  port: env.PORT,           // number
  host: env.HOST,           // string
  databaseUrl: env.DATABASE_URL,
});

📦 Installation

npm install ultraenv
pnpm add ultraenv
yarn add ultraenv
bun add ultraenv

Global CLI

npm install -g ultraenv
ultraenv init
ultraenv validate
ultraenv scan

🔧 CLI Command Reference

| Command | Description | |---|---| | ultraenv init | Initialize project | | ultraenv validate | Validate environment variables | | ultraenv typegen | Generate TypeScript types | | ultraenv sync | Sync .env.example | | ultraenv scan | Scan for leaked secrets | | ultraenv debug | Show diagnostics | | ultraenv protect | Check .gitignore protection | | ultraenv doctor | Run self-checks | | ultraenv vault * | Vault encrypt/decrypt/rekey | | ultraenv envs * | Multi-environment management | | ultraenv ci * | CI/CD integration commands |


📐 Schema Reference

All schema builders via the t factory:

import { defineEnv, t } from 'ultraenv';

t.string().format('url').required()
t.number().port().default(3000)
t.boolean().default(false)
t.enum(['a', 'b'] as const).required()
t.url({ protocols: ['https'] }).required()
t.email().optional()
t.array().separator(';').trimItems().required()
t.json<{ theme: string }>().required()
t.duration().default('1h')
t.bytes().default('10MB')
t.path({ mustExist: false }).default('./uploads')
t.uuid({ version: 4 }).required()
t.ip().required()
t.cron().default('0 2 * * *')

🔐 Encryption & Vault

ultraenv vault init --env production
ultraenv vault encrypt --env production
git add .env.vault  # safe to commit!
ultraenv vault decrypt --env production
  • Algorithm: AES-256-GCM
  • .env.vault → commit ✅
  • .env.keys → gitignore ❌

🔍 Secret Scanning

ultraenv scan                          # Scan files
ultraenv scan --scope git-history      # Scan git history
ultraenv scan --format sarif --output results.sarif  # GitHub Code Scanning

55+ patterns: AWS, GitHub, Google, Stripe, Slack, private keys, DB URLs, and more.


🤝 Contributing

git clone https://github.com/Avinashvelu03/ultraenv.git
cd ultraenv && npm install
npm test
npm run build

📜 License

MIT © 2024 Avinash Velu


🔐 Support ultraenv

  ██████╗  ██████╗ ███╗   ██╗ █████╗ ████████╗███████╗
  ██╔══██╗██╔═══██╗████╗  ██║██╔══██╗╚══██╔══╝██╔════╝
  ██║  ██║██║   ██║██╔██╗ ██║███████║   ██║   █████╗
  ██║  ██║██║   ██║██║╚██╗██║██╔══██║   ██║   ██╔══╝
  ██████╔╝╚██████╔╝██║ ╚████║██║  ██║   ██║   ███████╗
  ╚═════╝  ╚═════╝ ╚═╝  ╚═══╝╚═╝  ╚═╝   ╚═╝   ╚══════╝

ultraenv is solo-built and freely available to every developer on Earth. If it saved your secrets, saved your sanity, or caught a leak before prod — it earned your support.

Ko-fi GitHub Sponsors

Zero-cost support:

Made with ❤️ by Avinash Velu

Report Bug · Request Feature · Discussions