{"_id":"@amitwaks/checkmyenv","_rev":"2-8b02e7d030c8b6b2671b71e343ca8fbd","name":"@amitwaks/checkmyenv","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@amitwaks/checkmyenv","version":"1.0.0","keywords":["env","dotenv","validation","environment","cli","config"],"license":"MIT","_id":"@amitwaks/checkmyenv@1.0.0","maintainers":[{"name":"amitwaks","email":"amitwaks@gmail.com"}],"homepage":"https://github.com/amitwaks/checkmyenv","bugs":{"url":"https://github.com/amitwaks/checkmyenv/issues"},"bin":{"checkmyenv":"bin/cli.js"},"dist":{"shasum":"9f2e7f14bd5000f32bc9cb0d292ab2b8a530f160","tarball":"https://registry.npmjs.org/@amitwaks/checkmyenv/-/checkmyenv-1.0.0.tgz","fileCount":15,"integrity":"sha512-ULGoqa9lXr4LNlkM8gx0cgp7cxl2+D+PJE0jQHmA5QEWInYPUOY5JVx0dEmA5dWNVjXDyhmSjTIIeK91AS0p7A==","signatures":[{"sig":"MEQCIFysc7dgK3A/QvbSo7Z5uY9bUIlyvpnmD0T+ubE5XSzFAiB7vD7isOyt33xJDBHzCyhKIdjnBd+oPFi1MqdkNGRP6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19218},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"funding":"https://github.com/sponsors/amitwaks","scripts":{"test":"node --test dist/*.test.js","build":"tsc","prepublish":"npm run build"},"_npmUser":{"name":"amitwaks","email":"amitwaks@gmail.com"},"repository":{"url":"git+https://github.com/amitwaks/checkmyenv.git","type":"git"},"_npmVersion":"11.14.1","description":"Validate .env files against a JSON schema — catch misconfiguration before it reaches production","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/checkmyenv_1.0.0_1779694684221_0.8926003933931108","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to env-haven — use env-haven instead"}},"time":{"created":"2026-05-25T07:38:04.125Z","modified":"2026-05-25T08:54:09.600Z","1.0.0":"2026-05-25T07:38:04.362Z"},"bugs":{"url":"https://github.com/amitwaks/checkmyenv/issues"},"license":"MIT","homepage":"https://github.com/amitwaks/checkmyenv","keywords":["env","dotenv","validation","environment","cli","config"],"repository":{"url":"git+https://github.com/amitwaks/checkmyenv.git","type":"git"},"description":"Validate .env files against a JSON schema — catch misconfiguration before it reaches production","maintainers":[{"name":"amitwaks","email":"amitwaks@gmail.com"}],"readme":"# checkmyenv\n\nValidate `.env` files against a JSON schema. Catches misconfiguration before it reaches production.\n\n## Quick start\n\n```bash\nnpm install -g checkmyenv\n```\n\nCreate a `checkmyenv.config.json` in your project root:\n\n```json\n{\n  \"vars\": {\n    \"PORT\": {\n      \"type\": \"number\",\n      \"required\": true,\n      \"format\": \"port\",\n      \"default\": 3000,\n      \"description\": \"Server port\"\n    },\n    \"DATABASE_URL\": {\n      \"type\": \"string\",\n      \"required\": true,\n      \"format\": \"url\"\n    }\n  }\n}\n```\n\nRun:\n\n```bash\ncheckmyenv\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `checkmyenv` | Validate `.env` against `checkmyenv.config.json` |\n| `checkmyenv generate` | Generate `.env.example` from config |\n| `checkmyenv types` | Generate TypeScript type definitions (`env.d.ts`) |\n| `checkmyenv --json` | Output validation as JSON |\n| `checkmyenv --help` | Show help |\n| `checkmyenv --version` | Show version |\n\n## Schema reference\n\n### Per-variable options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `type` | `string \\| number \\| boolean \\| integer` | Expected type |\n| `required` | `boolean` | Fail if not set and no default |\n| `default` | `string \\| number \\| boolean` | Fallback if not set |\n| `description` | `string` | Human-readable description |\n| `format` | `url \\| email \\| port \\| uuid \\| hostname \\| path \\| regexp` | Value format validation |\n| `enum` | `array` | Allow-list of valid values |\n| `pattern` | `string` | Regex pattern to match |\n| `min` | `number` | Minimum (length for strings, value for numbers) |\n| `max` | `number` | Maximum (length for strings, value for numbers) |\n\n### Config file locations (checked in order)\n\n- `checkmyenv.config.json`\n- `.checkmyenvrc`\n- `.checkmyenvrc.json`\n- `checkmyenv.config.jsonc`\n\n## Exit codes\n\n- `0` — All variables valid\n- `1` — One or more variables failed validation\n\n## API\n\n```typescript\nimport { loadConfig, parseEnvFile, validateAll, formatReport } from \"checkmyenv\";\n\nconst config = loadConfig(\"checkmyenv.config.json\");\nconst env = parseEnvFile(\".env\");\nconst results = validateAll(env, config);\nconsole.log(formatReport({ passed: true, results, summary }));\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}