@ai-lighthouse/cli 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +126 -53
  2. package/dist/index.js +2788 -12
  3. package/package.json +10 -4
  4. package/.ai-lighthouse/audit_example.com_2025-12-15T12-10-43.json +0 -183
  5. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-32-28.html +0 -743
  6. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-33-02.html +0 -757
  7. package/.ai-lighthouse/audit_github.com_2025-12-15T11-53-21.json +0 -168
  8. package/.ai-lighthouse/audit_github.com_2025-12-15T12-04-06.json +0 -168
  9. package/.ai-lighthouse/audit_github.com_2025-12-15T12-05-10.json +0 -168
  10. package/.ai-lighthouse/audit_github.com_2025-12-15T12-09-45.json +0 -168
  11. package/.ai-lighthouse/audit_github.com_2025-12-15T12-11-07.json +0 -168
  12. package/.ai-lighthouse/audit_github.com_2025-12-15T12-13-28.json +0 -168
  13. package/.ai-lighthouse/audit_github.com_2025-12-15T12-14-59.json +0 -205
  14. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-07.json +0 -205
  15. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-44.json +0 -205
  16. package/.ai-lighthouse/audit_github.com_2025-12-15T12-21-38.json +0 -205
  17. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-21.json +0 -205
  18. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-46.json +0 -205
  19. package/.ai-lighthouse/audit_github.com_2025-12-15T12-23-18.json +0 -205
  20. package/.ai-lighthouse/audit_github.com_2025-12-15T12-24-43.json +0 -205
  21. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-08.json +0 -168
  22. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-57.json +0 -168
  23. package/.ai-lighthouse/audit_github.com_2025-12-17T12-17-11.json +0 -168
  24. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-17.json +0 -168
  25. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-42.json +0 -168
  26. package/.ai-lighthouse/audit_github.com_2025-12-17T12-23-56.json +0 -168
  27. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-24.json +0 -168
  28. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-40.json +0 -168
  29. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-02.json +0 -168
  30. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-20.json +0 -168
  31. package/.ai-lighthouse/audit_github.com_2025-12-17T12-29-56.json +0 -168
  32. package/.ai-lighthouse/audit_github.com_2025-12-17T12-32-27.json +0 -168
  33. package/.ai-lighthouse/audit_github.com_2025-12-17T12-33-00.json +0 -168
  34. package/.ai-lighthouse/audit_github.com_2025-12-17T12-34-49.json +0 -168
  35. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-31.json +0 -168
  36. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-45.json +0 -168
  37. package/.ai-lighthouse/audit_tailwindcss.com_2025-12-15T12-12-01.json +0 -169
  38. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-08.json +0 -24
  39. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-23.json +0 -24
  40. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-41-34.json +0 -21
  41. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-09.json +0 -21
  42. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-45.json +0 -21
  43. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-02.json +0 -21
  44. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-26.json +0 -21
  45. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-47-46.json +0 -906
  46. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-50-27.json +0 -906
  47. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-52-59.json +0 -906
  48. package/.ai-lighthouse/crawl_github.com_2025-12-15T12-03-33.json +0 -28
  49. package/CLI_UI_README.md +0 -211
  50. package/EXAMPLES.md +0 -87
  51. package/IMPLEMENTATION.md +0 -215
  52. package/USAGE.md +0 -264
  53. package/WIZARD_GUIDE.md +0 -340
  54. package/bin/cli.js +0 -2
  55. package/dist/commands/audit-interactive.d.ts +0 -2
  56. package/dist/commands/audit-interactive.js +0 -106
  57. package/dist/commands/audit-wizard.d.ts +0 -2
  58. package/dist/commands/audit-wizard.js +0 -110
  59. package/dist/commands/audit.d.ts +0 -2
  60. package/dist/commands/audit.js +0 -940
  61. package/dist/commands/crawl.d.ts +0 -2
  62. package/dist/commands/crawl.js +0 -267
  63. package/dist/commands/report.d.ts +0 -2
  64. package/dist/commands/report.js +0 -304
  65. package/dist/index.d.ts +0 -1
  66. package/dist/ui/AuditReportUI.d.ts +0 -10
  67. package/dist/ui/AuditReportUI.js +0 -76
  68. package/dist/ui/SetupWizard.d.ts +0 -18
  69. package/dist/ui/SetupWizard.js +0 -179
  70. package/dist/ui/components/AIUnderstandingSection.d.ts +0 -6
  71. package/dist/ui/components/AIUnderstandingSection.js +0 -87
  72. package/dist/ui/components/HallucinationSection.d.ts +0 -6
  73. package/dist/ui/components/HallucinationSection.js +0 -84
  74. package/dist/ui/components/IssuesSection.d.ts +0 -6
  75. package/dist/ui/components/IssuesSection.js +0 -84
  76. package/dist/ui/components/MessageAlignmentSection.d.ts +0 -6
  77. package/dist/ui/components/MessageAlignmentSection.js +0 -108
  78. package/dist/ui/components/OverviewSection.d.ts +0 -6
  79. package/dist/ui/components/OverviewSection.js +0 -107
  80. package/dist/ui/components/ScoreDisplay.d.ts +0 -8
  81. package/dist/ui/components/ScoreDisplay.js +0 -41
  82. package/dist/ui/components/TechnicalSection.d.ts +0 -7
  83. package/dist/ui/components/TechnicalSection.js +0 -110
  84. package/dist/utils/comprehensive-formatter.d.ts +0 -5
  85. package/dist/utils/comprehensive-formatter.js +0 -370
  86. package/src/commands/audit-interactive.ts +0 -149
  87. package/src/commands/audit-wizard.ts +0 -137
  88. package/src/commands/audit.ts +0 -1012
  89. package/src/commands/crawl.ts +0 -307
  90. package/src/commands/report.ts +0 -321
  91. package/src/index.ts +0 -22
  92. package/src/ui/AuditReportUI.tsx +0 -151
  93. package/src/ui/SetupWizard.tsx +0 -294
  94. package/src/ui/components/AIUnderstandingSection.tsx +0 -183
  95. package/src/ui/components/HallucinationSection.tsx +0 -172
  96. package/src/ui/components/IssuesSection.tsx +0 -140
  97. package/src/ui/components/MessageAlignmentSection.tsx +0 -203
  98. package/src/ui/components/OverviewSection.tsx +0 -157
  99. package/src/ui/components/ScoreDisplay.tsx +0 -58
  100. package/src/ui/components/TechnicalSection.tsx +0 -200
  101. package/src/utils/comprehensive-formatter.ts +0 -455
  102. package/test.sh +0 -31
  103. package/tsconfig.json +0 -25
