Lightweight environment variable parser for TypeScript, inspired by Zod and Haskell's EVP. Current stable version 1.1.1 is actively maintained with regular releases. Supports nested object parsing, type inference, secret masking, default values, optional fields, and dotenv-style help generation. Key differentiators: low dependency footprint, comprehensive error reporting that continues parsing all variables, and explicit logging with secret hashing. Alternative to dotenv with stronger typing and validation, but less mature ecosystem.
npm install evp-tsVerified import paths — ran on the pinned version, not inferred.
Shows parsing environment variables with types, defaults, secret masking, and custom env names.
Update usage to align with v1.x: EVP.infer<typeof parser> now returns the inferred config object type directly.
Use EVP.string() with custom validation if you need other truthy/falsy strings.
Check for undefined or use .default() to ensure a value.
Be careful not to log the config object directly in production.
Only use EVP.infer in TypeScript type annotations: type T = EVP.infer<typeof parser>
Ensure tsconfig.json has 'strict' or 'esModuleInterop' enabled. Try reinstalling: npm install evp-ts
Use the ESM import syntax: import { EVP } from 'evp-ts'Set the variable or add .default(value) or .optional() to the parser definition.
No dependency data recorded yet.