@ai-lighthouse/cli 1.0.1 → 1.0.2

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 (102) hide show
  1. package/dist/index.js +2573 -12
  2. package/package.json +10 -4
  3. package/.ai-lighthouse/audit_example.com_2025-12-15T12-10-43.json +0 -183
  4. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-32-28.html +0 -743
  5. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-33-02.html +0 -757
  6. package/.ai-lighthouse/audit_github.com_2025-12-15T11-53-21.json +0 -168
  7. package/.ai-lighthouse/audit_github.com_2025-12-15T12-04-06.json +0 -168
  8. package/.ai-lighthouse/audit_github.com_2025-12-15T12-05-10.json +0 -168
  9. package/.ai-lighthouse/audit_github.com_2025-12-15T12-09-45.json +0 -168
  10. package/.ai-lighthouse/audit_github.com_2025-12-15T12-11-07.json +0 -168
  11. package/.ai-lighthouse/audit_github.com_2025-12-15T12-13-28.json +0 -168
  12. package/.ai-lighthouse/audit_github.com_2025-12-15T12-14-59.json +0 -205
  13. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-07.json +0 -205
  14. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-44.json +0 -205
  15. package/.ai-lighthouse/audit_github.com_2025-12-15T12-21-38.json +0 -205
  16. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-21.json +0 -205
  17. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-46.json +0 -205
  18. package/.ai-lighthouse/audit_github.com_2025-12-15T12-23-18.json +0 -205
  19. package/.ai-lighthouse/audit_github.com_2025-12-15T12-24-43.json +0 -205
  20. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-08.json +0 -168
  21. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-57.json +0 -168
  22. package/.ai-lighthouse/audit_github.com_2025-12-17T12-17-11.json +0 -168
  23. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-17.json +0 -168
  24. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-42.json +0 -168
  25. package/.ai-lighthouse/audit_github.com_2025-12-17T12-23-56.json +0 -168
  26. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-24.json +0 -168
  27. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-40.json +0 -168
  28. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-02.json +0 -168
  29. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-20.json +0 -168
  30. package/.ai-lighthouse/audit_github.com_2025-12-17T12-29-56.json +0 -168
  31. package/.ai-lighthouse/audit_github.com_2025-12-17T12-32-27.json +0 -168
  32. package/.ai-lighthouse/audit_github.com_2025-12-17T12-33-00.json +0 -168
  33. package/.ai-lighthouse/audit_github.com_2025-12-17T12-34-49.json +0 -168
  34. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-31.json +0 -168
  35. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-45.json +0 -168
  36. package/.ai-lighthouse/audit_tailwindcss.com_2025-12-15T12-12-01.json +0 -169
  37. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-08.json +0 -24
  38. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-23.json +0 -24
  39. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-41-34.json +0 -21
  40. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-09.json +0 -21
  41. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-45.json +0 -21
  42. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-02.json +0 -21
  43. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-26.json +0 -21
  44. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-47-46.json +0 -906
  45. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-50-27.json +0 -906
  46. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-52-59.json +0 -906
  47. package/.ai-lighthouse/crawl_github.com_2025-12-15T12-03-33.json +0 -28
  48. package/CLI_UI_README.md +0 -211
  49. package/EXAMPLES.md +0 -87
  50. package/IMPLEMENTATION.md +0 -215
  51. package/USAGE.md +0 -264
  52. package/WIZARD_GUIDE.md +0 -340
  53. package/bin/cli.js +0 -2
  54. package/dist/commands/audit-interactive.d.ts +0 -2
  55. package/dist/commands/audit-interactive.js +0 -106
  56. package/dist/commands/audit-wizard.d.ts +0 -2
  57. package/dist/commands/audit-wizard.js +0 -110
  58. package/dist/commands/audit.d.ts +0 -2
  59. package/dist/commands/audit.js +0 -940
  60. package/dist/commands/crawl.d.ts +0 -2
  61. package/dist/commands/crawl.js +0 -267
  62. package/dist/commands/report.d.ts +0 -2
  63. package/dist/commands/report.js +0 -304
  64. package/dist/index.d.ts +0 -1
  65. package/dist/ui/AuditReportUI.d.ts +0 -10
  66. package/dist/ui/AuditReportUI.js +0 -76
  67. package/dist/ui/SetupWizard.d.ts +0 -18
  68. package/dist/ui/SetupWizard.js +0 -179
  69. package/dist/ui/components/AIUnderstandingSection.d.ts +0 -6
  70. package/dist/ui/components/AIUnderstandingSection.js +0 -87
  71. package/dist/ui/components/HallucinationSection.d.ts +0 -6
  72. package/dist/ui/components/HallucinationSection.js +0 -84
  73. package/dist/ui/components/IssuesSection.d.ts +0 -6
  74. package/dist/ui/components/IssuesSection.js +0 -84
  75. package/dist/ui/components/MessageAlignmentSection.d.ts +0 -6
  76. package/dist/ui/components/MessageAlignmentSection.js +0 -108
  77. package/dist/ui/components/OverviewSection.d.ts +0 -6
  78. package/dist/ui/components/OverviewSection.js +0 -107
  79. package/dist/ui/components/ScoreDisplay.d.ts +0 -8
  80. package/dist/ui/components/ScoreDisplay.js +0 -41
  81. package/dist/ui/components/TechnicalSection.d.ts +0 -7
  82. package/dist/ui/components/TechnicalSection.js +0 -110
  83. package/dist/utils/comprehensive-formatter.d.ts +0 -5
  84. package/dist/utils/comprehensive-formatter.js +0 -370
  85. package/src/commands/audit-interactive.ts +0 -149
  86. package/src/commands/audit-wizard.ts +0 -137
  87. package/src/commands/audit.ts +0 -1012
  88. package/src/commands/crawl.ts +0 -307
  89. package/src/commands/report.ts +0 -321
  90. package/src/index.ts +0 -22
  91. package/src/ui/AuditReportUI.tsx +0 -151
  92. package/src/ui/SetupWizard.tsx +0 -294
  93. package/src/ui/components/AIUnderstandingSection.tsx +0 -183
  94. package/src/ui/components/HallucinationSection.tsx +0 -172
  95. package/src/ui/components/IssuesSection.tsx +0 -140
  96. package/src/ui/components/MessageAlignmentSection.tsx +0 -203
  97. package/src/ui/components/OverviewSection.tsx +0 -157
  98. package/src/ui/components/ScoreDisplay.tsx +0 -58
  99. package/src/ui/components/TechnicalSection.tsx +0 -200
  100. package/src/utils/comprehensive-formatter.ts +0 -455
  101. package/test.sh +0 -31
  102. package/tsconfig.json +0 -25
