@ai-lighthouse/cli 1.0.0

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/.ai-lighthouse/audit_example.com_2025-12-15T12-10-43.json +183 -0
  2. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-32-28.html +743 -0
  3. package/.ai-lighthouse/audit_fayeed.dev_2026-01-07T19-33-02.html +757 -0
  4. package/.ai-lighthouse/audit_github.com_2025-12-15T11-53-21.json +168 -0
  5. package/.ai-lighthouse/audit_github.com_2025-12-15T12-04-06.json +168 -0
  6. package/.ai-lighthouse/audit_github.com_2025-12-15T12-05-10.json +168 -0
  7. package/.ai-lighthouse/audit_github.com_2025-12-15T12-09-45.json +168 -0
  8. package/.ai-lighthouse/audit_github.com_2025-12-15T12-11-07.json +168 -0
  9. package/.ai-lighthouse/audit_github.com_2025-12-15T12-13-28.json +168 -0
  10. package/.ai-lighthouse/audit_github.com_2025-12-15T12-14-59.json +205 -0
  11. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-07.json +205 -0
  12. package/.ai-lighthouse/audit_github.com_2025-12-15T12-18-44.json +205 -0
  13. package/.ai-lighthouse/audit_github.com_2025-12-15T12-21-38.json +205 -0
  14. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-21.json +205 -0
  15. package/.ai-lighthouse/audit_github.com_2025-12-15T12-22-46.json +205 -0
  16. package/.ai-lighthouse/audit_github.com_2025-12-15T12-23-18.json +205 -0
  17. package/.ai-lighthouse/audit_github.com_2025-12-15T12-24-43.json +205 -0
  18. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-08.json +168 -0
  19. package/.ai-lighthouse/audit_github.com_2025-12-17T12-15-57.json +168 -0
  20. package/.ai-lighthouse/audit_github.com_2025-12-17T12-17-11.json +168 -0
  21. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-17.json +168 -0
  22. package/.ai-lighthouse/audit_github.com_2025-12-17T12-22-42.json +168 -0
  23. package/.ai-lighthouse/audit_github.com_2025-12-17T12-23-56.json +168 -0
  24. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-24.json +168 -0
  25. package/.ai-lighthouse/audit_github.com_2025-12-17T12-25-40.json +168 -0
  26. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-02.json +168 -0
  27. package/.ai-lighthouse/audit_github.com_2025-12-17T12-27-20.json +168 -0
  28. package/.ai-lighthouse/audit_github.com_2025-12-17T12-29-56.json +168 -0
  29. package/.ai-lighthouse/audit_github.com_2025-12-17T12-32-27.json +168 -0
  30. package/.ai-lighthouse/audit_github.com_2025-12-17T12-33-00.json +168 -0
  31. package/.ai-lighthouse/audit_github.com_2025-12-17T12-34-49.json +168 -0
  32. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-31.json +168 -0
  33. package/.ai-lighthouse/audit_stripe.com_2025-12-15T12-11-45.json +168 -0
  34. package/.ai-lighthouse/audit_tailwindcss.com_2025-12-15T12-12-01.json +169 -0
  35. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-08.json +24 -0
  36. package/.ai-lighthouse/crawl_example.com_2025-12-15T12-03-23.json +24 -0
  37. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-41-34.json +21 -0
  38. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-09.json +21 -0
  39. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-42-45.json +21 -0
  40. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-02.json +21 -0
  41. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-43-26.json +21 -0
  42. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-47-46.json +906 -0
  43. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-50-27.json +906 -0
  44. package/.ai-lighthouse/crawl_github.com_2025-12-15T11-52-59.json +906 -0
  45. package/.ai-lighthouse/crawl_github.com_2025-12-15T12-03-33.json +28 -0
  46. package/CLI_UI_README.md +211 -0
  47. package/EXAMPLES.md +87 -0
  48. package/IMPLEMENTATION.md +215 -0
  49. package/README.md +166 -0
  50. package/USAGE.md +264 -0
  51. package/WIZARD_GUIDE.md +340 -0
  52. package/bin/cli.js +2 -0
  53. package/dist/commands/audit-interactive.d.ts +2 -0
  54. package/dist/commands/audit-interactive.js +106 -0
  55. package/dist/commands/audit-wizard.d.ts +2 -0
  56. package/dist/commands/audit-wizard.js +110 -0
  57. package/dist/commands/audit.d.ts +2 -0
  58. package/dist/commands/audit.js +940 -0
  59. package/dist/commands/crawl.d.ts +2 -0
  60. package/dist/commands/crawl.js +267 -0
  61. package/dist/commands/report.d.ts +2 -0
  62. package/dist/commands/report.js +304 -0
  63. package/dist/index.d.ts +1 -0
  64. package/dist/index.js +16 -0
  65. package/dist/ui/AuditReportUI.d.ts +10 -0
  66. package/dist/ui/AuditReportUI.js +76 -0
  67. package/dist/ui/SetupWizard.d.ts +18 -0
  68. package/dist/ui/SetupWizard.js +179 -0
  69. package/dist/ui/components/AIUnderstandingSection.d.ts +6 -0
  70. package/dist/ui/components/AIUnderstandingSection.js +87 -0
  71. package/dist/ui/components/HallucinationSection.d.ts +6 -0
  72. package/dist/ui/components/HallucinationSection.js +84 -0
  73. package/dist/ui/components/IssuesSection.d.ts +6 -0
  74. package/dist/ui/components/IssuesSection.js +84 -0
  75. package/dist/ui/components/MessageAlignmentSection.d.ts +6 -0
  76. package/dist/ui/components/MessageAlignmentSection.js +108 -0
  77. package/dist/ui/components/OverviewSection.d.ts +6 -0
  78. package/dist/ui/components/OverviewSection.js +107 -0
  79. package/dist/ui/components/ScoreDisplay.d.ts +8 -0
  80. package/dist/ui/components/ScoreDisplay.js +41 -0
  81. package/dist/ui/components/TechnicalSection.d.ts +7 -0
  82. package/dist/ui/components/TechnicalSection.js +110 -0
  83. package/dist/utils/comprehensive-formatter.d.ts +5 -0
  84. package/dist/utils/comprehensive-formatter.js +370 -0
  85. package/package.json +49 -0
  86. package/src/commands/audit-interactive.ts +149 -0
  87. package/src/commands/audit-wizard.ts +137 -0
  88. package/src/commands/audit.ts +1012 -0
  89. package/src/commands/crawl.ts +307 -0
  90. package/src/commands/report.ts +321 -0
  91. package/src/index.ts +22 -0
  92. package/src/ui/AuditReportUI.tsx +151 -0
  93. package/src/ui/SetupWizard.tsx +294 -0
  94. package/src/ui/components/AIUnderstandingSection.tsx +183 -0
  95. package/src/ui/components/HallucinationSection.tsx +172 -0
  96. package/src/ui/components/IssuesSection.tsx +140 -0
  97. package/src/ui/components/MessageAlignmentSection.tsx +203 -0
  98. package/src/ui/components/OverviewSection.tsx +157 -0
  99. package/src/ui/components/ScoreDisplay.tsx +58 -0
  100. package/src/ui/components/TechnicalSection.tsx +200 -0
  101. package/src/utils/comprehensive-formatter.ts +455 -0
  102. package/test.sh +31 -0
  103. package/tsconfig.json +25 -0
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+ import Gradient from 'ink-gradient';
4
+ import BigText from 'ink-big-text';
5
+
6
+ interface ScoreDisplayProps {
7
+ score: number;
8
+ grade: string;
9
+ url: string;
10
+ }
11
+
12
+ export const ScoreDisplay: React.FC<ScoreDisplayProps> = ({ score, grade, url }) => {
13
+ const getGradeColor = (grade: string) => {
14
+ if (grade.startsWith('A')) return 'green';
15
+ if (grade.startsWith('B')) return 'blue';
16
+ if (grade.startsWith('C')) return 'yellow';
17
+ return 'red';
18
+ };
19
+
20
+ const getScoreMessage = (score: number) => {
21
+ if (score >= 90) return { status: 'Excellent', message: 'Your site is AI-ready!', color: 'green' };
22
+ if (score >= 80) return { status: 'Good', message: 'Your site works well with AI', color: 'blue' };
23
+ if (score >= 70) return { status: 'Fair', message: 'Room for improvement', color: 'yellow' };
24
+ if (score >= 60) return { status: 'Poor', message: 'Needs significant work', color: 'yellow' };
25
+ return { status: 'Critical', message: 'Major issues detected', color: 'red' };
26
+ };
27
+
28
+ const { status, message, color } = getScoreMessage(score);
29
+
30
+ return (
31
+ <Box flexDirection="column" paddingY={1}>
32
+ <Box marginBottom={1}>
33
+ <Gradient name="rainbow">
34
+ <BigText text={`${score}`} font="block" />
35
+ </Gradient>
36
+ </Box>
37
+
38
+ <Box marginBottom={1}>
39
+ <Text bold color={getGradeColor(grade)}>
40
+ Grade: {grade} • {status}
41
+ </Text>
42
+ </Box>
43
+
44
+ <Box marginBottom={1}>
45
+ <Text dimColor>{url}</Text>
46
+ </Box>
47
+
48
+ <Box
49
+ borderStyle="round"
50
+ borderColor={color as any}
51
+ paddingX={2}
52
+ paddingY={1}
53
+ >
54
+ <Text color={color as any}>{message}</Text>
55
+ </Box>
56
+ </Box>
57
+ );
58
+ };
@@ -0,0 +1,200 @@
1
+ import React from 'react';
2
+ import { Box, Text } from 'ink';
3
+
4
+ interface TechnicalSectionProps {
5
+ result: any;
6
+ scoring: any;
7
+ }
8
+
9
+ export const TechnicalSection: React.FC<TechnicalSectionProps> = ({ result, scoring }) => {
10
+ const renderProgressBar = (score: number, width: number = 20) => {
11
+ const filled = Math.round((score / 100) * width);
12
+ const empty = width - filled;
13
+ const color = score >= 80 ? 'green' : score >= 60 ? 'yellow' : 'red';
14
+
15
+ return (
16
+ <Text color={color}>
17
+ {'█'.repeat(filled)}
18
+ <Text dimColor>{'░'.repeat(empty)}</Text>
19
+ {` ${Math.round(score)}%`}
20
+ </Text>
21
+ );
22
+ };
23
+
24
+ return (
25
+ <Box flexDirection="column" paddingY={1}>
26
+ {/* Category Scores */}
27
+ <Box
28
+ flexDirection="column"
29
+ borderStyle="round"
30
+ borderColor="blue"
31
+ paddingX={2}
32
+ paddingY={1}
33
+ marginBottom={1}
34
+ >
35
+ <Text bold color="blue">
36
+ 📊 Category Scores
37
+ </Text>
38
+ <Box marginTop={1} flexDirection="column">
39
+ {scoring?.crawlability !== undefined && (
40
+ <Box flexDirection="column" marginTop={0.5}>
41
+ <Box justifyContent="space-between">
42
+ <Text bold>🕷️ Crawlability</Text>
43
+ <Text>{Math.round(scoring.crawlability)}/100</Text>
44
+ </Box>
45
+ <Box marginTop={0.5}>{renderProgressBar(scoring.crawlability)}</Box>
46
+ </Box>
47
+ )}
48
+ {scoring?.structure !== undefined && (
49
+ <Box flexDirection="column" marginTop={1}>
50
+ <Box justifyContent="space-between">
51
+ <Text bold>📐 Structure</Text>
52
+ <Text>{Math.round(scoring.structure)}/100</Text>
53
+ </Box>
54
+ <Box marginTop={0.5}>{renderProgressBar(scoring.structure)}</Box>
55
+ </Box>
56
+ )}
57
+ {scoring?.schema_coverage !== undefined && (
58
+ <Box flexDirection="column" marginTop={1}>
59
+ <Box justifyContent="space-between">
60
+ <Text bold>🏷️ Schema Coverage</Text>
61
+ <Text>{Math.round(scoring.schema_coverage)}/100</Text>
62
+ </Box>
63
+ <Box marginTop={0.5}>{renderProgressBar(scoring.schema_coverage)}</Box>
64
+ </Box>
65
+ )}
66
+ {scoring?.content_clarity !== undefined && (
67
+ <Box flexDirection="column" marginTop={1}>
68
+ <Box justifyContent="space-between">
69
+ <Text bold>📝 Content Clarity</Text>
70
+ <Text>{Math.round(scoring.content_clarity)}/100</Text>
71
+ </Box>
72
+ <Box marginTop={0.5}>{renderProgressBar(scoring.content_clarity)}</Box>
73
+ </Box>
74
+ )}
75
+ </Box>
76
+ </Box>
77
+
78
+ {/* Chunking Analysis */}
79
+ {result.chunking && Object.keys(result.chunking).length > 0 ? (
80
+ <Box
81
+ flexDirection="column"
82
+ borderStyle="round"
83
+ borderColor="green"
84
+ paddingX={2}
85
+ paddingY={1}
86
+ marginBottom={1}
87
+ >
88
+ <Text bold color="green">
89
+ 📄 Content Chunking Analysis
90
+ </Text>
91
+ <Box marginTop={1} flexDirection="column">
92
+ <Text>
93
+ <Text bold>Strategy:</Text> {result.chunking.chunkingStrategy}
94
+ </Text>
95
+ <Text>
96
+ <Text bold>Total Chunks:</Text> {result.chunking.totalChunks}
97
+ </Text>
98
+ <Text>
99
+ <Text bold>Avg Tokens/Chunk:</Text> {result.chunking.averageTokensPerChunk}
100
+ </Text>
101
+ <Text>
102
+ <Text bold>Avg Noise Ratio:</Text> {(result.chunking.averageNoiseRatio * 100).toFixed(1)}%
103
+ </Text>
104
+ </Box>
105
+
106
+ {result.chunking.chunkingStrategy === 'heading-based' && (
107
+ <Box marginTop={1}>
108
+ <Text color="green">✓ Heading-based chunking is ideal for AI comprehension</Text>
109
+ </Box>
110
+ )}
111
+ {result.chunking.chunkingStrategy === 'paragraph-based' && (
112
+ <Box marginTop={1}>
113
+ <Text color="yellow">⚠ Consider adding headings for better semantic structure</Text>
114
+ </Box>
115
+ )}
116
+ </Box>
117
+ ) : (
118
+ <Box
119
+ flexDirection="column"
120
+ borderStyle="round"
121
+ borderColor="gray"
122
+ paddingX={2}
123
+ paddingY={1}
124
+ marginBottom={1}
125
+ >
126
+ <Text dimColor>
127
+ 💡 Enable chunking analysis with --enable-chunking to see how your content is divided for AI processing
128
+ </Text>
129
+ </Box>
130
+ )}
131
+
132
+ {/* Extractability Analysis */}
133
+ {result.extractability && Object.keys(result.extractability).length > 0 ? (
134
+ <Box
135
+ flexDirection="column"
136
+ borderStyle="round"
137
+ borderColor="yellow"
138
+ paddingX={2}
139
+ paddingY={1}
140
+ marginBottom={1}
141
+ >
142
+ <Text bold color="yellow">
143
+ 🔄 Extractability Analysis
144
+ </Text>
145
+ <Box marginTop={1} flexDirection="column">
146
+ <Text>
147
+ <Text bold>Overall Score:</Text> {result.extractability.score.extractabilityScore}/100
148
+ </Text>
149
+ <Text>
150
+ <Text bold>Server-Rendered:</Text> {result.extractability.score.serverRenderedPercent}%
151
+ </Text>
152
+ </Box>
153
+
154
+ <Box marginTop={1} flexDirection="column">
155
+ <Text bold underline>Content Type Extractability:</Text>
156
+ {Object.entries(result.extractability.contentTypes).map(([type, data]: [string, any]) => {
157
+ const percentage = data.percentage;
158
+ const color = percentage >= 80 ? 'green' : percentage >= 50 ? 'yellow' : 'red';
159
+ return (
160
+ <Box key={type} marginTop={0.5}>
161
+ <Text>
162
+ <Text bold>{type.charAt(0).toUpperCase() + type.slice(1)}:</Text>{' '}
163
+ <Text color={color}>
164
+ {percentage}%
165
+ </Text>{' '}
166
+ <Text dimColor>({data.extractable}/{data.total})</Text>
167
+ </Text>
168
+ </Box>
169
+ );
170
+ })}
171
+ </Box>
172
+
173
+ {result.extractability.score.extractabilityScore >= 80 && (
174
+ <Box marginTop={1}>
175
+ <Text color="green">✓ Good extractability - AI can easily read your content</Text>
176
+ </Box>
177
+ )}
178
+ {result.extractability.score.extractabilityScore < 50 && (
179
+ <Box marginTop={1}>
180
+ <Text color="red">⚠ Low extractability - Consider server-side rendering</Text>
181
+ </Box>
182
+ )}
183
+ </Box>
184
+ ) : (
185
+ <Box
186
+ flexDirection="column"
187
+ borderStyle="round"
188
+ borderColor="gray"
189
+ paddingX={2}
190
+ paddingY={1}
191
+ marginBottom={1}
192
+ >
193
+ <Text dimColor>
194
+ 💡 Enable extractability analysis with --enable-extractability to see how well AI can extract your content
195
+ </Text>
196
+ </Box>
197
+ )}
198
+ </Box>
199
+ );
200
+ };