{"id":18497642,"url":"https://github.com/schadokar/scan-env","last_synced_at":"2025-10-28T08:13:49.568Z","repository":{"id":113983036,"uuid":"405589750","full_name":"schadokar/scan-env","owner":"schadokar","description":"Scan Env is a simple npm package that scan required environment variables in the .env file.","archived":false,"fork":false,"pushed_at":"2023-01-30T05:53:45.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T19:44:32.474Z","etag":null,"topics":["dotenv","environment-variables"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schadokar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-12T08:38:01.000Z","updated_at":"2023-07-15T09:29:41.000Z","dependencies_parsed_at":"2023-06-26T01:50:38.817Z","dependency_job_id":null,"html_url":"https://github.com/schadokar/scan-env","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"fb8580fe491eb28beda133b10581f8705110bb10"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fscan-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fscan-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fscan-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schadokar%2Fscan-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schadokar","download_url":"https://codeload.github.com/schadokar/scan-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949659,"owners_count":21023364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotenv","environment-variables"],"created_at":"2024-11-06T13:35:10.915Z","updated_at":"2025-10-28T08:13:49.453Z","avatar_url":"https://github.com/schadokar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scan Env\r\n\r\nScan Env is a simple npm package which reads required environment variables\r\nfrom `.env.example` and scan those in `.env`. It uses `dotenv` in background to load the `.env` file.\r\n\r\nIt returns a boolean.\r\n\r\n[npm package link](https://www.npmjs.com/package/scan-env)\r\n\r\n## Install\r\n\r\n```\r\nnpm install scan-env\r\n```\r\n\r\n## Use\r\n\r\n### With default files\r\n\r\n- Environment File Name: `.env`\r\n- Env Example File Name: `.env.example`\r\n- Env Ignored File Name: `.envignore`\r\n\r\n```js\r\nconst scanEnv = require(\"scan-env\");\r\n\r\nconst scanResult = scanEnv();\r\n\r\nif (!scanResult) {\r\n  console.error(\"Environment variables are missing.\");\r\n}\r\n```\r\n\r\n### With custom files\r\n\r\n- Environment File Name: `.prod.env`\r\n- Env Example File Name: `.prod.env.example`\r\n- Env Ignored File Name: `.prod.envignore`\r\n\r\n```js\r\nconst scanEnv = require(\"scan-env\");\r\n\r\nconst scanResult = scanEnv(\".prod.env\", \".prod.env.example\", \".prod.envignore\");\r\n\r\nif (!scanResult) {\r\n  console.error(\"Environment variables are missing.\");\r\n}\r\n```\r\n\r\n## File Details\r\n\r\n- `.env` file saves the original environment values.\r\n- `.env.example` list all the env keys required by the application. Syntax of this env file must be like `.env`.\r\n- `.envignore` list all the env keys which can be ignored if are missing.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschadokar%2Fscan-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschadokar%2Fscan-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschadokar%2Fscan-env/lists"}