@envmanifest/node
v0.1.3
Published
Typed runtime loader for envmanifest contracts. Validates required env vars at boot, fails loudly on missing, never returns values to coding agents.
Maintainers
Readme
@envmanifest/node
Typed runtime loader for envmanifest contracts.
npm install @envmanifest/nodeTwo ways to use it
Generated module (preferred — no runtime dep)
envmanifest generate types --out src/env.tsimport { env } from "./env";
env.DATABASE_URL; // typed, validated at boot, fails loudly if missingRuntime package
import { defineEnv } from "@envmanifest/node";
export const env = defineEnv({
required: ["DATABASE_URL", "STRIPE_SECRET_KEY"] as const,
optional: ["LOG_LEVEL"],
project: "my-api",
});defineEnv throws EnvLoadError listing every missing required name when the process boots without the contract satisfied. Empty strings count as missing.
License
MIT
