@vtx-labs/envjoy — programmatic API.
Keep your .env in sync with .env.example. The library half is pure and dependency-free; the CLI (the envjoy bin) wraps it with file I/O and a colorized report.
.env
.env.example
envjoy
import { diffEnv } from "@vtx-labs/envjoy";import { readFileSync } from "node:fs";const result = diffEnv( readFileSync(".env.example", "utf8"), readFileSync(".env", "utf8"),);if (!result.inSync) console.error("Missing:", result.missing); Copy
import { diffEnv } from "@vtx-labs/envjoy";import { readFileSync } from "node:fs";const result = diffEnv( readFileSync(".env.example", "utf8"), readFileSync(".env", "utf8"),);if (!result.inSync) console.error("Missing:", result.missing);
Parse the contents of a .env-style file.
Never throws: malformed lines are skipped rather than aborting, because a partially-valid env file should still surface the keys it does define.
@vtx-labs/envjoy — programmatic API.
Keep your
.envin sync with.env.example. The library half is pure and dependency-free; the CLI (theenvjoybin) wraps it with file I/O and a colorized report.Example