@@ -1,28 +0,0 @@
1
- {
2
- "crawl_id": "crawl_1765800213564_8yer1z9g6",
3
- "crawled_at": "2025-12-15T12:03:33.564Z",
4
- "base_url": "https://github.com",
5
- "start_url": "https://github.com",
6
- "total_pages": 5,
7
- "crawl_depth": 2,
8
- "pages": [
9
- "{\n \"version\": \"1.0.0\",\n \"audit_id\": \"ed541752-b5ba-49bf-9d2a-9154dffd4cee\",\n \"scanned_at\": \"2025-12-15T12:03:33.090Z\",\n \"input\": {\n \"requested_url\": \"https://github.com\",\n \"final_url\": \"https://github.com\",\n \"status_code\": 200,\n \"redirect_chain\": []\n },\n \"scores\": {\n \"crawlability\": 76,\n \"structure\": 50,\n \"schema_coverage\": 50,\n \"content_clarity\": 5,\n \"ai_readiness\": 51,\n \"overall\": 50.8\n },\n \"entities\": [],\n \"issues\": [\n {\n \"id\": \"CHUNK-001\",\n \"severity\": \"critical\",\n \"message\": \"Chunk exceeds recommended token/window size\",\n \"evidence\": \"tokens:2045\",\n \"suggested_fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\",\n \"category\": \"content\"\n },\n {\n \"id\": \"KG-001\",\n \"severity\": \"high\",\n \"message\": \"No Schema.org structured data\",\n \"evidence\": \"No JSON-LD structured data found\",\n \"suggested_fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\",\n \"category\": \"schema\"\n },\n {\n \"id\": \"AIREAD-002\",\n \"severity\": \"high\",\n \"message\": \"Multiple H1 Headings\",\n \"evidence\": \"count: 4\",\n \"suggested_fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-066\",\n \"severity\": \"medium\",\n \"message\": \"Videos without captions\",\n \"evidence\": \"Videos without captions: 2\",\n \"suggested_fix\": \"Add <track kind=\\\"captions\\\"> elements to video tags with WebVTT caption files.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CHUNK-002\",\n \"severity\": \"medium\",\n \"message\": \"Repetitive text content\",\n \"evidence\": \"Repetitive patterns: 24, Wasted tokens: ~1650, Example: \\\"Search\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n ...\\\"\",\n \"suggested_fix\": \"Consolidate repetitive text into a single location. Use references or footnotes instead of repeating the same text multiple times.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"A11Y-002\",\n \"severity\": \"medium\",\n \"message\": \"Form inputs without labels\",\n \"evidence\": \"Unlabeled inputs: 1\",\n \"suggested_fix\": \"Add <label> elements associated with inputs via for/id attributes, or use aria-label/aria-labelledby attributes.\",\n \"impact\": \"medium\",\n \"category\": \"accessibility\"\n },\n {\n \"id\": \"CHUNK-005\",\n \"severity\": \"medium\",\n \"message\": \"Duplicate navigation elements\",\n \"evidence\": \"Navigation count: 7, Estimated wasted tokens: ~220\",\n \"suggested_fix\": \"Consolidate navigation into a single element. If multiple navs are needed, ensure they serve distinct purposes and contain unique content.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"AIREAD-068\",\n \"severity\": \"low\",\n \"message\": \"No video transcripts available\",\n \"evidence\": \"Videos: 2, No transcript links\",\n \"suggested_fix\": \"Provide full text transcripts for videos. Link to them near the video or include them on the page.\",\n \"impact\": \"low\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CRAWL-014\",\n \"severity\": \"low\",\n \"message\": \"Excessive external resources\",\n \"evidence\": \"Total external resources: 123\",\n \"suggested_fix\": \"Consolidate resources, use sprite sheets, inline critical assets, and defer non-critical loads.\",\n \"impact\": \"low\",\n \"category\": \"crawl\"\n }\n ],\n \"recommendations\": [\n {\n \"issue_id\": \"CHUNK-001\",\n \"fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\"\n },\n {\n \"issue_id\": \"KG-001\",\n \"fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-002\",\n \"fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\"\n }\n ],\n \"detailed_scoring\": {\n \"overall_score\": 50.8,\n \"grade\": \"D\",\n \"category_scores\": [\n {\n \"category\": \"AIREAD\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.5\n },\n {\n \"category\": \"CHUNK\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.3\n },\n {\n \"category\": \"KG\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.1\n },\n {\n \"category\": \"A11Y\",\n \"score\": 10,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n },\n {\n \"category\": \"CRAWL\",\n \"score\": 76,\n \"grade\": \"B\",\n \"issues\": 1,\n \"weight\": 1.2\n }\n ],\n \"severity_breakdown\": {\n \"info\": 0,\n \"low\": 2,\n \"medium\": 4,\n \"high\": 2,\n \"critical\": 1\n }\n }\n}",
10
- "{\n \"version\": \"1.0.0\",\n \"audit_id\": \"fba437b4-97ad-4154-9f7d-4bb25e21ddd8\",\n \"scanned_at\": \"2025-12-15T12:03:33.119Z\",\n \"input\": {\n \"requested_url\": \"https://github.com/fluidicon.png\",\n \"final_url\": \"https://github.com/fluidicon.png\",\n \"status_code\": 200,\n \"redirect_chain\": []\n },\n \"scores\": {\n \"crawlability\": 0,\n \"structure\": 50,\n \"schema_coverage\": 50,\n \"content_clarity\": 50,\n \"ai_readiness\": 53,\n \"overall\": 53.3\n },\n \"entities\": [],\n \"issues\": [\n {\n \"id\": \"AIREAD-001\",\n \"severity\": \"critical\",\n \"message\": \"Missing H1\",\n \"evidence\": \"No <h1> tags found in the document.\",\n \"suggested_fix\": \"Add at least one H1 heading to the HTML document to improve accessibility and SEO.\",\n \"impact\": \"critical\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"KG-001\",\n \"severity\": \"high\",\n \"message\": \"No Schema.org structured data\",\n \"evidence\": \"No JSON-LD structured data found\",\n \"suggested_fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\",\n \"category\": \"schema\"\n },\n {\n \"id\": \"AIREAD-041\",\n \"severity\": \"high\",\n \"message\": \"No links found\",\n \"evidence\": \"No <a href> elements found\",\n \"suggested_fix\": \"Add relevant internal and external links to improve navigation and content relationships.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-028\",\n \"severity\": \"high\",\n \"message\": \"Missing or inadequate page title\",\n \"evidence\": \"Title: \\\"none\\\"\",\n \"suggested_fix\": \"Add a descriptive <title> element that clearly describes the page content. Aim for 50-60 characters.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-014\",\n \"severity\": \"high\",\n \"message\": \"Missing main semantic container\",\n \"evidence\": \"No <main> or <article> element found\",\n \"suggested_fix\": \"Wrap your main content in a <main> element, or use <article> for article-type content. This helps AI understand what content is most important.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"A11Y-001\",\n \"severity\": \"high\",\n \"message\": \"No ARIA landmarks or semantic elements\",\n \"evidence\": \"No landmarks found\",\n \"suggested_fix\": \"Add ARIA landmark roles (role=\\\"main\\\", role=\\\"navigation\\\", etc.) or use semantic HTML5 elements (<main>, <nav>, <header>, <footer>).\",\n \"impact\": \"high\",\n \"category\": \"accessibility\"\n },\n {\n \"id\": \"CRAWL-003\",\n \"severity\": \"high\",\n \"message\": \"Missing canonical tag\",\n \"evidence\": \"No canonical tag found\",\n \"suggested_fix\": \"Add <link rel=\\\"canonical\\\" href=\\\"...\\\"> to specify the preferred URL version.\",\n \"impact\": \"high\",\n \"category\": \"crawl\"\n },\n {\n \"id\": \"AIREAD-010\",\n \"severity\": \"medium\",\n \"message\": \"Missing or short meta description\",\n \"evidence\": \"Description length: 0 chars\",\n \"suggested_fix\": \"Add a meta description tag with 150-160 characters that summarizes the page content.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-013\",\n \"severity\": \"medium\",\n \"message\": \"Missing OpenGraph meta tags\",\n \"evidence\": \"Missing tags: og:title, og:description, og:image\",\n \"suggested_fix\": \"Add missing OpenGraph meta tags (og:title, og:description, og:image) to improve how AI agents and social platforms understand your content.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-080\",\n \"severity\": \"medium\",\n \"message\": \"Missing summary or intro section\",\n \"evidence\": \"No summary section detected, First paragraph length: 0\",\n \"suggested_fix\": \"Add a clear introduction or summary section at the start of your content.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-098\",\n \"severity\": \"low\",\n \"message\": \"No contact information\",\n \"evidence\": \"No email, phone, or contact links found\",\n \"suggested_fix\": \"Add contact information to improve trust and AI understanding of your organization.\",\n \"impact\": \"low\",\n \"category\": \"structure\"\n }\n ],\n \"recommendations\": [\n {\n \"issue_id\": \"AIREAD-001\",\n \"fix\": \"Add at least one H1 heading to the HTML document to improve accessibility and SEO.\",\n \"impact\": \"critical\"\n },\n {\n \"issue_id\": \"KG-001\",\n \"fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-041\",\n \"fix\": \"Add relevant internal and external links to improve navigation and content relationships.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-028\",\n \"fix\": \"Add a descriptive <title> element that clearly describes the page content. Aim for 50-60 characters.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-014\",\n \"fix\": \"Wrap your main content in a <main> element, or use <article> for article-type content. This helps AI understand what content is most important.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"A11Y-001\",\n \"fix\": \"Add ARIA landmark roles (role=\\\"main\\\", role=\\\"navigation\\\", etc.) or use semantic HTML5 elements (<main>, <nav>, <header>, <footer>).\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"CRAWL-003\",\n \"fix\": \"Add <link rel=\\\"canonical\\\" href=\\\"...\\\"> to specify the preferred URL version.\",\n \"impact\": \"high\"\n }\n ],\n \"detailed_scoring\": {\n \"overall_score\": 53.3,\n \"grade\": \"D\",\n \"category_scores\": [\n {\n \"category\": \"AIREAD\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 8,\n \"weight\": 1.5\n },\n {\n \"category\": \"CRAWL\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n },\n {\n \"category\": \"A11Y\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n },\n {\n \"category\": \"KG\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.1\n }\n ],\n \"severity_breakdown\": {\n \"info\": 0,\n \"low\": 1,\n \"medium\": 3,\n \"high\": 6,\n \"critical\": 1\n }\n }\n}",
11
- "{\n \"version\": \"1.0.0\",\n \"audit_id\": \"0df2d7d8-26e6-4da7-92d0-5b7a9b9d32c9\",\n \"scanned_at\": \"2025-12-15T12:03:33.268Z\",\n \"input\": {\n \"requested_url\": \"https://github.com?locale=ja\",\n \"final_url\": \"https://github.com?locale=ja\",\n \"status_code\": 200,\n \"redirect_chain\": []\n },\n \"scores\": {\n \"crawlability\": 76,\n \"structure\": 50,\n \"schema_coverage\": 50,\n \"content_clarity\": 5,\n \"ai_readiness\": 51,\n \"overall\": 50.8\n },\n \"entities\": [],\n \"issues\": [\n {\n \"id\": \"KG-001\",\n \"severity\": \"high\",\n \"message\": \"No Schema.org structured data\",\n \"evidence\": \"No JSON-LD structured data found\",\n \"suggested_fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\",\n \"category\": \"schema\"\n },\n {\n \"id\": \"AIREAD-002\",\n \"severity\": \"high\",\n \"message\": \"Multiple H1 Headings\",\n \"evidence\": \"count: 4\",\n \"suggested_fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-066\",\n \"severity\": \"medium\",\n \"message\": \"Videos without captions\",\n \"evidence\": \"Videos without captions: 2\",\n \"suggested_fix\": \"Add <track kind=\\\"captions\\\"> elements to video tags with WebVTT caption files.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CHUNK-002\",\n \"severity\": \"medium\",\n \"message\": \"Repetitive text content\",\n \"evidence\": \"Repetitive patterns: 23, Wasted tokens: ~480, Example: \\\"Search\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n ...\\\"\",\n \"suggested_fix\": \"Consolidate repetitive text into a single location. Use references or footnotes instead of repeating the same text multiple times.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"A11Y-002\",\n \"severity\": \"medium\",\n \"message\": \"Form inputs without labels\",\n \"evidence\": \"Unlabeled inputs: 1\",\n \"suggested_fix\": \"Add <label> elements associated with inputs via for/id attributes, or use aria-label/aria-labelledby attributes.\",\n \"impact\": \"medium\",\n \"category\": \"accessibility\"\n },\n {\n \"id\": \"CHUNK-005\",\n \"severity\": \"medium\",\n \"message\": \"Duplicate navigation elements\",\n \"evidence\": \"Navigation count: 7, Estimated wasted tokens: ~210\",\n \"suggested_fix\": \"Consolidate navigation into a single element. If multiple navs are needed, ensure they serve distinct purposes and contain unique content.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"AIREAD-068\",\n \"severity\": \"low\",\n \"message\": \"No video transcripts available\",\n \"evidence\": \"Videos: 2, No transcript links\",\n \"suggested_fix\": \"Provide full text transcripts for videos. Link to them near the video or include them on the page.\",\n \"impact\": \"low\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CRAWL-014\",\n \"severity\": \"low\",\n \"message\": \"Excessive external resources\",\n \"evidence\": \"Total external resources: 123\",\n \"suggested_fix\": \"Consolidate resources, use sprite sheets, inline critical assets, and defer non-critical loads.\",\n \"impact\": \"low\",\n \"category\": \"crawl\"\n }\n ],\n \"recommendations\": [\n {\n \"issue_id\": \"KG-001\",\n \"fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-002\",\n \"fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\"\n }\n ],\n \"detailed_scoring\": {\n \"overall_score\": 50.8,\n \"grade\": \"D\",\n \"category_scores\": [\n {\n \"category\": \"AIREAD\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.5\n },\n {\n \"category\": \"CHUNK\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 2,\n \"weight\": 1.3\n },\n {\n \"category\": \"KG\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.1\n },\n {\n \"category\": \"A11Y\",\n \"score\": 10,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n },\n {\n \"category\": \"CRAWL\",\n \"score\": 76,\n \"grade\": \"B\",\n \"issues\": 1,\n \"weight\": 1.2\n }\n ],\n \"severity_breakdown\": {\n \"info\": 0,\n \"low\": 2,\n \"medium\": 4,\n \"high\": 2,\n \"critical\": 0\n }\n }\n}",
12
- "{\n \"version\": \"1.0.0\",\n \"audit_id\": \"23dc8a46-ff6c-413b-bd93-5f071689f675\",\n \"scanned_at\": \"2025-12-15T12:03:33.414Z\",\n \"input\": {\n \"requested_url\": \"https://github.com?locale=ko\",\n \"final_url\": \"https://github.com?locale=ko\",\n \"status_code\": 200,\n \"redirect_chain\": []\n },\n \"scores\": {\n \"crawlability\": 0,\n \"structure\": 50,\n \"schema_coverage\": 50,\n \"content_clarity\": 5,\n \"ai_readiness\": 42,\n \"overall\": 42.2\n },\n \"entities\": [],\n \"issues\": [\n {\n \"id\": \"CHUNK-001\",\n \"severity\": \"critical\",\n \"message\": \"Chunk exceeds recommended token/window size\",\n \"evidence\": \"tokens:2045\",\n \"suggested_fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\",\n \"category\": \"content\"\n },\n {\n \"id\": \"KG-001\",\n \"severity\": \"high\",\n \"message\": \"No Schema.org structured data\",\n \"evidence\": \"No JSON-LD structured data found\",\n \"suggested_fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\",\n \"category\": \"schema\"\n },\n {\n \"id\": \"AIREAD-002\",\n \"severity\": \"high\",\n \"message\": \"Multiple H1 Headings\",\n \"evidence\": \"count: 4\",\n \"suggested_fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-066\",\n \"severity\": \"medium\",\n \"message\": \"Videos without captions\",\n \"evidence\": \"Videos without captions: 2\",\n \"suggested_fix\": \"Add <track kind=\\\"captions\\\"> elements to video tags with WebVTT caption files.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CHUNK-002\",\n \"severity\": \"medium\",\n \"message\": \"Repetitive text content\",\n \"evidence\": \"Repetitive patterns: 24, Wasted tokens: ~1650, Example: \\\"Search\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n ...\\\"\",\n \"suggested_fix\": \"Consolidate repetitive text into a single location. Use references or footnotes instead of repeating the same text multiple times.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"CRAWL-004\",\n \"severity\": \"medium\",\n \"message\": \"Canonical points to different URL\",\n \"evidence\": \"Current: https://github.com/?locale=ko, Canonical: https://github.com/\",\n \"suggested_fix\": \"Ensure canonical URL matches the current page URL unless intentionally consolidating duplicate content.\",\n \"impact\": \"medium\",\n \"category\": \"crawl\"\n },\n {\n \"id\": \"A11Y-002\",\n \"severity\": \"medium\",\n \"message\": \"Form inputs without labels\",\n \"evidence\": \"Unlabeled inputs: 1\",\n \"suggested_fix\": \"Add <label> elements associated with inputs via for/id attributes, or use aria-label/aria-labelledby attributes.\",\n \"impact\": \"medium\",\n \"category\": \"accessibility\"\n },\n {\n \"id\": \"CHUNK-005\",\n \"severity\": \"medium\",\n \"message\": \"Duplicate navigation elements\",\n \"evidence\": \"Navigation count: 7, Estimated wasted tokens: ~220\",\n \"suggested_fix\": \"Consolidate navigation into a single element. If multiple navs are needed, ensure they serve distinct purposes and contain unique content.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"AIREAD-068\",\n \"severity\": \"low\",\n \"message\": \"No video transcripts available\",\n \"evidence\": \"Videos: 2, No transcript links\",\n \"suggested_fix\": \"Provide full text transcripts for videos. Link to them near the video or include them on the page.\",\n \"impact\": \"low\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CRAWL-014\",\n \"severity\": \"low\",\n \"message\": \"Excessive external resources\",\n \"evidence\": \"Total external resources: 123\",\n \"suggested_fix\": \"Consolidate resources, use sprite sheets, inline critical assets, and defer non-critical loads.\",\n \"impact\": \"low\",\n \"category\": \"crawl\"\n }\n ],\n \"recommendations\": [\n {\n \"issue_id\": \"CHUNK-001\",\n \"fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\"\n },\n {\n \"issue_id\": \"KG-001\",\n \"fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-002\",\n \"fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\"\n }\n ],\n \"detailed_scoring\": {\n \"overall_score\": 42.2,\n \"grade\": \"F\",\n \"category_scores\": [\n {\n \"category\": \"AIREAD\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.5\n },\n {\n \"category\": \"CHUNK\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.3\n },\n {\n \"category\": \"CRAWL\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 2,\n \"weight\": 1.2\n },\n {\n \"category\": \"KG\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.1\n },\n {\n \"category\": \"A11Y\",\n \"score\": 10,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n }\n ],\n \"severity_breakdown\": {\n \"info\": 0,\n \"low\": 2,\n \"medium\": 5,\n \"high\": 2,\n \"critical\": 1\n }\n }\n}",
13
- "{\n \"version\": \"1.0.0\",\n \"audit_id\": \"ecff4294-466b-453d-9241-6712aa03f497\",\n \"scanned_at\": \"2025-12-15T12:03:33.564Z\",\n \"input\": {\n \"requested_url\": \"https://github.com?locale=pt\",\n \"final_url\": \"https://github.com?locale=pt\",\n \"status_code\": 200,\n \"redirect_chain\": []\n },\n \"scores\": {\n \"crawlability\": 0,\n \"structure\": 50,\n \"schema_coverage\": 50,\n \"content_clarity\": 5,\n \"ai_readiness\": 42,\n \"overall\": 42.2\n },\n \"entities\": [],\n \"issues\": [\n {\n \"id\": \"CHUNK-001\",\n \"severity\": \"critical\",\n \"message\": \"Chunk exceeds recommended token/window size\",\n \"evidence\": \"tokens:2045\",\n \"suggested_fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\",\n \"category\": \"content\"\n },\n {\n \"id\": \"KG-001\",\n \"severity\": \"high\",\n \"message\": \"No Schema.org structured data\",\n \"evidence\": \"No JSON-LD structured data found\",\n \"suggested_fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\",\n \"category\": \"schema\"\n },\n {\n \"id\": \"AIREAD-002\",\n \"severity\": \"high\",\n \"message\": \"Multiple H1 Headings\",\n \"evidence\": \"count: 4\",\n \"suggested_fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"AIREAD-066\",\n \"severity\": \"medium\",\n \"message\": \"Videos without captions\",\n \"evidence\": \"Videos without captions: 2\",\n \"suggested_fix\": \"Add <track kind=\\\"captions\\\"> elements to video tags with WebVTT caption files.\",\n \"impact\": \"medium\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CHUNK-002\",\n \"severity\": \"medium\",\n \"message\": \"Repetitive text content\",\n \"evidence\": \"Repetitive patterns: 24, Wasted tokens: ~1650, Example: \\\"Search\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n ...\\\"\",\n \"suggested_fix\": \"Consolidate repetitive text into a single location. Use references or footnotes instead of repeating the same text multiple times.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"CRAWL-004\",\n \"severity\": \"medium\",\n \"message\": \"Canonical points to different URL\",\n \"evidence\": \"Current: https://github.com/?locale=pt, Canonical: https://github.com/\",\n \"suggested_fix\": \"Ensure canonical URL matches the current page URL unless intentionally consolidating duplicate content.\",\n \"impact\": \"medium\",\n \"category\": \"crawl\"\n },\n {\n \"id\": \"A11Y-002\",\n \"severity\": \"medium\",\n \"message\": \"Form inputs without labels\",\n \"evidence\": \"Unlabeled inputs: 1\",\n \"suggested_fix\": \"Add <label> elements associated with inputs via for/id attributes, or use aria-label/aria-labelledby attributes.\",\n \"impact\": \"medium\",\n \"category\": \"accessibility\"\n },\n {\n \"id\": \"CHUNK-005\",\n \"severity\": \"medium\",\n \"message\": \"Duplicate navigation elements\",\n \"evidence\": \"Navigation count: 7, Estimated wasted tokens: ~220\",\n \"suggested_fix\": \"Consolidate navigation into a single element. If multiple navs are needed, ensure they serve distinct purposes and contain unique content.\",\n \"impact\": \"medium\",\n \"category\": \"content\"\n },\n {\n \"id\": \"AIREAD-068\",\n \"severity\": \"low\",\n \"message\": \"No video transcripts available\",\n \"evidence\": \"Videos: 2, No transcript links\",\n \"suggested_fix\": \"Provide full text transcripts for videos. Link to them near the video or include them on the page.\",\n \"impact\": \"low\",\n \"category\": \"structure\"\n },\n {\n \"id\": \"CRAWL-014\",\n \"severity\": \"low\",\n \"message\": \"Excessive external resources\",\n \"evidence\": \"Total external resources: 123\",\n \"suggested_fix\": \"Consolidate resources, use sprite sheets, inline critical assets, and defer non-critical loads.\",\n \"impact\": \"low\",\n \"category\": \"crawl\"\n }\n ],\n \"recommendations\": [\n {\n \"issue_id\": \"CHUNK-001\",\n \"fix\": \"Break content into smaller semantic sections using headings or create separate pages for distinct topics.\",\n \"impact\": \"critical\"\n },\n {\n \"issue_id\": \"KG-001\",\n \"fix\": \"Add Schema.org structured data using JSON-LD. Consider Organization, Person, Article, Product, or other relevant schemas.\",\n \"impact\": \"high\"\n },\n {\n \"issue_id\": \"AIREAD-002\",\n \"fix\": \"Consider using a single H1 heading for better SEO practices.\",\n \"impact\": \"high\"\n }\n ],\n \"detailed_scoring\": {\n \"overall_score\": 42.2,\n \"grade\": \"F\",\n \"category_scores\": [\n {\n \"category\": \"AIREAD\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.5\n },\n {\n \"category\": \"CHUNK\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 3,\n \"weight\": 1.3\n },\n {\n \"category\": \"CRAWL\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 2,\n \"weight\": 1.2\n },\n {\n \"category\": \"KG\",\n \"score\": 0,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.1\n },\n {\n \"category\": \"A11Y\",\n \"score\": 10,\n \"grade\": \"F\",\n \"issues\": 1,\n \"weight\": 1.2\n }\n ],\n \"severity_breakdown\": {\n \"info\": 0,\n \"low\": 2,\n \"medium\": 5,\n \"high\": 2,\n \"critical\": 1\n }\n }\n}"
14
- ],
15
- "summary": {
16
- "avgOverallScore": 47.85999999999999,
17
- "avgAIReadinessScore": 0,
18
- "totalIssues": 48,
19
- "issuesBySeverity": {
20
- "critical": 4,
21
- "high": 14,
22
- "medium": 21,
23
- "low": 9,
24
- "info": 0
25
- },
26
- "pagesWithCriticalIssues": 4
27
- }
28
- }
package/CLI_UI_README.md DELETED
@@ -1,211 +0,0 @@
1
- # AI Lighthouse Beautiful CLI
2
-
3
- The AI Lighthouse CLI now features:
4
- - 🧙‍♂️ **Interactive Setup Wizard** - No complex flags needed!
5
- - 🎨 **Beautiful Terminal UI** - Built with React (using Ink)
6
- - 📊 **Full Feature Parity** - Matches the web version's functionality
7
-
8
- ## Features
9
-
10
- ### Interactive UI Components
11
-
12
- - **Beautiful Score Display** - Animated score with gradient text and grade badges
13
- - **Tab Navigation** - Navigate through 6 different analysis sections using arrow keys or number keys
14
- - **Real-time Loading States** - Beautiful loading spinners with progress indicators
15
- - **Color-coded Data** - All severity levels, scores, and statuses are color-coded for easy scanning
16
- - **Progress Bars** - Visual progress bars for all dimension scores
17
- - **Expandable Sections** - Organized data in bordered, color-coded sections
18
-
19
- ### Analysis Sections
20
-
21
- 1. **Overview Tab** - AI readiness summary with:
22
- - AI Agent Perspective (Can Understand, Extract, Index, Answer)
23
- - Dimension scores with progress bars
24
- - Quick Wins section
25
-
26
- 2. **Issues Tab** - Comprehensive issue reporting with:
27
- - Issue summary by severity
28
- - Color-coded issue cards
29
- - Detailed fix recommendations
30
- - Category and impact information
31
-
32
- 3. **AI Understanding Tab** - LLM analysis including:
33
- - Inferred page type
34
- - AI-generated insights
35
- - Key topics and entities
36
- - Questions AI can answer
37
- - Suggested FAQs
38
-
39
- 4. **Hallucination Risk Tab** - Risk assessment with:
40
- - Overall risk score
41
- - Fact check summary
42
- - High-risk triggers
43
- - Verification recommendations
44
-
45
- 5. **Message Alignment Tab** - AI understanding check showing:
46
- - Alignment and clarity scores
47
- - What AI actually understood about your site
48
- - Priority mismatches
49
- - Recommendations
50
-
51
- 6. **Technical Tab** - Technical analysis including:
52
- - Category scores (Crawlability, Structure, Schema Coverage, Content Clarity)
53
- - Chunking analysis
54
- - Extractability metrics
55
-
56
- ## Usage
57
-
58
- ### Interactive Mode (Default)
59
-
60
- ```bash
61
- ai-lighthouse audit https://example.com
62
- ```
63
-
64
- This will launch the interactive UI with tab navigation. Use:
65
- - **← →** arrow keys to navigate between tabs
66
- - **1-6** number keys to jump to specific tabs
67
- - **Ctrl+C** to exit
68
-
69
- ### Interactive Mode with LLM Analysis
70
-
71
- ```bash
72
- ai-lighthouse audit https://example.com --enable-llm --llm-provider openai --llm-api-key YOUR_KEY
73
- ```
74
-
75
- ### Interactive Mode with All Features
76
-
77
- ```bash
78
- ai-lighthouse audit https://example.com \
79
- --enable-llm \
80
- --enable-chunking \
81
- --enable-extractability \
82
- --enable-hallucination \
83
- --llm-provider openai \
84
- --llm-api-key YOUR_KEY
85
- ```
86
-
87
- ### Export Modes (Non-interactive)
88
-
89
- For automated workflows, you can export to various formats:
90
-
91
- ```bash
92
- # JSON export (for CI/CD)
93
- ai-lighthouse audit https://example.com --output json
94
-
95
- # HTML report
96
- ai-lighthouse audit https://example.com --output html
97
-
98
- # PDF report
99
- ai-lighthouse audit https://example.com --output pdf
100
-
101
- # Lighthouse format
102
- ai-lighthouse audit https://example.com --output lhr
103
-
104
- # CSV export
105
- ai-lighthouse audit https://example.com --output csv
106
- ```
107
-
108
- ## UI Components
109
-
110
- All UI components are built with React and Ink, located in `src/ui/`:
111
-
112
- - `AuditReportUI.tsx` - Main container with tab navigation
113
- - `components/ScoreDisplay.tsx` - Animated score display with gradient
114
- - `components/OverviewSection.tsx` - Overview tab with dimensions
115
- - `components/IssuesSection.tsx` - Issues list with filtering
116
- - `components/AIUnderstandingSection.tsx` - LLM analysis display
117
- - `components/HallucinationSection.tsx` - Hallucination risk display
118
- - `components/MessageAlignmentSection.tsx` - Message alignment display
119
- - `components/TechnicalSection.tsx` - Technical metrics display
120
-
121
- ## Design System
122
-
123
- ### Colors
124
-
125
- - **Critical**: Red
126
- - **High**: Magenta/Orange
127
- - **Medium**: Yellow
128
- - **Low**: Blue
129
- - **Success**: Green
130
- - **Info**: Cyan
131
-
132
- ### Icons
133
-
134
- - 📊 Overview
135
- - ⚠️ Issues
136
- - 🧠 AI Understanding
137
- - ⚠️ Hallucination Risk
138
- - 🔍 Message Alignment
139
- - ⚙️ Technical
140
-
141
- ### Borders
142
-
143
- - Rounded borders for primary sections
144
- - Single borders for nested content
145
- - Color-coded borders matching severity/status
146
-
147
- ## Development
148
-
149
- ### Running in Development
150
-
151
- ```bash
152
- pnpm dev audit https://example.com
153
- ```
154
-
155
- ### Type Checking
156
-
157
- ```bash
158
- pnpm check-types
159
- ```
160
-
161
- ### Building
162
-
163
- The CLI uses `tsx` runtime, so no build step is required. For distribution:
164
-
165
- ```bash
166
- pnpm build
167
- ```
168
-
169
- ## Architecture
170
-
171
- The CLI now supports two modes:
172
-
173
- 1. **Interactive Mode** - Uses Ink to render React components in the terminal
174
- 2. **Export Mode** - Traditional CLI output with spinners and formatted text
175
-
176
- The mode is automatically selected based on the `--output` flag:
177
- - `--output interactive` (default) - Interactive UI
178
- - `--output json|html|pdf|lhr|csv` - Export modes
179
-
180
- ## Comparison with Web Version
181
-
182
- The CLI UI now matches the web version's functionality:
183
-
184
- | Feature | Web | CLI |
185
- |---------|-----|-----|
186
- | Score Display | ✅ | ✅ |
187
- | Tab Navigation | ✅ | ✅ |
188
- | AI Understanding | ✅ | ✅ |
189
- | Hallucination Risk | ✅ | ✅ |
190
- | Message Alignment | ✅ | ✅ |
191
- | Technical Metrics | ✅ | ✅ |
192
- | Issues List | ✅ | ✅ |
193
- | Quick Wins | ✅ | ✅ |
194
- | Dimension Scores | ✅ | ✅ |
195
- | Progress Bars | ✅ | ✅ |
196
- | Color Coding | ✅ | ✅ |
197
- | Interactive Navigation | ✅ | ✅ |
198
- | Animations | ✅ | ✅ (Spinners) |
199
-
200
- ## Future Enhancements
201
-
202
- Potential improvements for the CLI UI:
203
-
204
- - [ ] Fuzzy search/filter in issues tab
205
- - [ ] Export current view to file
206
- - [ ] Side-by-side comparison mode
207
- - [ ] Chart visualizations (using ASCII art)
208
- - [ ] Custom color themes
209
- - [ ] Keyboard shortcuts help overlay
210
- - [ ] Persistent session state
211
- - [ ] History/comparison with previous audits
package/EXAMPLES.md DELETED
@@ -1,87 +0,0 @@
1
- # Example Usage
2
-
3
- ## Basic Audit
4
-
5
- ```bash
6
- cd apps/cli
7
- pnpm dev audit https://example.com
8
- ```
9
-
10
- ## Audit with HTML Output
11
-
12
- ```bash
13
- pnpm dev audit https://github.com --output html
14
- ```
15
-
16
- ## Audit with All Features Enabled
17
-
18
- ```bash
19
- pnpm dev audit https://example.com \
20
- --output html \
21
- --enable-chunking \
22
- --enable-extractability \
23
- --enable-hallucination \
24
- --enable-llm \
25
- --llm-provider ollama \
26
- --llm-model qwen2.5:0.5b \
27
- --llm-base-url http://localhost:11434
28
- ```
29
-
30
- ## Crawl Multiple Pages
31
-
32
- ```bash
33
- pnpm dev crawl https://example.com --depth 2 --max-pages 10 --output html
34
- ```
35
-
36
- ## Crawl Using Sitemap
37
-
38
- ```bash
39
- pnpm dev crawl https://example.com --sitemap --max-pages 50 --output json
40
- ```
41
-
42
- ## Generate Report from Previous Run
43
-
44
- ```bash
45
- pnpm dev report ./.ai-lighthouse/audit_example_com_2024-12-05T10-30-00.json --open
46
- ```
47
-
48
- ## CI/CD Integration
49
-
50
- ```bash
51
- # Fail build if score is below 80
52
- pnpm dev audit https://example.com --threshold 80 --output json
53
- ```
54
-
55
- ## Export to Different Formats
56
-
57
- ```bash
58
- # JSON (default)
59
- pnpm dev audit https://example.com --output json
60
-
61
- # HTML (beautiful report)
62
- pnpm dev audit https://example.com --output html
63
-
64
- # Lighthouse-compatible format
65
- pnpm dev audit https://example.com --output lhr
66
-
67
- # CSV for spreadsheets
68
- pnpm dev audit https://example.com --output csv
69
- ```
70
-
71
- ## Advanced Options
72
-
73
- ```bash
74
- # Fine-tune issue detection
75
- pnpm dev audit https://example.com \
76
- --min-impact 9 \
77
- --min-confidence 0.8 \
78
- --max-issues 10
79
-
80
- # Enable all analysis features
81
- pnpm dev audit https://example.com \
82
- --enable-chunking \
83
- --enable-extractability \
84
- --enable-hallucination \
85
- --enable-llm \
86
- --max-chunk-tokens 1500
87
- ```
package/IMPLEMENTATION.md DELETED
@@ -1,215 +0,0 @@
1
- # AI Lighthouse CLI - Implementation Complete
2
-
3
- ## ✅ What Was Built
4
-
5
- A comprehensive command-line interface for the AI Lighthouse scanner with three main commands:
6
-
7
- ### 1. **audit** - Single Page Auditing
8
- Audits a single webpage for AI readiness, SEO, and content quality.
9
-
10
- **Features:**
11
- - Multiple output formats (JSON, HTML, LHR, CSV)
12
- - Configurable rule presets
13
- - LLM integration support (OpenAI, Anthropic, Ollama, local)
14
- - Advanced filtering (min impact, confidence thresholds)
15
- - CI/CD integration with score thresholds
16
- - Beautiful HTML reports with visualizations
17
-
18
- **Example:**
19
- ```bash
20
- pnpm dev audit https://example.com --output html --enable-llm
21
- ```
22
-
23
- ### 2. **crawl** - Multi-Page Auditing
24
- Crawls and audits multiple pages from a website.
25
-
26
- **Features:**
27
- - Configurable crawl depth
28
- - Sitemap.xml parsing
29
- - Max pages limit
30
- - Aggregate scoring across pages
31
- - Respects robots.txt
32
- - HTML and JSON reports
33
-
34
- **Example:**
35
- ```bash
36
- pnpm dev crawl https://example.com --depth 2 --sitemap --max-pages 50
37
- ```
38
-
39
- ### 3. **report** - Report Generation & Viewing
40
- Generates and views reports from saved audit results.
41
-
42
- **Features:**
43
- - Converts JSON to HTML
44
- - Opens reports in browser
45
- - CSV export for analysis
46
- - Works with both single audits and crawls
47
-
48
- **Example:**
49
- ```bash
50
- pnpm dev report ./.ai-lighthouse/last_run.json --open
51
- ```
52
-
53
- ## 📦 Project Structure
54
-
55
- ```
56
- apps/cli/
57
- ├── src/
58
- │ ├── index.ts # Main entry point
59
- │ └── commands/
60
- │ ├── audit.ts # Audit command implementation
61
- │ ├── crawl.ts # Crawl command implementation
62
- │ └── report.ts # Report command implementation
63
- ├── bin/
64
- │ └── cli.js # Executable entry point
65
- ├── package.json
66
- ├── tsconfig.json
67
- ├── README.md # Full documentation
68
- ├── EXAMPLES.md # Usage examples
69
- └── test.sh # Test script
70
- ```
71
-
72
- ## 🚀 Usage
73
-
74
- ### Development
75
- ```bash
76
- cd apps/cli
77
- pnpm install
78
- pnpm dev audit https://example.com
79
- ```
80
-
81
- ### All Commands
82
-
83
- ```bash
84
- # Basic audit
85
- pnpm dev audit https://example.com
86
-
87
- # Audit with HTML output
88
- pnpm dev audit https://example.com --output html
89
-
90
- # Enable all features with LLM
91
- pnpm dev audit https://example.com \
92
- --enable-chunking \
93
- --enable-extractability \
94
- --enable-hallucination \
95
- --enable-llm \
96
- --llm-provider ollama \
97
- --llm-model qwen2.5:0.5b
98
-
99
- # Crawl multiple pages
100
- pnpm dev crawl https://example.com --depth 2 --sitemap
101
-
102
- # Generate report from saved results
103
- pnpm dev report ./.ai-lighthouse/audit_*.json --open
104
-
105
- # CI/CD with threshold
106
- pnpm dev audit https://example.com --threshold 80
107
- ```
108
-
109
- ## 🎨 Output Formats
110
-
111
- ### 1. **JSON** (Default)
112
- Standard JSON format with all audit data. Perfect for CI/CD pipelines and programmatic access.
113
-
114
- ### 2. **HTML**
115
- Beautiful, interactive HTML reports with:
116
- - Score cards with gradients
117
- - Issue categorization by severity
118
- - Expandable details
119
- - Entity detection display
120
- - Color-coded severity levels
121
-
122
- ### 3. **LHR** (Lighthouse Report)
123
- Lighthouse-compatible JSON format for integration with existing Lighthouse tooling and dashboards.
124
-
125
- ### 4. **CSV**
126
- Comma-separated values for easy import into spreadsheets and analysis tools.
127
-
128
- ## 📊 Key Features
129
-
130
- ### Advanced Filtering
131
- - `--min-impact`: Only show high-impact issues
132
- - `--min-confidence`: Filter by confidence score
133
- - `--max-issues`: Limit number of issues returned
134
-
135
- ### LLM Integration
136
- - Multiple providers: OpenAI, Anthropic, Ollama, local models
137
- - Configurable models and endpoints
138
- - Optional hallucination detection
139
- - Content comprehension analysis
140
-
141
- ### CI/CD Integration
142
- - `--threshold`: Set minimum score requirement
143
- - Exit code 1 if below threshold
144
- - Perfect for automated testing pipelines
145
-
146
- ### Report Storage
147
- All results automatically saved to `.ai-lighthouse/` directory with timestamps.
148
-
149
- ## 🔧 Configuration Options
150
-
151
- ### Audit Options
152
- - `-o, --output <format>` - Output format (json, html, lhr, csv)
153
- - `-r, --rules <preset>` - Rule preset (default, strict, minimal)
154
- - `--threshold <score>` - Minimum score for CI/CD
155
- - `--enable-chunking` - Content chunking analysis
156
- - `--enable-extractability` - Extractability mapping
157
- - `--enable-hallucination` - Hallucination detection
158
- - `--enable-llm` - LLM comprehension analysis
159
-
160
- ### Crawl Options
161
- - `-d, --depth <number>` - Maximum crawl depth
162
- - `--sitemap` - Parse sitemap.xml
163
- - `--max-pages <number>` - Maximum pages to crawl
164
- - `--follow-external` - Follow external links
165
- - `--respect-robots` - Respect robots.txt
166
-
167
- ### Report Options
168
- - `--open` - Open report in browser
169
- - `-f, --format <format>` - Output format
170
-
171
- ## 🎯 Implementation Highlights
172
-
173
- 1. **Commander.js** for CLI framework
174
- 2. **Chalk** for colored output
175
- 3. **Ora** for elegant spinners
176
- 4. **Open** for browser integration
177
- 5. **Type-safe** integration with scanner package
178
- 6. **Error handling** with helpful messages
179
- 7. **Progress indicators** for long-running tasks
180
- 8. **Flexible output** formats for different use cases
181
-
182
- ## 📝 Next Steps
183
-
184
- To use the CLI:
185
-
186
- 1. **Development mode:**
187
- ```bash
188
- cd apps/cli
189
- pnpm dev audit https://example.com
190
- ```
191
-
192
- 2. **Install globally (future):**
193
- ```bash
194
- pnpm install -g @ai-lighthouse/cli
195
- ai-lighthouse audit https://example.com
196
- ```
197
-
198
- 3. **CI/CD Integration:**
199
- ```yaml
200
- - name: Audit Website
201
- run: pnpm --filter @ai-lighthouse/cli dev audit ${{ env.URL }} --threshold 80
202
- ```
203
-
204
- ## 🎉 Summary
205
-
206
- The AI Lighthouse CLI is now fully functional with:
207
- - ✅ Three main commands (audit, crawl, report)
208
- - ✅ Multiple output formats
209
- - ✅ LLM integration support
210
- - ✅ CI/CD ready with thresholds
211
- - ✅ Beautiful HTML reports
212
- - ✅ Comprehensive documentation
213
- - ✅ Example scripts and usage guides
214
-
215
- The CLI provides a professional, user-friendly interface to the powerful AI Lighthouse scanner engine!