{"_id":"@elilands/env-guardian","name":"@elilands/env-guardian","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@elilands/env-guardian","version":"1.0.0","description":"A high-performance CLI for scanning, validating, and syncing .env files.","main":"./dist/index.js","type":"module","bin":{"env-guardian":"dist/index.js"},"scripts":{"dev":"tsx watch src/index.ts","build":"tsup","start":"node dist/index.js","test":"vitest run","test:watch":"vitest watch","lint":"eslint src/","format":"prettier --write \"src/**/*.ts\""},"engines":{"node":">=18.0.0"},"keywords":["env","dotenv","cli","validator","security"],"author":{"name":"GitHub Master"},"license":"ISC","dependencies":{"cac":"^7.0.0","dotenv":"^17.3.1","fast-glob":"^3.3.3","picocolors":"^1.1.1","zod":"^4.3.6"},"devDependencies":{"@types/node":"^25.4.0","@vitest/coverage-v8":"^4.0.18","eslint":"^10.0.3","prettier":"^3.8.1","tsup":"^8.5.1","tsx":"^4.21.0","typescript":"^5.9.3","vitest":"^4.0.18"},"gitHead":"ce27d006d51ecb48baf1d59701b1ca1279178e4f","_id":"@elilands/env-guardian@1.0.0","_nodeVersion":"22.15.1","_npmVersion":"11.10.0","dist":{"integrity":"sha512-4Mz3YdCJY4aNLFaUta0175Pj50GSiN2/jfoIPR2j3X5hqb0p0WWW0GWq9sFuLKYKmRb062fY5guoG0ypLoEkFg==","shasum":"0657a7bab0895b85a33c62589d18d1ed3e0f266b","tarball":"https://registry.npmjs.org/@elilands/env-guardian/-/env-guardian-1.0.0.tgz","fileCount":4,"unpackedSize":31692,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHf4eMDTS3ETxlSi0fXkBv4Kox59Hz9cerew9lRrpbOXAiBaZMu/ynHZacGU0RXYd4+oB17lPSvkGpvm3fG+I+UMVQ=="}]},"_npmUser":{"name":"elilands","email":"elian.mejiag@gmail.com"},"directories":{},"maintainers":[{"name":"elilands","email":"elian.mejiag@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/env-guardian_1.0.0_1773103820908_0.8675001967453664"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T00:50:20.802Z","1.0.0":"2026-03-10T00:50:21.092Z","modified":"2026-03-10T00:50:21.312Z"},"maintainers":[{"name":"elilands","email":"elian.mejiag@gmail.com"}],"description":"A high-performance CLI for scanning, validating, and syncing .env files.","keywords":["env","dotenv","cli","validator","security"],"author":{"name":"GitHub Master"},"license":"ISC","readme":"# 🛡️ env-guardian\r\n\r\n> The elite, lightning-fast CLI to keep your environment variables perfectly synced. \r\n\r\nEver pushed a broken app to production because you forgot to add a new environment variable to your `.env` file? We've all been there. \r\n\r\n**env-guardian** scans your actual source code, finds every `process.env` variable you are using, and cross-references them with your local `.env` and `.env.example` files. It tells you what's missing, what's empty, and can even fix your template files automatically.\r\n\r\n---\r\n\r\n## ✨ Features\r\n\r\n- **🧠 Smart Scanning:** Reads your codebase in milliseconds to find exactly what environment variables your code actually needs.\r\n- **🔍 Catch Missing Variables:** Alerts you if your local `.env` is missing variables required by your code.\r\n- **🛡️ Value Validation:** Detects if you accidentally left an active `.env` variable empty.\r\n- **🔧 Auto-Fix Magic:** Run with `--fix` and it will automatically append missing variables to your `.env.example` safely (with empty values), so you never leak secrets.\r\n- **⚡ Blazing Fast:** Built with modern TypeScript, ESM, and asynchronous parallel reading.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\nYou don't need to install it globally if you don't want to. You can run it directly using your favorite package manager:\r\n\r\n```bash\r\n# Using NPM\r\nnpx env-guardian validate\r\n\r\n# Using PNPM\r\npnpm dlx env-guardian validate\r\n\r\n# Using Yarn\r\nyarn dlx env-guardian validate\r\n```\r\n\r\n*Want to add it to your project's CI/CD pipeline? Install it as a dev dependency:*\r\n\r\n```bash\r\nnpm install -D env-guardian\r\n```\r\n\r\n---\r\n\r\n## 🚀 Usage\r\n\r\n`env-guardian` is designed to be ridiculously simple. Just open your terminal in your project folder and run:\r\n\r\n### 1. Validate & Sync (The Command You Want)\r\nThis cross-references your code with your `.env` files and tells you what's wrong.\r\n\r\n```bash\r\nnpx env-guardian validate\r\n```\r\n\r\n**Want to automatically update your `.env.example`?**\r\nJust add the `--fix` flag. It will safely add any missing keys without touching your existing comments or formatting.\r\n\r\n```bash\r\nnpx env-guardian validate --fix\r\n```\r\n\r\n### 2. Just Scan\r\nIf you only want to see a list of the variables your project is currently using (without checking the `.env` files), use the scan command:\r\n\r\n```bash\r\nnpx env-guardian scan\r\n```\r\n\r\n### 3. Ignore Folders\r\nBy default, `env-guardian` ignores `node_modules`, `.git`, and build folders like `dist` or `.next`. If you have a massive monorepo and want to skip a specific folder to make it even faster, use `--ignore`:\r\n\r\n```bash\r\nnpx env-guardian validate --ignore \"**/legacy-app/**\"\r\n```\r\n\r\n---\r\n\r\n## 🤝 Contributing\r\n\r\nFound a bug or have an idea to make this better? PRs are always welcome! \r\n\r\n1. Clone the repo.\r\n2. Run `npm install`.\r\n3. Make your changes in the `src/` directory.\r\n4. Run `npm run test` to make sure the core regex engine is still happy.\r\n5. Submit your PR!\r\n\r\n## 📄 License\r\nISC License. See `package.json` for details. Built for developers, by developers.","readmeFilename":"README.md","_rev":"1-16ac684fb68e5dd064ac0bd08ec9f728"}