{"id":20104812,"url":"https://github.com/theplenkov-npm/check","last_synced_at":"2026-06-08T08:03:37.701Z","repository":{"id":46139366,"uuid":"515081362","full_name":"theplenkov-npm/check","owner":"theplenkov-npm","description":"Check CLI","archived":false,"fork":false,"pushed_at":"2022-07-18T10:23:35.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-29T22:40:25.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/theplenkov-npm.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}},"created_at":"2022-07-18T07:38:06.000Z","updated_at":"2022-07-18T08:41:38.000Z","dependencies_parsed_at":"2022-09-06T05:30:18.696Z","dependency_job_id":null,"html_url":"https://github.com/theplenkov-npm/check","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/theplenkov-npm/check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplenkov-npm%2Fcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplenkov-npm%2Fcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplenkov-npm%2Fcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplenkov-npm%2Fcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theplenkov-npm","download_url":"https://codeload.github.com/theplenkov-npm/check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplenkov-npm%2Fcheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34053436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T17:44:52.959Z","updated_at":"2026-06-08T08:03:37.664Z","avatar_url":"https://github.com/theplenkov-npm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check Environment Variables (CLI)\n\nThis CLI was created having a specific case. I had a script like\n\n```\n\"prepare\":\"husky install\"\n```\n\nand I wanted to run it only during non-production install ( because husky was a dev dependency )\n\nSo then I thought - it would be nice to check environment variable NODE_ENV which is prefilled with production value in case of using --production flag for npm install\n\nThen I decided to solve this task in a generiс way with this module\n\n## Usage\n\nFor the mentioned above problem now my code looks like this:\n\n```\n\"prepare\":\"check NODE_ENV=production || husky install\"\n```\n\nSo as you see it's a very minimalistic implementation without complicated conditions or OS-dependent if statements but allowing to use any environment variable.\nYou can also wrap it to another script for reusability. Another trick is to use it via npx - thus you won't need to declare this module as a global depenendcy for your package.\n\n```\n    \"prepare\": \"npm run is-prod || husky install\",\n    \"is-prod\": \"npx -y check-env-cli NODE_ENV=production\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheplenkov-npm%2Fcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheplenkov-npm%2Fcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheplenkov-npm%2Fcheck/lists"}