@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.
- package/dist/index.js +2573 -12
- package/package.json +10 -4
- package/.ai-lighthouse/audit_example.com_2025-12-15T12-10-43.json +0 -183
- package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-32-28.html +0 -743
- package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-33-02.html +0 -757
- package/.ai-lighthouse/audit_github.com_2025-12-15T11-53-21.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-04-06.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-05-10.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-09-45.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-11-07.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-13-28.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-14-59.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-07.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-44.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-21-38.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-21.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-46.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-23-18.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-15T12-24-43.json +0 -205
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-08.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-57.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-17-11.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-17.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-42.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-23-56.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-24.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-40.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-02.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-20.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-29-56.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-32-27.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-33-00.json +0 -168
- package/.ai-lighthouse/audit_github.com_2025-12-17T12-34-49.json +0 -168
- package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-31.json +0 -168
- package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-45.json +0 -168
- package/.ai-lighthouse/audit_tailwindcss.com_2025-12-15T12-12-01.json +0 -169
- package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-08.json +0 -24
- package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-23.json +0 -24
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-41-34.json +0 -21
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-09.json +0 -21
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-45.json +0 -21
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-02.json +0 -21
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-26.json +0 -21
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-47-46.json +0 -906
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-50-27.json +0 -906
- package/.ai-lighthouse/crawl_github.com_2025-12-15T11-52-59.json +0 -906
- package/.ai-lighthouse/crawl_github.com_2025-12-15T12-03-33.json +0 -28
- package/CLI_UI_README.md +0 -211
- package/EXAMPLES.md +0 -87
- package/IMPLEMENTATION.md +0 -215
- package/USAGE.md +0 -264
- package/WIZARD_GUIDE.md +0 -340
- package/bin/cli.js +0 -2
- package/dist/commands/audit-interactive.d.ts +0 -2
- package/dist/commands/audit-interactive.js +0 -106
- package/dist/commands/audit-wizard.d.ts +0 -2
- package/dist/commands/audit-wizard.js +0 -110
- package/dist/commands/audit.d.ts +0 -2
- package/dist/commands/audit.js +0 -940
- package/dist/commands/crawl.d.ts +0 -2
- package/dist/commands/crawl.js +0 -267
- package/dist/commands/report.d.ts +0 -2
- package/dist/commands/report.js +0 -304
- package/dist/index.d.ts +0 -1
- package/dist/ui/AuditReportUI.d.ts +0 -10
- package/dist/ui/AuditReportUI.js +0 -76
- package/dist/ui/SetupWizard.d.ts +0 -18
- package/dist/ui/SetupWizard.js +0 -179
- package/dist/ui/components/AIUnderstandingSection.d.ts +0 -6
- package/dist/ui/components/AIUnderstandingSection.js +0 -87
- package/dist/ui/components/HallucinationSection.d.ts +0 -6
- package/dist/ui/components/HallucinationSection.js +0 -84
- package/dist/ui/components/IssuesSection.d.ts +0 -6
- package/dist/ui/components/IssuesSection.js +0 -84
- package/dist/ui/components/MessageAlignmentSection.d.ts +0 -6
- package/dist/ui/components/MessageAlignmentSection.js +0 -108
- package/dist/ui/components/OverviewSection.d.ts +0 -6
- package/dist/ui/components/OverviewSection.js +0 -107
- package/dist/ui/components/ScoreDisplay.d.ts +0 -8
- package/dist/ui/components/ScoreDisplay.js +0 -41
- package/dist/ui/components/TechnicalSection.d.ts +0 -7
- package/dist/ui/components/TechnicalSection.js +0 -110
- package/dist/utils/comprehensive-formatter.d.ts +0 -5
- package/dist/utils/comprehensive-formatter.js +0 -370
- package/src/commands/audit-interactive.ts +0 -149
- package/src/commands/audit-wizard.ts +0 -137
- package/src/commands/audit.ts +0 -1012
- package/src/commands/crawl.ts +0 -307
- package/src/commands/report.ts +0 -321
- package/src/index.ts +0 -22
- package/src/ui/AuditReportUI.tsx +0 -151
- package/src/ui/SetupWizard.tsx +0 -294
- package/src/ui/components/AIUnderstandingSection.tsx +0 -183
- package/src/ui/components/HallucinationSection.tsx +0 -172
- package/src/ui/components/IssuesSection.tsx +0 -140
- package/src/ui/components/MessageAlignmentSection.tsx +0 -203
- package/src/ui/components/OverviewSection.tsx +0 -157
- package/src/ui/components/ScoreDisplay.tsx +0 -58
- package/src/ui/components/TechnicalSection.tsx +0 -200
- package/src/utils/comprehensive-formatter.ts +0 -455
- package/test.sh +0 -31
- 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
|
-
}
|
package/dist/commands/audit.d.ts
DELETED