{"id":34607501,"url":"https://github.com/exprays/greenlightci-cli","last_synced_at":"2026-06-05T07:31:08.574Z","repository":{"id":318047478,"uuid":"1069818542","full_name":"exprays/greenlightci-cli","owner":"exprays","description":"A command line tool for checking Baseline web features","archived":false,"fork":false,"pushed_at":"2025-10-04T18:08:49.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T19:18:53.047Z","etag":null,"topics":["baseline","commanderjs","typescript","web-features"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/exprays.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T17:22:25.000Z","updated_at":"2025-10-04T18:11:27.000Z","dependencies_parsed_at":"2025-10-04T19:29:16.261Z","dependency_job_id":null,"html_url":"https://github.com/exprays/greenlightci-cli","commit_stats":null,"previous_names":["exprays/greenlightci-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/exprays/greenlightci-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fgreenlightci-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fgreenlightci-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fgreenlightci-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fgreenlightci-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exprays","download_url":"https://codeload.github.com/exprays/greenlightci-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fgreenlightci-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33934402,"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-05T02:00:06.157Z","response_time":120,"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":["baseline","commanderjs","typescript","web-features"],"created_at":"2025-12-24T13:59:26.859Z","updated_at":"2026-06-05T07:31:08.568Z","avatar_url":"https://github.com/exprays.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚦 GreenLightCI CLI\n\nA command-line tool for checking Baseline web feature compatibility in your local projects.\n\n## 🎯 Features\n\n- ✅ **Local file scanning** - Detect web features in CSS, JS, and framework files\n- 👀 **Watch mode** - Continuously monitor files for changes\n- 📊 **Rich terminal output** - Colored, formatted compatibility reports\n- 💻 **Feature-rich Dashboard** - A one stop solution for all the projects and reports and trends\n- 📄 **HTML reports** - Generate detailed compatibility reports\n- 🎨 **Multiple file types** - Supports CSS, SCSS, JS, TS, JSX, TSX, Vue, Svelte\n- ⚡ **Fast scanning** - Efficiently scan large codebases\n\n## 📦 Installation\n\n```bash\n# Install globally\nnpm install -g @greenlightci/cli\n\n# Or use with npx\nnpx @greenlightci/cli check\n```\n\n## 🚀 Usage\n\n### Check Command\n\nScan your project for Baseline compatibility issues:\n\n```bash\n# Check current directory\ngreenlightci check\n\n# Check specific directory\ngreenlightci check ./src\n\n# Check with custom options\ngreenlightci check --target-year 2024 --block-newly --verbose\n\n# Output as JSON\ngreenlightci check --json \u003e report.json\n```\n\n**Options:**\n\n- `-t, --target-year \u003cyear\u003e` - Target Baseline year (default: 2023)\n- `--block-newly` - Block newly available features\n- `--block-limited` - Block limited availability features\n- `--json` - Output results as JSON\n- `--verbose` - Show detailed output\n- `--include \u003cpatterns\u003e` - File patterns to include (comma-separated)\n- `--exclude \u003cpatterns\u003e` - File patterns to exclude (comma-separated)\n\n### With Dashboard\n\n```bash\ngreenlightci check ./src --dashboard-url https://greenlightci-dashboard.vercel.app --dashboard-api-key your-api-key\n```\n\nTo obtain the api key sign-in to the dashboard at https://greenlightci-dashboard.vercel.app with github and then go to settings to obtain the api key.\n\n### Watch Mode\n\nContinuously monitor files for changes:\n\n```bash\n# Watch current directory\ngreenlightci watch\n\n# Watch specific directory\ngreenlightci watch ./src\n\n# Watch with custom patterns\ngreenlightci watch --include \"src/**/*.{js,css}\" --exclude \"node_modules/**\"\n```\n\n**Options:**\n\n- `-t, --target-year \u003cyear\u003e` - Target Baseline year\n- `--block-newly` - Block newly available features\n- `--block-limited` - Block limited availability features\n- `--include \u003cpatterns\u003e` - File patterns to include\n- `--exclude \u003cpatterns\u003e` - File patterns to exclude\n\n### Report Command\n\nGenerate a detailed compatibility report:\n\n```bash\n# Generate HTML report\ngreenlightci report\n\n# Generate JSON report\ngreenlightci report --format json --output report.json\n\n# Generate report for specific directory\ngreenlightci report ./src --output dist/baseline-report.html\n```\n\n**Options:**\n\n- `-t, --target-year \u003cyear\u003e` - Target Baseline year\n- `-o, --output \u003cfile\u003e` - Output file path (default: baseline-report.html)\n- `--format \u003ctype\u003e` - Output format: html or json (default: html)\n- `--include \u003cpatterns\u003e` - File patterns to include\n- `--exclude \u003cpatterns\u003e` - File patterns to exclude\n\n## 📊 Example Output\n\n### Check Command\n\n```\n🚦 GreenLightCI - Baseline Compatibility Check\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nsrc/styles/main.css [85/100]\n  ✓ CSS Grid - Widely Available\n  ⚠ Container Queries - Newly Available\n  ⚠ CSS Nesting - Newly Available\n\nsrc/components/Button.tsx [92/100]\n  ✓ Optional Chaining - Widely Available\n  ✓ Nullish Coalescing - Widely Available\n\n📊 Scan Summary\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nFiles Scanned:      15\nFeatures Detected:  32\nBlocking Issues:    0\nWarnings:           5\nAverage Score:      88\n\n█████████████████░░░ 88%\n\n⚠ Found 5 warnings\n  Consider adding polyfills for better compatibility\n```\n\n### Watch Mode\n\n```\n👀 GreenLightCI - Watch Mode\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nℹ Watching: ./src\nℹ Target Year: 2023\nℹ Press Ctrl+C to stop\n\n✓ Initial scan complete. Watching for changes... (24 files)\n\n[10:45:23] changed src/styles/main.css\n  Score: 85/100 | Features: 3\n  ⚠ Container Queries - ⚠ Newly Available\n  ⚠ CSS Nesting - ⚠ Newly Available\n⚠ Consider adding polyfills\n```\n\n## 🎨 Supported Features\n\n### CSS Features\n\n- Container Queries (`@container`)\n- `:has()` Selector\n- CSS Grid\n- Subgrid\n- CSS Nesting\n- Custom Properties (CSS Variables)\n- Logical Properties\n\n### JavaScript Features\n\n- Optional Chaining (`?.`)\n- Nullish Coalescing (`??`)\n- Dynamic Import\n- Top-level Await\n- Private Fields\n\n## 🔧 Configuration\n\nYou can create a `.greenlightrc.json` file in your project root:\n\n```json\n{\n  \"targetYear\": \"2023\",\n  \"blockNewly\": false,\n  \"blockLimited\": true,\n  \"include\": [\"src/**/*.{css,js,ts}\"],\n  \"exclude\": [\"node_modules/**\", \"dist/**\"]\n}\n```\n\n## 📄 File Support\n\nSupported file extensions:\n\n- **CSS**: `.css`, `.scss`, `.less`\n- **JavaScript**: `.js`, `.ts`, `.jsx`, `.tsx`\n- **Frameworks**: `.vue`, `.svelte`\n\n## 💡 Tips\n\n1. **Use watch mode during development** - Get instant feedback on compatibility\n2. **Generate reports before releases** - Create HTML reports for stakeholders\n3. **Integrate with CI/CD** - Use JSON output for automated checks\n4. **Customize patterns** - Focus on specific directories with include/exclude\n5. **Use verbose mode** - Get detailed information about each feature\n6. **Use Dashboard** - Get your reports saved to greenlight dashboard\n\n## 🤝 Integration\n\n### NPM Scripts\n\nAdd to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"baseline:check\": \"greenlightci check\",\n    \"baseline:watch\": \"greenlightci watch\",\n    \"baseline:report\": \"greenlightci report\"\n  }\n}\n```\n\n### Pre-commit Hook\n\n```bash\n# .husky/pre-commit\n#!/bin/sh\nnpx greenlightci check --block-newly --block-limited\n```\n\n### CI/CD Pipeline\n\n```yaml\n# .github/workflows/baseline-check.yml\n- name: Check Baseline Compatibility\n  run: |\n    npm install -g @greenlightci/cli\n    greenlightci check --json \u003e baseline-report.json\n```\n\n## 📚 Related Packages\n\n- **[@greenlightci/action](https://github.com/exprays/greenlightci-action)** - GitHub Action for PR checks\n- **[@greenlightci/dashboard](https://github.com/exprays/greenlightci-dashboard)** - Web dashboard for tracking adoption\n\n## 📝 License\n\nMIT\n\n## 🐛 Issues\n\nReport issues on [GitHub](https://github.com/exprays/greenlightci/issues)\n\n## 🙏 Credits\n\nBuilt with:\n\n- [Commander.js](https://github.com/tj/commander.js) - CLI framework\n- [Chalk](https://github.com/chalk/chalk) - Terminal colors\n- [Ora](https://github.com/sindresorhus/ora) - Terminal spinners\n- [Chokidar](https://github.com/paulmillr/chokidar) - File watching\n- [web-features](https://github.com/web-platform-dx/web-features) - Baseline data\n\n---\n\nMade with ❤️ by Surya for the Baseline Tooling Hackathon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexprays%2Fgreenlightci-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexprays%2Fgreenlightci-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexprays%2Fgreenlightci-cli/lists"}