{"_id":"@alvarez-j2/envguard","_rev":"3-b7c270ae3599c40e58a9a8caa78dc65a","name":"@alvarez-j2/envguard","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@alvarez-j2/envguard","version":"0.1.0","keywords":["env","dotenv","cli","ci"],"author":"","license":"MIT","_id":"@alvarez-j2/envguard@0.1.0","maintainers":[{"name":"alvarez-j2","email":"edujoel125@outlook.com"}],"bin":{"envguard":"dist/cli.js"},"dist":{"shasum":"194302cdd939d3f5756debc732b24835a031e8f7","tarball":"https://registry.npmjs.org/@alvarez-j2/envguard/-/envguard-0.1.0.tgz","fileCount":7,"integrity":"sha512-RXg3q/MLNWn+HM/3HB2S4+wVRnFpGXMRvWaM1OFPYVPetyNhhFqirOm7pTlyEOjf19fbJ90yPILnCq1nC8aLAQ==","signatures":[{"sig":"MEYCIQCWJuyqvgb1Qbr+QW4xdM364xWjJHsvW7MNAaL1uDny8gIhAM53Aas2ToS9wIC124GvdP2i1vD5pXFrPWBHW32gWJaJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15562},"main":"dist/envguard.js","types":"dist/envguard.d.ts","engines":{"node":">=18"},"gitHead":"b4c1f1066fab5b1abbee06716753cf62bd80079e","scripts":{"test":"npm run build && node --test","build":"tsc -p tsconfig.json","prepublishOnly":"npm test"},"_npmUser":{"name":"alvarez-j2","email":"edujoel125@outlook.com"},"_npmVersion":"10.9.2","description":"Small CLI that checks process.env usage against .env.example.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.9"},"_npmOperationalInternal":{"tmp":"tmp/envguard_0.1.0_1786541168876_0.7129965323947562","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alvarez-j2/envguard","version":"0.1.1","keywords":["env","dotenv","cli","ci"],"author":"","license":"MIT","_id":"@alvarez-j2/envguard@0.1.1","maintainers":[{"name":"alvarez-j2","email":"edujoel125@outlook.com"}],"bin":{"envguard":"dist/cli.js"},"dist":{"shasum":"f84ba0873fca660bec0295553ef8a34b7525db15","tarball":"https://registry.npmjs.org/@alvarez-j2/envguard/-/envguard-0.1.1.tgz","fileCount":7,"integrity":"sha512-VrUxe5cSF34jgyexxJ7K0Akbl4YGQf77Wd4OzMcVTmB5d4QDpkcHSbM8ydUmhGYuRRCg8i6HOdbnFxa7p27GIQ==","signatures":[{"sig":"MEUCIQC7CzkpRSc905A+jeWI5GP1LBWLKkilNPB2CfnhPlkzCAIgEbkWw6EXu2KuNIB387tsjOdHEowAl373NVd9rvCtg4U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16017},"main":"dist/envguard.js","types":"dist/envguard.d.ts","engines":{"node":">=18"},"gitHead":"b4c1f1066fab5b1abbee06716753cf62bd80079e","scripts":{"test":"npm run build && node --test","build":"tsc -p tsconfig.json","prepublishOnly":"npm test"},"_npmUser":{"name":"alvarez-j2","email":"edujoel125@outlook.com"},"_npmVersion":"10.9.2","description":"Small CLI that checks process.env usage against .env.example.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.2","@types/node":"^22.13.9"},"_npmOperationalInternal":{"tmp":"tmp/envguard_0.1.1_1786541789614_0.1613843252722882","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@alvarez-j2/envguard","version":"0.1.2","description":"Small CLI that checks process.env usage against .env.example.","main":"dist/envguard.js","types":"dist/envguard.d.ts","bin":{"envguard":"dist/cli.js"},"scripts":{"build":"tsc -p tsconfig.json","test":"npm run build && node --test","prepublishOnly":"npm test"},"keywords":["env","dotenv","cli","ci"],"author":"","license":"MIT","devDependencies":{"@types/node":"^22.13.9","typescript":"^5.8.2"},"engines":{"node":">=18"},"_id":"@alvarez-j2/envguard@0.1.2","gitHead":"b4c1f1066fab5b1abbee06716753cf62bd80079e","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Bp6WLHHNehJmL9maH2YULa6+u2l+2DxHeBYJOlRAcl0VEsYDGQK2xUjfcbPpbcfkZVXN1XDkXBU3/Pz178sC8Q==","shasum":"053eb89fa185c5b254fd473faf9ab3aad3d99cff","tarball":"https://registry.npmjs.org/@alvarez-j2/envguard/-/envguard-0.1.2.tgz","fileCount":7,"unpackedSize":16594,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGqNJdbAXJDsMSebGKNqn9VHfqpXg0qHojPnBwTblSwUAiBUf/VFCcIJEu2l4qZPMSyM5ZV8pOlUP1umKYdUKlEiYQ=="}]},"_npmUser":{"name":"alvarez-j2","email":"edujoel125@outlook.com"},"directories":{},"maintainers":[{"name":"alvarez-j2","email":"edujoel125@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/envguard_0.1.2_1786542456878_0.08084684691062582"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T13:26:08.741Z","modified":"2026-08-12T13:47:37.299Z","0.1.0":"2026-08-12T13:26:09.026Z","0.1.1":"2026-08-12T13:36:29.767Z","0.1.2":"2026-08-12T13:47:37.074Z"},"license":"MIT","keywords":["env","dotenv","cli","ci"],"description":"Small CLI that checks process.env usage against .env.example.","maintainers":[{"name":"alvarez-j2","email":"edujoel125@outlook.com"}],"readme":"# envguard\n\nSmall npm CLI that checks whether environment variables referenced in source code\nare documented in `.env.example`.\n\n## Usage\n\n```sh\nnpx @alvarez-j2/envguard\nnpx @alvarez-j2/envguard ./src\nnpx @alvarez-j2/envguard --example-file .env.local.example ./src\n```\n\n`envguard` recursively scans JavaScript and TypeScript files for\n`process.env.VARIABLE_NAME`, reads variable names from an example env file, and\nexits with status code `1` when referenced variables are missing from that file.\nWhen a directory argument is provided, `envguard` scans that directory and looks\nfor the nearest `.env.example` starting from that directory and walking upward.\nUse `--env-file <name>` to check a different file name, such as\n`.env.local.example`. EnvGuard also supports `--example-file <name>`, which is\nrecommended when running through `npx` on modern Node versions.\n\n`--env-file` is also a Node.js runtime flag in modern Node versions. When using\n`npx` or an npm-generated shim, use `--example-file` to avoid that collision, or\nplace `--` before EnvGuard's `--env-file` flag.\nWhen running the compiled CLI directly with Node, use:\n\n```sh\nnode -- ./dist/cli.js --env-file .env.local.example ./src\n```\n\n## Testing a Published Version Locally\n\nIf you run `npx @alvarez-j2/envguard@<version>` from inside this package's own\nsource directory, npm may resolve the current folder as the requested package.\nOn Windows that can fail before EnvGuard starts because the root package does\nnot have a generated `node_modules/.bin/envguard.cmd` shim.\n\nRun the published package from another directory, or pass npm a different\nexecution prefix:\n\n```sh\nnpx --yes --prefix C:\\Users\\Owner\\projects @alvarez-j2/envguard@0.1.2 --example-file .env.local.example C:\\Users\\Owner\\projects\\Elevate\n```\n\nThe scanner ignores `node_modules`, `.git`, `dist`, `build`, and `.next`.\n\n## Development\n\n```sh\nnpm install\nnpm test\n```\n\nThe implementation is intentionally small:\n\n- `src/envguard.ts` contains scanning, `.env.example` parsing, and comparison logic.\n- `src/cli.ts` handles arguments, printing, and exit codes.\n- `test/envguard.test.js` tests the real compiled package output.\n\nThe detector focuses on direct dot notation, like `process.env.API_URL`. Dynamic\naccess such as `process.env[\"API_URL\"]` is intentionally out of scope.\n","readmeFilename":"README.md"}