{"id":31057290,"url":"https://github.com/shadowslayer03/greenlight-cli","last_synced_at":"2026-01-20T17:30:36.525Z","repository":{"id":308756792,"uuid":"1034019953","full_name":"ShadowSlayer03/GreenLight-CLI","owner":"ShadowSlayer03","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-07T18:50:03.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-07T19:00:26.102Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShadowSlayer03.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-08-07T17:56:54.000Z","updated_at":"2025-08-07T18:50:06.000Z","dependencies_parsed_at":"2025-08-07T19:00:28.818Z","dependency_job_id":"50ae2ba5-ec5c-4667-8e80-2f4906d025de","html_url":"https://github.com/ShadowSlayer03/GreenLight-CLI","commit_stats":null,"previous_names":["shadowslayer03/greenlight-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ShadowSlayer03/GreenLight-CLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowSlayer03%2FGreenLight-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowSlayer03%2FGreenLight-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowSlayer03%2FGreenLight-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowSlayer03%2FGreenLight-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShadowSlayer03","download_url":"https://codeload.github.com/ShadowSlayer03/GreenLight-CLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowSlayer03%2FGreenLight-CLI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275219540,"owners_count":25425889,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"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":"2025-09-15T06:56:27.351Z","updated_at":"2026-01-20T17:30:36.449Z","avatar_url":"https://github.com/ShadowSlayer03.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **🟢 GreenLight CLI**\n\nSmart preflight checker for lint, build, test, and component validation — built for speed and precision.\n\n![Greenlight showcase](image.png)\n\n## **✨ Features**\n\n* ✅ Runs **lint**, **build**, **unit tests**, and **component tests** smartly  \n* 📂 Detects **impacted files** based on Git diffs  \n* 🚀 Optimized for **CI** and **pre-push hooks**  \n* 📊 Generates markdown reports  \n* 🧠 Smart targeting of Cypress component tests  \n* 🔐 No org needed — works for solo and team developers\n\n## **📦 Installation**\n\n```bash\nnpm install -g greenlight\n```\n\n## **🚀 Usage**\n\nRun all preflight checks:\n\n```bash\ngreenlight --smart\n```\n\nOnly run specific checks:\n\n```bash\ngreenlight --only lint  \ngreenlight --only build  \ngreenlight --only test  \ngreenlight --only component\n```\n\nMultiple:\n\n```bash\ngreenlight --only lint,test\n```\n\n## **💡 Example Workflow**\n\nAdd to a Husky pre-push hook:\n\n```bash\n#!/bin/sh  \n# Return early if we're in Jenkins  \n[ -n \"$JENKINS_URL\" ] \u0026\u0026 exit 0\n\n. \"$(dirname \"$0\")/_/husky.sh\"\n\n# Redirect stdout/stderr for Windows compatibility  \nif [ -t 2 ]; then  \n  exec \u003e/dev/tty 2\u003e\u00261  \nfi\n\necho \"🟢 Running GreenLight Smart Pre-Push Checks...\"\n\n# Run greenlight with smart detection  \nnpx greenlight --smart --secure --report\n\nSTATUS=$?  \nif [ $STATUS -ne 0 ]; then  \n  echo \"🔴 GreenLight check failed. Push aborted.\"  \n  exit 1  \nfi\n\necho \"✅ All pre-push checks passed. Proceeding with push.\"  \nexit 0\n```\n\n## **📁 Project Structure**\n\n```\ngreenlight/  \n├── bin/  \n│   └── greenlight.js          # CLI entry  \n├── core/  \n│   ├── dependencyGraph.js  \n│   ├── impactAnalyzer.js  \n│   ├── mdReportGenerator.js  \n│   ├── reporter.js  \n│   ├── runChecks.js  \n│   ├── securityChecks.js  \n│   └── updateCypressTargets.js  \n└── package.json\n```\n\n## **🙌 Note **\n\nThis project is maintained by ShadowSlayer03. Please feel free to open a new issue or submit a pull request on the repository. For direct inquiries, you can reach out at sslayer441@gmail.com.\n\nIf you find this tool helpful, please consider giving it a star on GitHub!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowslayer03%2Fgreenlight-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowslayer03%2Fgreenlight-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowslayer03%2Fgreenlight-cli/lists"}