@@ -1,110 +0,0 @@
1
- import { render } from 'ink';
2
- import React from 'react';
3
- import { SetupWizard } from '../ui/SetupWizard.js';
4
- import { AuditReportUI } from '../ui/AuditReportUI.js';
5
- import { analyzeUrlWithRules, calculateAIReadiness } from 'scanner';
6
- export function auditWizardCommand(program) {
7
- program
8
- .command('wizard')
9
- .alias('w')
10
- .description('Interactive wizard to configure and run an audit')
11
- .argument('[url]', 'Optional URL to audit (will prompt if not provided)')
12
- .action(async (url) => {
13
- // Suppress console.error and console.warn for cleaner UI
14
- const originalConsoleError = console.error;
15
- const originalConsoleWarn = console.warn;
16
- console.error = () => { };
17
- console.warn = () => { };
18
- let auditConfig = null;
19
- // Show setup wizard
20
- const wizardRender = render(React.createElement(SetupWizard, {
21
- initialUrl: url,
22
- onComplete: (config) => {
23
- auditConfig = config;
24
- },
25
- }));
26
- // Wait for wizard to complete
27
- await wizardRender.waitUntilExit();
28
- if (!auditConfig) {
29
- console.error = originalConsoleError;
30
- console.warn = originalConsoleWarn;
31
- console.log('\nAudit cancelled.');
32
- process.exit(0);
33
- }
34
- // Start the audit with the configured options
35
- const { clear, rerender } = render(React.createElement(AuditReportUI, {
36
- url: auditConfig.url,
37
- result: {},
38
- aiReadiness: {},
39
- loading: true,
40
- currentStep: 'Starting audit...',
41
- }));
42
- try {
43
- // Build scan options from config
44
- const scanOptions = {
45
- maxChunkTokens: 1200,
46
- chunkingStrategy: 'auto',
47
- enableChunking: auditConfig.enableChunking,
48
- enableExtractability: auditConfig.enableExtractability,
49
- enableHallucinationDetection: auditConfig.enableHallucination,
50
- enableLLM: auditConfig.enableLlm,
51
- minImpactScore: 8,
52
- minConfidence: 0.7,
53
- maxIssues: 20,
54
- };
55
- // Configure LLM if enabled
56
- if (auditConfig.enableLlm && auditConfig.llmProvider) {
57
- scanOptions.llmConfig = {
58
- provider: auditConfig.llmProvider,
59
- model: auditConfig.llmModel,
60
- baseUrl: auditConfig.llmBaseUrl,
61
- apiKey: auditConfig.llmApiKey,
62
- };
63
- }
64
- // Update loading step
65
- rerender(React.createElement(AuditReportUI, {
66
- url: auditConfig.url,
67
- result: {},
68
- aiReadiness: {},
69
- loading: true,
70
- currentStep: 'Scanning page...',
71
- }));
72
- // Run the audit
73
- const result = await analyzeUrlWithRules(auditConfig.url, scanOptions);
74
- // Update loading step
75
- rerender(React.createElement(AuditReportUI, {
76
- url: auditConfig.url,
77
- result,
78
- aiReadiness: {},
79
- loading: true,
80
- currentStep: 'Calculating AI readiness scores...',
81
- }));
82
- // Calculate AI readiness
83
- const aiReadiness = calculateAIReadiness(result);
84
- // Clear loading and show results
85
- clear();
86
- const finalRender = render(React.createElement(AuditReportUI, {
87
- url: auditConfig.url,
88
- result,
89
- aiReadiness,
90
- loading: false,
91
- }));
92
- // Wait for user to exit
93
- await finalRender.waitUntilExit();
94
- // Restore console methods
95
- console.error = originalConsoleError;
96
- console.warn = originalConsoleWarn;
97
- }
98
- catch (error) {
99
- // Restore console methods before showing error
100
- console.error = originalConsoleError;
101
- console.warn = originalConsoleWarn;
102
- clear();
103
- console.log('\n\x1b[1m\x1b[31m❌ Audit Failed\x1b[0m');
104
- console.log('\x1b[31m' + '─'.repeat(70) + '\x1b[0m');
105
- console.log('\x1b[31m' + (error instanceof Error ? error.message : String(error)) + '\x1b[0m');
106
- console.log('\n\x1b[2mPlease check the URL and your configuration.\x1b[0m');
107
- process.exit(1);
108
- }
109
- });
110
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function auditCommand(program: Command): void;