Developer ToolShippedPublic

envy

Open source · published on npm2026

A near-zero-dependency CLI that turns .env files from tribal knowledge into a schema a team can validate, audit and generate types from.

TypeScript

// stack

TypeScript
Node.js
npm

// architecture

.env.schema format with types, required/optional, format validators and modifiers · codebase audit for undeclared process.env usage including destructured and bracket-notation access · typed env.ts codegen that validates on import · team defaults sync that never overwrites local values · published on npm

// overview

Every Node.js project has the same .env problems. Someone adds a variable and forgets to tell the team, staging breaks because a variable was renamed, and a new developer clones the repo with no idea what belongs in .env. envy fixes that with a schema format describing every environment variable an application uses, then validates, audits and code-generates against it — including scanning the codebase for process.env access that was never declared.

// what was built

  • ·A .env.schema format describing every variable an app needs: type, required or optional, format validators (postgresql-url, redis-url, jwt-secret, hex-color, semver and more), plus modifiers like default, min/max and enum.
  • ·`envy audit` scans the entire codebase for process.env usage — including destructured and bracket-notation access — and flags anything used but not declared.
  • ·`envy generate` produces a fully-typed src/env.ts that validates on import, so the app refuses to start with a missing required variable rather than failing opaquely on first use.
  • ·`envy sync` shares non-secret team defaults through a committed .env.team.json without ever overwriting a value a developer already has set locally.
  • ·Near-zero runtime dependencies, fully tested, and published to npm.