@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.
- package/README.md +126 -53
- package/dist/index.js +2788 -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
package/README.md
CHANGED
|
@@ -9,30 +9,123 @@ pnpm install
|
|
|
9
9
|
pnpm build
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
The simplest way to audit a website:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Interactive wizard (recommended for beginners)
|
|
18
|
+
ai-lighthouse audit https://example.com
|
|
19
|
+
|
|
20
|
+
# Using presets (recommended for most users)
|
|
21
|
+
ai-lighthouse audit https://example.com --preset ai-optimized
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Interactive Features
|
|
25
|
+
|
|
26
|
+
### Beautiful Terminal UI
|
|
27
|
+
|
|
28
|
+
The CLI features a beautiful interactive terminal UI built with React (Ink) that includes:
|
|
29
|
+
|
|
30
|
+
- **Animated Score Display** - Gradient text and grade badges
|
|
31
|
+
- **Tab Navigation** - Navigate through 6 analysis sections using arrow keys (1-6)
|
|
32
|
+
- **Real-time Loading** - Progress indicators for each analysis step
|
|
33
|
+
- **Color-coded Data** - All severity levels and scores are color-coded
|
|
34
|
+
- **Progress Bars** - Visual progress bars for dimension scores
|
|
35
|
+
|
|
36
|
+
### Interactive Wizard
|
|
37
|
+
|
|
38
|
+
When you run `ai-lighthouse audit <url>` without flags, the interactive wizard appears:
|
|
39
|
+
|
|
40
|
+
1. **Feature Selection** - Choose which analyses to run (AI Understanding, Chunking, etc.)
|
|
41
|
+
2. **LLM Configuration** - If AI features selected, configure your LLM provider
|
|
42
|
+
3. **Confirmation** - Review settings before starting the audit
|
|
43
|
+
4. **Results** - View results in the interactive terminal UI
|
|
44
|
+
|
|
45
|
+
The wizard mode makes it easy to configure audits without memorizing command-line flags.
|
|
46
|
+
|
|
12
47
|
## Usage
|
|
13
48
|
|
|
14
|
-
### Audit
|
|
49
|
+
### Audit with Presets (Recommended)
|
|
50
|
+
|
|
51
|
+
Presets provide pre-configured scanning profiles for common use cases:
|
|
15
52
|
|
|
16
53
|
```bash
|
|
17
|
-
|
|
54
|
+
# Fast scan with core rules only (~5-10 seconds)
|
|
55
|
+
ai-lighthouse audit https://example.com --preset basic
|
|
56
|
+
|
|
57
|
+
# Balanced scan with AI insights (~30-60 seconds) - Recommended
|
|
58
|
+
ai-lighthouse audit https://example.com --preset ai-optimized
|
|
59
|
+
|
|
60
|
+
# Comprehensive scan with all features (~2-5 minutes)
|
|
61
|
+
ai-lighthouse audit https://example.com --preset full
|
|
62
|
+
|
|
63
|
+
# Quick scan showing only critical issues (~3-5 seconds)
|
|
64
|
+
ai-lighthouse audit https://example.com --preset minimal
|
|
18
65
|
```
|
|
19
66
|
|
|
20
|
-
###
|
|
67
|
+
### List Available Presets
|
|
21
68
|
|
|
22
69
|
```bash
|
|
23
|
-
ai-lighthouse
|
|
70
|
+
ai-lighthouse presets
|
|
24
71
|
```
|
|
25
72
|
|
|
26
|
-
###
|
|
73
|
+
### Configure LLM Provider (for AI-powered presets)
|
|
27
74
|
|
|
28
75
|
```bash
|
|
29
|
-
|
|
76
|
+
# Using Ollama (local, free)
|
|
77
|
+
ai-lighthouse audit https://example.com --preset ai-optimized \
|
|
78
|
+
--llm-provider ollama \
|
|
79
|
+
--llm-model qwen2.5:0.5b
|
|
80
|
+
|
|
81
|
+
# Using OpenAI
|
|
82
|
+
ai-lighthouse audit https://example.com --preset ai-optimized \
|
|
83
|
+
--llm-provider openai \
|
|
84
|
+
--llm-model gpt-4o-mini \
|
|
85
|
+
--llm-api-key sk-...
|
|
86
|
+
|
|
87
|
+
# Using Anthropic
|
|
88
|
+
ai-lighthouse audit https://example.com --preset full \
|
|
89
|
+
--llm-provider anthropic \
|
|
90
|
+
--llm-model claude-3-5-sonnet-20241022 \
|
|
91
|
+
--llm-api-key sk-ant-...
|
|
30
92
|
```
|
|
31
93
|
|
|
32
|
-
###
|
|
94
|
+
### Output Formats
|
|
33
95
|
|
|
34
96
|
```bash
|
|
35
|
-
|
|
97
|
+
# Save as JSON
|
|
98
|
+
ai-lighthouse audit https://example.com --preset basic --output json
|
|
99
|
+
|
|
100
|
+
# Generate HTML report
|
|
101
|
+
ai-lighthouse audit https://example.com --preset ai-optimized --output html
|
|
102
|
+
|
|
103
|
+
# Generate PDF report
|
|
104
|
+
ai-lighthouse audit https://example.com --preset full --output pdf
|
|
105
|
+
|
|
106
|
+
# Interactive terminal UI (default)
|
|
107
|
+
ai-lighthouse audit https://example.com --preset ai-optimized
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### CI/CD Integration
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Exit with code 1 if score is below threshold
|
|
114
|
+
ai-lighthouse audit https://example.com --preset minimal --threshold 80
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Advanced: Override Preset Defaults
|
|
118
|
+
|
|
119
|
+
You can override any preset option:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Use ai-optimized preset but enable hallucination detection
|
|
123
|
+
ai-lighthouse audit https://example.com --preset ai-optimized \
|
|
124
|
+
--enable-hallucination
|
|
125
|
+
|
|
126
|
+
# Use full preset but limit to 10 issues
|
|
127
|
+
ai-lighthouse audit https://example.com --preset full \
|
|
128
|
+
--max-issues 10
|
|
36
129
|
```
|
|
37
130
|
|
|
38
131
|
## Commands
|
|
@@ -41,57 +134,37 @@ ai-lighthouse report ./.ai-lighthouse/last_run.json --open
|
|
|
41
134
|
|
|
42
135
|
Audit a single webpage for AI readiness.
|
|
43
136
|
|
|
44
|
-
**Options:**
|
|
45
|
-
- `-o, --output <format>` - Output format: json, html, lhr, csv (default: json)
|
|
46
|
-
- `-r, --rules <preset>` - Rule preset: default, strict, minimal (default: default)
|
|
47
|
-
- `-d, --depth <number>` - Crawl depth for multi-page audits (default: 1)
|
|
48
|
-
- `-p, --pages <urls>` - Comma-separated list of specific pages to audit
|
|
49
|
-
- `--cache-ttl <seconds>` - Cache TTL in seconds to avoid re-fetching
|
|
50
|
-
- `--threshold <score>` - Minimum score threshold (exit 1 if below)
|
|
51
|
-
- `--max-chunk-tokens <number>` - Maximum tokens per content chunk (default: 1200)
|
|
52
|
-
- `--chunking-strategy <strategy>` - Chunking strategy: auto, heading-based, paragraph-based (default: auto)
|
|
53
|
-
- `--enable-chunking` - Enable detailed content chunking analysis
|
|
54
|
-
- `--enable-extractability` - Enable extractability mapping
|
|
55
|
-
- `--enable-hallucination` - Enable hallucination detection
|
|
56
|
-
- `--enable-llm` - Enable LLM comprehension analysis
|
|
57
|
-
- `--min-impact <number>` - Minimum impact score to include (default: 8)
|
|
58
|
-
- `--min-confidence <number>` - Minimum confidence to include 0-1 (default: 0.7)
|
|
59
|
-
- `--max-issues <number>` - Maximum issues to return (default: 20)
|
|
60
|
-
- `--llm-provider <provider>` - LLM provider: openai, anthropic, ollama, local
|
|
61
|
-
- `--llm-model <model>` - LLM model name
|
|
62
|
-
- `--llm-base-url <url>` - LLM API base URL
|
|
63
|
-
- `--llm-api-key <key>` - LLM API key
|
|
137
|
+
**Primary Options:**
|
|
64
138
|
|
|
65
|
-
|
|
139
|
+
- `-o, --output <format>` - Output format: json, html, pdf, interactive (default: interactive)
|
|
140
|
+
- `-p, --preset <name>` - Preset configuration: basic, ai-optimized, full, minimal
|
|
66
141
|
|
|
67
|
-
|
|
68
|
-
# Basic audit
|
|
69
|
-
ai-lighthouse audit https://example.com
|
|
142
|
+
**LLM Configuration (for AI-powered presets):**
|
|
70
143
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
--enable-extractability \
|
|
76
|
-
--enable-hallucination \
|
|
77
|
-
--enable-llm \
|
|
78
|
-
--llm-provider ollama \
|
|
79
|
-
--llm-model qwen2.5:0.5b
|
|
144
|
+
- `--llm-provider <provider>` - LLM provider: openai, anthropic, ollama (default: ollama)
|
|
145
|
+
- `--llm-model <model>` - LLM model name (e.g., qwen2.5:0.5b, gpt-4o-mini)
|
|
146
|
+
- `--llm-api-key <key>` - LLM API key (for OpenAI, Anthropic, etc.)
|
|
147
|
+
- `--llm-base-url <url>` - LLM API base URL (for custom endpoints)
|
|
80
148
|
|
|
81
|
-
|
|
82
|
-
ai-lighthouse audit https://example.com \
|
|
83
|
-
--enable-chunking \
|
|
84
|
-
--chunking-strategy paragraph-based \
|
|
85
|
-
--max-chunk-tokens 1000
|
|
149
|
+
**Advanced Overrides (for power users):**
|
|
86
150
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
151
|
+
- `--enable-chunking` - Override: Enable chunking analysis
|
|
152
|
+
- `--enable-extractability` - Override: Enable extractability mapping
|
|
153
|
+
- `--enable-hallucination` - Override: Enable hallucination detection
|
|
154
|
+
- `--enable-llm` - Override: Enable LLM comprehension
|
|
155
|
+
- `--min-impact <number>` - Override: Minimum impact score to include
|
|
156
|
+
- `--min-confidence <number>` - Override: Minimum confidence (0-1)
|
|
157
|
+
- `--max-issues <number>` - Override: Maximum issues to show
|
|
158
|
+
- `--max-chunk-tokens <number>` - Override: Max tokens per chunk
|
|
159
|
+
- `--chunking-strategy <strategy>` - Override: Chunking strategy (auto, heading-based, paragraph-based)
|
|
91
160
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
161
|
+
**Utility Options:**
|
|
162
|
+
|
|
163
|
+
- `--threshold <score>` - Exit with code 1 if score is below this threshold
|
|
164
|
+
|
|
165
|
+
### `presets`
|
|
166
|
+
|
|
167
|
+
List all available preset configurations with descriptions and estimated durations.
|
|
95
168
|
|
|
96
169
|
### `crawl <url>`
|
|
97
170
|
|