{"_id":"@atishpaul/envcheck-cli","_rev":"2-b6fc48a6ebf372842f4cab4ca5577baa","name":"@atishpaul/envcheck-cli","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@atishpaul/envcheck-cli","version":"1.0.0","keywords":["env","environment","config","validation","dotenv","env-check"],"author":{"url":"https://flenco.in","name":"Atish Paul","email":"atish@flenco.in"},"license":"MIT","_id":"@atishpaul/envcheck-cli@1.0.0","maintainers":[{"name":"atishpaul","email":"atishpaul01@gmail.com"}],"homepage":"https://github.com/atishpaul/env-check#readme","bugs":{"url":"https://github.com/atishpaul/env-check/issues"},"bin":{"envcheck":"bin/cli.js","envcheck-cli":"bin/cli.js"},"dist":{"shasum":"4747a037237a8321ab611710d18503124bcdc13c","tarball":"https://registry.npmjs.org/@atishpaul/envcheck-cli/-/envcheck-cli-1.0.0.tgz","fileCount":5,"integrity":"sha512-KeOkrDRCDVu/7cITKLuiQpNPuaFMTj3zArxKbP5sCA0KKSPBh8dZ3zOC37H4bBG0Bzjv2SkxHxh3dK8bsyKr9g==","signatures":[{"sig":"MEUCIBU7ztBV+3dCUb5fyRSQLKSUoyNm3ml/1xwuNrxgCFiOAiEA7xLF2RJvd/kPWdeqsjleg/cvGkAn6t5UaOFnz6EsHQM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12112},"main":"src/index.js","engines":{"node":">=14.0.0"},"gitHead":"d4b4f04deaedd5cb1c591ccc3549378584192d68","scripts":{"demo":"node demo.js","test":"node test/test.js"},"_npmUser":{"name":"atishpaul","email":"atishpaul01@gmail.com"},"repository":{"url":"git+https://github.com/atishpaul/env-check.git","type":"git"},"_npmVersion":"10.9.3","description":"Environment config verifier - compare and validate .env files across environments","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/envcheck-cli_1.0.0_1763046480623_0.9716589941463618","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@atishpaul/envcheck-cli","version":"1.0.1","description":"Environment config verifier - compare and validate .env files across environments","main":"src/index.js","bin":{"envcheck":"bin/cli.js","envcheck-cli":"bin/cli.js"},"scripts":{"test":"node test/test.js","demo":"node demo.js"},"keywords":["env","environment","config","validation","dotenv","env-check"],"author":{"name":"Atish Paul","email":"atish@flenco.in","url":"https://flenco.in"},"license":"MIT","engines":{"node":">=14.0.0"},"repository":{"type":"git","url":"git+https://github.com/flenco-in/env-check.git"},"bugs":{"url":"https://github.com/flenco-in/env-check/issues"},"homepage":"https://github.com/flenco-in/env-check#readme","_id":"@atishpaul/envcheck-cli@1.0.1","gitHead":"db1e54c0d4c8a4afc78f24602c28d8d0560a9034","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-1PeuMuM2NllS5scYPWS+amTkrSTCprmgaP46R7m6+D8DWvWHVq+pd5DrzcM2Xwv1UuMiLbh7pTGM/V2p/ocVCw==","shasum":"bfa3b4da8108f419f8e84479eccc716508054bb7","tarball":"https://registry.npmjs.org/@atishpaul/envcheck-cli/-/envcheck-cli-1.0.1.tgz","fileCount":5,"unpackedSize":12112,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEWQ9VUpb1fLYGIxWz6WlSbHrYRwE/hzvgRFUlgEkHTmAiEAo4pK09UPvXk2xUAb77/mIFEa1ujaaDezgrTDUgUEVh0="}]},"_npmUser":{"name":"atishpaul","email":"atishpaul01@gmail.com"},"directories":{},"maintainers":[{"name":"atishpaul","email":"atishpaul01@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/envcheck-cli_1.0.1_1763046727688_0.8139588650246996"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-13T15:08:00.553Z","modified":"2025-11-13T15:12:08.060Z","1.0.0":"2025-11-13T15:08:00.813Z","1.0.1":"2025-11-13T15:12:07.862Z"},"bugs":{"url":"https://github.com/flenco-in/env-check/issues"},"author":{"name":"Atish Paul","email":"atish@flenco.in","url":"https://flenco.in"},"license":"MIT","homepage":"https://github.com/flenco-in/env-check#readme","keywords":["env","environment","config","validation","dotenv","env-check"],"repository":{"type":"git","url":"git+https://github.com/flenco-in/env-check.git"},"description":"Environment config verifier - compare and validate .env files across environments","maintainers":[{"name":"atishpaul","email":"atishpaul01@gmail.com"}],"readme":"# @atishpaul/envcheck-cli\n\n<div align=\"center\">\n  <a href=\"https://flenco.in\" target=\"_blank\">\n    <img src=\"https://flenco.in/wp-content/uploads/2023/09/cropped-flenco-2023.png\" alt=\"Flenco\" width=\"200\"/>\n  </a>\n  \n  <p><strong>Environment Config Verifier</strong></p>\n  <p>Compare and validate .env files across environments - catch config drift before it breaks production</p>\n\n  [![npm version](https://img.shields.io/npm/v/@atishpaul/envcheck-cli.svg)](https://www.npmjs.com/package/@atishpaul/envcheck-cli)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n  <a href=\"https://www.buymeacoffee.com/atishpaul\" target=\"_blank\">\n    <img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"50\">\n  </a>\n</div>\n\n---\n\n## 🚀 Quick Start\n\n```bash\nnpx @atishpaul/envcheck-cli\n```\n\nThat's it! Run it in any directory with `.env` files.\n\n## 📦 Installation\n\n### Use directly with npx (recommended)\n```bash\nnpx @atishpaul/envcheck-cli\n```\n\n### Or install globally\n```bash\nnpm install -g @atishpaul/envcheck-cli\nenvcheck\n```\n\n### Or install as dev dependency\n```bash\nnpm install --save-dev @atishpaul/envcheck-cli\n```\n\n## 🎯 What It Does\n\n- ✅ Compares `.env`, `.env.example`, `.env.prod`, `.env.staging`, etc.\n- ✅ Detects missing or extra variables across environments\n- ✅ Validates variable types (number, URL, email, boolean, etc.)\n- ✅ Generates a pretty, easy-to-read report\n- ✅ Zero dependencies - works standalone\n- ✅ Perfect for CI/CD pipelines\n\n## 📖 Example Output\n\n### When Issues Are Found ❌\n\n```\n🔍 Environment Config Check\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nFound 3 file(s): .env.example, .env, .env.prod\nTotal unique keys: 11\n\n❌ Missing Variables:\n   DATABASE_URL\n      Missing in: .env.prod\n   REDIS_URL\n      Missing in: .env.prod\n\n⚠️  Type Mismatches:\n   PORT\n      .env: number\n      .env.prod: string\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nSummary: 2 missing, 1 type mismatches\n```\n\n### When Everything Is OK ✅\n\n```\n🔍 Environment Config Check\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nFound 2 file(s): .env, .env.prod\nTotal unique keys: 5\n\n✅ All environment files are consistent!\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nSummary: 0 missing, 0 type mismatches\n```\n\n## 🔧 Usage\n\n### CLI\n\n```bash\n# Check current directory\nnpx @atishpaul/envcheck-cli\n\n# Add to package.json scripts\n{\n  \"scripts\": {\n    \"check:env\": \"@atishpaul/envcheck-cli\"\n  }\n}\n\nnpm run check:env\n```\n\n### CI/CD Integration\n\n**GitHub Actions:**\n```yaml\n- name: Check environment config\n  run: npx @atishpaul/envcheck-cli\n```\n\n**GitLab CI:**\n```yaml\ncheck-env:\n  script:\n    - npx @atishpaul/envcheck-cli\n```\n\n**Pre-commit Hook:**\n```json\n{\n  \"husky\": {\n    \"hooks\": {\n      \"pre-commit\": \"@atishpaul/envcheck-cli\"\n    }\n  }\n}\n```\n\n### Programmatic Usage\n\n```javascript\nconst { checkEnvFiles } = require('@atishpaul/envcheck-cli');\n\nconst result = checkEnvFiles('./path/to/dir');\n\nif (result.hasErrors) {\n  console.log('Issues found:', result.issues);\n  console.log(result.report);\n}\n```\n\n## 📁 Supported Files\n\nAutomatically detects and compares:\n- `.env`\n- `.env.local`\n- `.env.development`\n- `.env.production`\n- `.env.prod`\n- `.env.staging`\n- `.env.test`\n- `.env.example`\n- Any file starting with `.env`\n\n## 🔍 Type Detection\n\nAutomatically detects:\n- **number** - Pure digits (e.g., `3000`)\n- **boolean** - `true` or `false`\n- **url** - Starts with `http://` or `https://`\n- **email** - Valid email format\n- **ip** - IP address format\n- **string** - Everything else\n\nType mismatches are reported as warnings, not errors.\n\n## 🎯 Why @atishpaul/envcheck-cli?\n\n**The Problem:**\n- Dev teams constantly break staging/prod due to environment config drift\n- Missing `.env` variables cause runtime errors\n- No easy way to validate consistency across environments\n- Manual checking is tedious and error-prone\n\n**The Solution:**\n- Automated validation in seconds\n- Catches issues before deployment\n- Works in CI/CD pipelines\n- Zero configuration needed\n\n## 🤝 Contributing\n\nContributions are welcome! Feel free to open issues or submit PRs.\n\n## 📄 License\n\nMIT © [Atish Paul](https://github.com/atishpaul)\n\n## 👨‍💻 Author\n\n**Atish Paul**\n\n- Website: [Flenco.in](https://flenco.in)\n- Buy me a coffee: [@atishpaul](https://www.buymeacoffee.com/atishpaul)\n\n---\n\n<div align=\"center\">\n  Made with ❤️ by <a href=\"https://flenco.in\">Flenco</a>\n</div>\n","readmeFilename":"README.md"}