@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
package/USAGE.md
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
# AI Lighthouse CLI - Quick Start Guide
|
|
2
|
-
|
|
3
|
-
## Simplest Usage (Recommended for New Users)
|
|
4
|
-
|
|
5
|
-
Just run with a URL - the wizard will guide you through the rest!
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
ai-lighthouse audit https://example.com
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
This will:
|
|
12
|
-
1. **Ask you** which features to enable (AI Understanding, Chunking, etc.)
|
|
13
|
-
2. **Guide you** through LLM provider setup if needed
|
|
14
|
-
3. **Show results** in a beautiful interactive UI
|
|
15
|
-
|
|
16
|
-
## How It Works
|
|
17
|
-
|
|
18
|
-
### Basic Audit (No Additional Features)
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
ai-lighthouse audit https://example.com
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
When the wizard appears:
|
|
25
|
-
- Just press **Enter** on "Continue with selected features"
|
|
26
|
-
- You'll get a basic audit with core metrics
|
|
27
|
-
|
|
28
|
-
### With AI Analysis
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
ai-lighthouse audit https://example.com
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
When the wizard appears:
|
|
35
|
-
1. Select **🧠 AI Understanding** (press Enter to toggle)
|
|
36
|
-
2. Select **Continue**
|
|
37
|
-
3. Choose your LLM provider (e.g., **Ollama** for local)
|
|
38
|
-
4. Enter model name (e.g., `qwen2.5:0.5b`)
|
|
39
|
-
5. Confirm settings
|
|
40
|
-
|
|
41
|
-
### Full-Featured Audit
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
ai-lighthouse audit https://example.com
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
In the wizard, select all features:
|
|
48
|
-
- ✓ 🧠 AI Understanding
|
|
49
|
-
- ✓ 📄 Content Chunking
|
|
50
|
-
- ✓ 🔄 Extractability
|
|
51
|
-
- ✓ ⚠️ Hallucination Detection
|
|
52
|
-
- Continue
|
|
53
|
-
|
|
54
|
-
Then configure your LLM provider.
|
|
55
|
-
|
|
56
|
-
## Advanced Usage (Skip Wizard)
|
|
57
|
-
|
|
58
|
-
If you know exactly what you want, you can skip the wizard with flags:
|
|
59
|
-
|
|
60
|
-
### Quick Examples
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Basic audit, skip wizard, export as JSON
|
|
64
|
-
ai-lighthouse audit https://example.com --output json
|
|
65
|
-
|
|
66
|
-
# With Ollama (local LLM)
|
|
67
|
-
ai-lighthouse audit https://example.com \
|
|
68
|
-
--enable-llm \
|
|
69
|
-
--llm-provider ollama \
|
|
70
|
-
--llm-model qwen2.5:0.5b
|
|
71
|
-
|
|
72
|
-
# With OpenAI
|
|
73
|
-
ai-lighthouse audit https://example.com \
|
|
74
|
-
--enable-llm \
|
|
75
|
-
--llm-provider openai \
|
|
76
|
-
--llm-api-key sk-...
|
|
77
|
-
|
|
78
|
-
# Full-featured with Ollama
|
|
79
|
-
ai-lighthouse audit https://example.com \
|
|
80
|
-
--enable-llm \
|
|
81
|
-
--enable-chunking \
|
|
82
|
-
--enable-extractability \
|
|
83
|
-
--enable-hallucination \
|
|
84
|
-
--llm-provider ollama \
|
|
85
|
-
--llm-model qwen2.5:0.5b
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## When Does the Wizard Appear?
|
|
89
|
-
|
|
90
|
-
The wizard **automatically shows** when:
|
|
91
|
-
- ✅ You run `ai-lighthouse audit <url>` with NO feature flags
|
|
92
|
-
- ✅ You just provide a URL
|
|
93
|
-
|
|
94
|
-
The wizard **does NOT show** when:
|
|
95
|
-
- ❌ You pass `--enable-llm` or other feature flags
|
|
96
|
-
- ❌ You specify `--output json` (or html, pdf, csv)
|
|
97
|
-
- ❌ You're using the command in a script/CI
|
|
98
|
-
|
|
99
|
-
This means:
|
|
100
|
-
- **Interactive use** = Wizard (easy!)
|
|
101
|
-
- **Scripted use** = No wizard (predictable!)
|
|
102
|
-
|
|
103
|
-
## Output Formats
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Interactive UI (default)
|
|
107
|
-
ai-lighthouse audit https://example.com
|
|
108
|
-
|
|
109
|
-
# JSON (for scripts/CI)
|
|
110
|
-
ai-lighthouse audit https://example.com --output json
|
|
111
|
-
|
|
112
|
-
# HTML report
|
|
113
|
-
ai-lighthouse audit https://example.com --output html
|
|
114
|
-
|
|
115
|
-
# PDF report
|
|
116
|
-
ai-lighthouse audit https://example.com --output pdf
|
|
117
|
-
|
|
118
|
-
# Lighthouse format
|
|
119
|
-
ai-lighthouse audit https://example.com --output lhr
|
|
120
|
-
|
|
121
|
-
# CSV export
|
|
122
|
-
ai-lighthouse audit https://example.com --output csv
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Common Workflows
|
|
126
|
-
|
|
127
|
-
### First Time Using the Tool
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Just run it!
|
|
131
|
-
ai-lighthouse audit https://yoursite.com
|
|
132
|
-
|
|
133
|
-
# The wizard will guide you through everything
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Regular Quick Check
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# Run basic audit (press Enter when wizard appears)
|
|
140
|
-
ai-lighthouse audit https://yoursite.com
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Deep Analysis
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
# Select all features in the wizard
|
|
147
|
-
ai-lighthouse audit https://yoursite.com
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Automation / CI/CD
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
# Skip wizard with flags
|
|
154
|
-
ai-lighthouse audit https://yoursite.com \
|
|
155
|
-
--output json \
|
|
156
|
-
--threshold 80
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Compare Before/After Changes
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
# Before changes
|
|
163
|
-
ai-lighthouse audit https://yoursite.com --output json > before.json
|
|
164
|
-
|
|
165
|
-
# Make changes to your site
|
|
166
|
-
|
|
167
|
-
# After changes
|
|
168
|
-
ai-lighthouse audit https://yoursite.com --output json > after.json
|
|
169
|
-
|
|
170
|
-
# Compare the JSON files
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Tips
|
|
174
|
-
|
|
175
|
-
### 🎯 For Beginners
|
|
176
|
-
- Just use `ai-lighthouse audit <url>`
|
|
177
|
-
- Let the wizard guide you
|
|
178
|
-
- Start with basic audit (no features)
|
|
179
|
-
- Enable features one at a time to learn
|
|
180
|
-
|
|
181
|
-
### 🚀 For Power Users
|
|
182
|
-
- Use flags to skip the wizard
|
|
183
|
-
- Create shell aliases for common configs
|
|
184
|
-
- Use `--output json` for scripting
|
|
185
|
-
- Pipe output to `jq` for filtering
|
|
186
|
-
|
|
187
|
-
### 🤖 For CI/CD
|
|
188
|
-
- Always use `--output json`
|
|
189
|
-
- Add `--threshold` to fail builds on low scores
|
|
190
|
-
- Store API keys in environment variables
|
|
191
|
-
- Use `--no-color` if needed
|
|
192
|
-
|
|
193
|
-
## Examples by Use Case
|
|
194
|
-
|
|
195
|
-
### Local Development with Ollama
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
# 1. Start Ollama
|
|
199
|
-
ollama serve
|
|
200
|
-
|
|
201
|
-
# 2. Pull a small model
|
|
202
|
-
ollama pull qwen2.5:0.5b
|
|
203
|
-
|
|
204
|
-
# 3. Run audit (wizard will auto-detect Ollama settings)
|
|
205
|
-
ai-lighthouse audit http://localhost:3000
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Production Site Audit
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
# Let wizard guide you
|
|
212
|
-
ai-lighthouse audit https://yourproductionsite.com
|
|
213
|
-
|
|
214
|
-
# Or be specific
|
|
215
|
-
ai-lighthouse audit https://yourproductionsite.com \
|
|
216
|
-
--enable-llm \
|
|
217
|
-
--enable-hallucination \
|
|
218
|
-
--llm-provider openai \
|
|
219
|
-
--llm-api-key $OPENAI_API_KEY
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
### CI/CD Pipeline
|
|
223
|
-
|
|
224
|
-
```yaml
|
|
225
|
-
# .github/workflows/audit.yml
|
|
226
|
-
- name: Audit website
|
|
227
|
-
run: |
|
|
228
|
-
ai-lighthouse audit https://staging.example.com \
|
|
229
|
-
--output json \
|
|
230
|
-
--threshold 80
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Batch Auditing Multiple URLs
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
# audit-sites.sh
|
|
237
|
-
for url in https://site1.com https://site2.com https://site3.com; do
|
|
238
|
-
ai-lighthouse audit $url --output json > "$(echo $url | sed 's/https:\/\///g').json"
|
|
239
|
-
done
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
## Getting Help
|
|
243
|
-
|
|
244
|
-
```bash
|
|
245
|
-
# Main help
|
|
246
|
-
ai-lighthouse --help
|
|
247
|
-
|
|
248
|
-
# Command help
|
|
249
|
-
ai-lighthouse audit --help
|
|
250
|
-
|
|
251
|
-
# Version
|
|
252
|
-
ai-lighthouse --version
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
## What's Next?
|
|
256
|
-
|
|
257
|
-
After you've run a few audits:
|
|
258
|
-
|
|
259
|
-
1. **Read the full guide**: See [WIZARD_GUIDE.md](./WIZARD_GUIDE.md) for detailed wizard usage
|
|
260
|
-
2. **Explore the UI**: See [CLI_UI_README.md](./CLI_UI_README.md) for UI features
|
|
261
|
-
3. **Learn the flags**: Run `ai-lighthouse audit --help` for all options
|
|
262
|
-
4. **Automate**: Create scripts for regular audits
|
|
263
|
-
|
|
264
|
-
Happy auditing! 🚨✨
|
package/WIZARD_GUIDE.md
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
# AI Lighthouse Interactive Wizard Guide
|
|
2
|
-
|
|
3
|
-
The AI Lighthouse CLI now features an **interactive setup wizard** that simplifies configuration by asking you questions instead of requiring complex command-line flags!
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
### Option 1: Wizard with URL
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ai-lighthouse wizard https://example.com
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
or use the short alias:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ai-lighthouse w https://example.com
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Option 2: Wizard without URL (asks you for it)
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
ai-lighthouse wizard
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## How It Works
|
|
26
|
-
|
|
27
|
-
The wizard guides you through a simple, step-by-step configuration process:
|
|
28
|
-
|
|
29
|
-
### Step 1: URL Input (if not provided)
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
🚨 AI Lighthouse Setup Wizard
|
|
33
|
-
Configure your audit settings
|
|
34
|
-
|
|
35
|
-
Enter the URL to audit:
|
|
36
|
-
URL: _
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Type your URL and press Enter.
|
|
40
|
-
|
|
41
|
-
### Step 2: Feature Selection
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
Select features to enable:
|
|
45
|
-
Selected: None (basic audit only)
|
|
46
|
-
|
|
47
|
-
🧠 AI Understanding (LLM Analysis)
|
|
48
|
-
📄 Content Chunking Analysis
|
|
49
|
-
🔄 Extractability Analysis
|
|
50
|
-
⚠️ Hallucination Detection
|
|
51
|
-
✅ Continue with selected features
|
|
52
|
-
|
|
53
|
-
Use ↑↓ to navigate, Enter to toggle/continue
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
- Use **↑** and **↓** arrow keys to navigate
|
|
57
|
-
- Press **Enter** to toggle features on/off (✓ appears when selected)
|
|
58
|
-
- Select **✅ Continue** when ready
|
|
59
|
-
|
|
60
|
-
### Step 3: LLM Provider Selection (if LLM features enabled)
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Select LLM provider:
|
|
64
|
-
|
|
65
|
-
OpenAI (GPT-4, GPT-3.5)
|
|
66
|
-
Anthropic (Claude)
|
|
67
|
-
Ollama (Local)
|
|
68
|
-
Custom/Local Provider
|
|
69
|
-
|
|
70
|
-
Use ↑↓ to navigate, Enter to select
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Choose your preferred LLM provider.
|
|
74
|
-
|
|
75
|
-
### Step 4: Model Name
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
Enter LLM model name:
|
|
79
|
-
Model: _
|
|
80
|
-
|
|
81
|
-
Leave empty for default, or press Enter to continue
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**Defaults:**
|
|
85
|
-
- OpenAI: `gpt-4o-mini`
|
|
86
|
-
- Anthropic: `claude-3-5-sonnet-20241022`
|
|
87
|
-
- Ollama: `qwen2.5:0.5b` (or any installed model)
|
|
88
|
-
|
|
89
|
-
### Step 5: API Key (for OpenAI/Anthropic)
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Enter API key:
|
|
93
|
-
API Key: ****
|
|
94
|
-
|
|
95
|
-
Your API key will not be stored
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Type your API key (it will be masked with `*` for security).
|
|
99
|
-
|
|
100
|
-
### Step 6: Base URL (optional, for Ollama/Custom)
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Enter API base URL (optional):
|
|
104
|
-
Base URL: _
|
|
105
|
-
|
|
106
|
-
Press Enter to continue (leave empty for default)
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
**Defaults:**
|
|
110
|
-
- Ollama: `http://localhost:11434` (auto-filled)
|
|
111
|
-
- Custom: You specify
|
|
112
|
-
|
|
113
|
-
### Step 7: Running the Audit
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
✓ Configuration Complete
|
|
117
|
-
Starting audit...
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
The wizard automatically transitions to the audit UI!
|
|
121
|
-
|
|
122
|
-
## Wizard vs. Traditional Commands
|
|
123
|
-
|
|
124
|
-
### With Wizard (Simplified)
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
# Just run the wizard
|
|
128
|
-
ai-lighthouse wizard https://example.com
|
|
129
|
-
|
|
130
|
-
# Then follow the prompts:
|
|
131
|
-
# 1. Select "AI Understanding (LLM Analysis)" ✓
|
|
132
|
-
# 2. Select "Hallucination Detection" ✓
|
|
133
|
-
# 3. Select "Continue"
|
|
134
|
-
# 4. Choose "Ollama (Local)"
|
|
135
|
-
# 5. Enter model: "qwen2.5:0.5b"
|
|
136
|
-
# 6. Confirm base URL: "http://localhost:11434"
|
|
137
|
-
# Done!
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Without Wizard (Traditional)
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
ai-lighthouse audit https://example.com \
|
|
144
|
-
--enable-llm \
|
|
145
|
-
--enable-hallucination \
|
|
146
|
-
--llm-provider ollama \
|
|
147
|
-
--llm-model qwen2.5:0.5b \
|
|
148
|
-
--llm-base-url http://localhost:11434
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
The wizard is **much easier** for beginners and interactive use!
|
|
152
|
-
|
|
153
|
-
## Feature Matrix
|
|
154
|
-
|
|
155
|
-
When you select features in the wizard:
|
|
156
|
-
|
|
157
|
-
| Feature Selected | What It Enables |
|
|
158
|
-
|-----------------|-----------------|
|
|
159
|
-
| 🧠 AI Understanding | LLM-powered page analysis, entity extraction, FAQ suggestions |
|
|
160
|
-
| 📄 Content Chunking | Shows how your content is divided for AI processing |
|
|
161
|
-
| 🔄 Extractability | Analyzes how well AI can extract your content |
|
|
162
|
-
| ⚠️ Hallucination Detection | Identifies potential hallucination triggers (requires AI Understanding) |
|
|
163
|
-
|
|
164
|
-
## Tips & Tricks
|
|
165
|
-
|
|
166
|
-
### Quick Basic Audit
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
# Wizard with URL, select "Continue" without features
|
|
170
|
-
ai-lighthouse w https://example.com
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Full-Featured Audit
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
# Enable all features in the wizard
|
|
177
|
-
ai-lighthouse wizard https://example.com
|
|
178
|
-
# Then select all 4 features before continuing
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Skip Wizard for Automation
|
|
182
|
-
|
|
183
|
-
For scripts and CI/CD, use the traditional `audit` command with flags:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
ai-lighthouse audit https://example.com --output json
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Common Workflows
|
|
190
|
-
|
|
191
|
-
### First-Time User
|
|
192
|
-
|
|
193
|
-
1. Run wizard: `ai-lighthouse wizard`
|
|
194
|
-
2. Enter your website URL
|
|
195
|
-
3. Try without features first (press "Continue")
|
|
196
|
-
4. Review the basic report
|
|
197
|
-
5. Run again with features to see more insights
|
|
198
|
-
|
|
199
|
-
### Using Local Ollama
|
|
200
|
-
|
|
201
|
-
1. Start Ollama: `ollama serve`
|
|
202
|
-
2. Pull a small model: `ollama pull qwen2.5:0.5b`
|
|
203
|
-
3. Run wizard: `ai-lighthouse w https://example.com`
|
|
204
|
-
4. Select "AI Understanding" ✓
|
|
205
|
-
5. Choose "Ollama (Local)"
|
|
206
|
-
6. Enter model name: `qwen2.5:0.5b`
|
|
207
|
-
7. Confirm default URL
|
|
208
|
-
|
|
209
|
-
### Using OpenAI
|
|
210
|
-
|
|
211
|
-
1. Get API key from https://platform.openai.com/api-keys
|
|
212
|
-
2. Run wizard: `ai-lighthouse w https://example.com`
|
|
213
|
-
3. Select desired features
|
|
214
|
-
4. Choose "OpenAI (GPT-4, GPT-3.5)"
|
|
215
|
-
5. Enter model: (leave empty for default or type `gpt-4o-mini`)
|
|
216
|
-
6. Paste API key when prompted
|
|
217
|
-
|
|
218
|
-
### Using Anthropic Claude
|
|
219
|
-
|
|
220
|
-
1. Get API key from https://console.anthropic.com/
|
|
221
|
-
2. Run wizard: `ai-lighthouse w https://example.com`
|
|
222
|
-
3. Select features
|
|
223
|
-
4. Choose "Anthropic (Claude)"
|
|
224
|
-
5. Enter model: (leave empty for default)
|
|
225
|
-
6. Paste API key when prompted
|
|
226
|
-
|
|
227
|
-
## Keyboard Shortcuts in Wizard
|
|
228
|
-
|
|
229
|
-
- **↑** / **↓** - Navigate options
|
|
230
|
-
- **Enter** - Select/toggle option
|
|
231
|
-
- **Type** - Input text in text fields
|
|
232
|
-
- **Ctrl+C** - Cancel and exit
|
|
233
|
-
|
|
234
|
-
## Benefits of Using the Wizard
|
|
235
|
-
|
|
236
|
-
✅ **No memorization** - Don't need to remember complex flags
|
|
237
|
-
✅ **Visual feedback** - See your selections with checkmarks
|
|
238
|
-
✅ **Smart defaults** - Suggests appropriate defaults for each provider
|
|
239
|
-
✅ **Guided flow** - Only asks relevant questions
|
|
240
|
-
✅ **Error prevention** - Validates inputs as you go
|
|
241
|
-
✅ **Security** - Masks sensitive API keys
|
|
242
|
-
✅ **Quick setup** - Faster than typing long commands
|
|
243
|
-
|
|
244
|
-
## When to Use Each Mode
|
|
245
|
-
|
|
246
|
-
### Use the Wizard When:
|
|
247
|
-
- You're learning the tool
|
|
248
|
-
- You want to try different configurations
|
|
249
|
-
- You don't remember all the flags
|
|
250
|
-
- You're doing interactive analysis
|
|
251
|
-
- You want a guided experience
|
|
252
|
-
|
|
253
|
-
### Use Direct Commands When:
|
|
254
|
-
- You're automating audits (CI/CD)
|
|
255
|
-
- You're writing scripts
|
|
256
|
-
- You know exactly what you want
|
|
257
|
-
- You're running batch operations
|
|
258
|
-
- You want to pipe output to other tools
|
|
259
|
-
|
|
260
|
-
## Examples
|
|
261
|
-
|
|
262
|
-
### Example 1: Quick Test Run
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
$ ai-lighthouse w
|
|
266
|
-
|
|
267
|
-
🚨 AI Lighthouse Setup Wizard
|
|
268
|
-
Configure your audit settings
|
|
269
|
-
|
|
270
|
-
Enter the URL to audit:
|
|
271
|
-
URL: https://example.com
|
|
272
|
-
|
|
273
|
-
Select features to enable:
|
|
274
|
-
Selected: None (basic audit only)
|
|
275
|
-
> ✅ Continue with selected features
|
|
276
|
-
|
|
277
|
-
✓ Configuration Complete
|
|
278
|
-
Starting audit...
|
|
279
|
-
|
|
280
|
-
[Beautiful audit UI appears]
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Example 2: Full Analysis with Ollama
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
$ ai-lighthouse wizard https://mysite.com
|
|
287
|
-
|
|
288
|
-
🚨 AI Lighthouse Setup Wizard
|
|
289
|
-
Configure your audit settings
|
|
290
|
-
|
|
291
|
-
Select features to enable:
|
|
292
|
-
Selected: 🧠, 📄, 🔄, ⚠️
|
|
293
|
-
> ✅ Continue with selected features
|
|
294
|
-
|
|
295
|
-
Select LLM provider:
|
|
296
|
-
> Ollama (Local)
|
|
297
|
-
|
|
298
|
-
Enter LLM model name:
|
|
299
|
-
Model: llama2
|
|
300
|
-
|
|
301
|
-
Enter API base URL (optional):
|
|
302
|
-
Base URL: http://localhost:11434
|
|
303
|
-
|
|
304
|
-
✓ Configuration Complete
|
|
305
|
-
Starting audit...
|
|
306
|
-
|
|
307
|
-
[Comprehensive audit with all features]
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Troubleshooting
|
|
311
|
-
|
|
312
|
-
### Wizard doesn't start
|
|
313
|
-
- Make sure you're using `wizard` or `w` command
|
|
314
|
-
- Check that you have Node.js 18+ installed
|
|
315
|
-
|
|
316
|
-
### API key not working
|
|
317
|
-
- Verify your API key is correct
|
|
318
|
-
- Check that you have credits/access
|
|
319
|
-
- Ensure you selected the right provider
|
|
320
|
-
|
|
321
|
-
### Ollama connection fails
|
|
322
|
-
- Verify Ollama is running: `ollama list`
|
|
323
|
-
- Check the base URL is correct (default: `http://localhost:11434`)
|
|
324
|
-
- Ensure the model is pulled: `ollama pull modelname`
|
|
325
|
-
|
|
326
|
-
### Features not showing data
|
|
327
|
-
- Make sure you enabled the features in the wizard
|
|
328
|
-
- Check that LLM analysis completed successfully
|
|
329
|
-
- Some features require LLM to be enabled
|
|
330
|
-
|
|
331
|
-
## Next Steps
|
|
332
|
-
|
|
333
|
-
After using the wizard a few times, you might want to:
|
|
334
|
-
|
|
335
|
-
1. **Save common configurations** - Use the traditional command with flags in a script
|
|
336
|
-
2. **Explore all options** - Check `ai-lighthouse audit --help` for advanced flags
|
|
337
|
-
3. **Automate audits** - Integrate into your CI/CD pipeline
|
|
338
|
-
4. **Compare results** - Run audits regularly to track improvements
|
|
339
|
-
|
|
340
|
-
Happy auditing! 🚨✨
|
package/bin/cli.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { analyzeUrlWithRules } from 'scanner';
|
|
2
|
-
import { calculateAIReadiness } from 'scanner';
|
|
3
|
-
import { render } from 'ink';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { AuditReportUI } from '../ui/AuditReportUI.js';
|
|
6
|
-
export function auditInteractiveCommand(program) {
|
|
7
|
-
program
|
|
8
|
-
.command('audit-interactive')
|
|
9
|
-
.description('Audit a website for AI readiness with interactive UI')
|
|
10
|
-
.argument('<url>', 'URL to audit')
|
|
11
|
-
.option('-r, --rules <preset>', 'Rule preset: default, strict, minimal', 'default')
|
|
12
|
-
.option('-d, --depth <number>', 'Crawl depth (for multi-page audits)', parseInt, 1)
|
|
13
|
-
.option('-p, --pages <urls>', 'Comma-separated list of specific pages to audit')
|
|
14
|
-
.option('--cache-ttl <seconds>', 'Cache TTL in seconds to avoid re-fetching', parseInt)
|
|
15
|
-
.option('--threshold <score>', 'Minimum score threshold (exit 1 if below)', parseInt)
|
|
16
|
-
.option('--max-chunk-tokens <number>', 'Maximum tokens per content chunk', parseInt, 1200)
|
|
17
|
-
.option('--chunking-strategy <strategy>', 'Chunking strategy: auto, heading-based, paragraph-based', 'auto')
|
|
18
|
-
.option('--enable-chunking', 'Enable detailed content chunking analysis', false)
|
|
19
|
-
.option('--enable-extractability', 'Enable extractability mapping', false)
|
|
20
|
-
.option('--enable-hallucination', 'Enable hallucination detection', false)
|
|
21
|
-
.option('--enable-llm', 'Enable LLM comprehension analysis', false)
|
|
22
|
-
.option('--min-impact <number>', 'Minimum impact score to include', parseInt, 8)
|
|
23
|
-
.option('--min-confidence <number>', 'Minimum confidence to include (0-1)', parseFloat, 0.7)
|
|
24
|
-
.option('--max-issues <number>', 'Maximum issues to return', parseInt, 20)
|
|
25
|
-
.option('--llm-provider <provider>', 'LLM provider: openai, anthropic, ollama, local')
|
|
26
|
-
.option('--llm-model <model>', 'LLM model name')
|
|
27
|
-
.option('--llm-base-url <url>', 'LLM API base URL')
|
|
28
|
-
.option('--llm-api-key <key>', 'LLM API key')
|
|
29
|
-
.action(async (url, options) => {
|
|
30
|
-
// Show loading UI
|
|
31
|
-
const { waitUntilExit, clear, rerender } = render(React.createElement(AuditReportUI, {
|
|
32
|
-
url,
|
|
33
|
-
result: {},
|
|
34
|
-
aiReadiness: {},
|
|
35
|
-
loading: true,
|
|
36
|
-
currentStep: 'Starting audit...',
|
|
37
|
-
}));
|
|
38
|
-
try {
|
|
39
|
-
// Validate URL
|
|
40
|
-
const urlObj = new URL(url);
|
|
41
|
-
// Build scan options
|
|
42
|
-
const scanOptions = {
|
|
43
|
-
maxChunkTokens: options.maxChunkTokens,
|
|
44
|
-
chunkingStrategy: options.chunkingStrategy,
|
|
45
|
-
enableChunking: options.enableChunking,
|
|
46
|
-
enableExtractability: options.enableExtractability,
|
|
47
|
-
enableHallucinationDetection: options.enableHallucination,
|
|
48
|
-
enableLLM: options.enableLlm,
|
|
49
|
-
minImpactScore: options.minImpact,
|
|
50
|
-
minConfidence: options.minConfidence,
|
|
51
|
-
maxIssues: options.maxIssues,
|
|
52
|
-
};
|
|
53
|
-
// Configure LLM if enabled
|
|
54
|
-
if (options.enableLlm && options.llmProvider) {
|
|
55
|
-
scanOptions.llmConfig = {
|
|
56
|
-
provider: options.llmProvider,
|
|
57
|
-
model: options.llmModel,
|
|
58
|
-
baseUrl: options.llmBaseUrl,
|
|
59
|
-
apiKey: options.llmApiKey,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
// Update loading step
|
|
63
|
-
rerender(React.createElement(AuditReportUI, {
|
|
64
|
-
url: urlObj.href,
|
|
65
|
-
result: {},
|
|
66
|
-
aiReadiness: {},
|
|
67
|
-
loading: true,
|
|
68
|
-
currentStep: 'Scanning page...',
|
|
69
|
-
}));
|
|
70
|
-
// Run the audit
|
|
71
|
-
const result = await analyzeUrlWithRules(url, scanOptions);
|
|
72
|
-
// Update loading step
|
|
73
|
-
rerender(React.createElement(AuditReportUI, {
|
|
74
|
-
url: urlObj.href,
|
|
75
|
-
result,
|
|
76
|
-
aiReadiness: {},
|
|
77
|
-
loading: true,
|
|
78
|
-
currentStep: 'Calculating AI readiness scores...',
|
|
79
|
-
}));
|
|
80
|
-
// Calculate AI readiness
|
|
81
|
-
const aiReadiness = calculateAIReadiness(result);
|
|
82
|
-
// Clear loading and show results
|
|
83
|
-
clear();
|
|
84
|
-
const finalRender = render(React.createElement(AuditReportUI, {
|
|
85
|
-
url: urlObj.href,
|
|
86
|
-
result,
|
|
87
|
-
aiReadiness,
|
|
88
|
-
loading: false,
|
|
89
|
-
}));
|
|
90
|
-
// Wait for user to exit
|
|
91
|
-
await finalRender.waitUntilExit();
|
|
92
|
-
// Check threshold
|
|
93
|
-
if (options.threshold !== undefined) {
|
|
94
|
-
const overallScore = aiReadiness.overall;
|
|
95
|
-
if (overallScore !== undefined && overallScore < options.threshold) {
|
|
96
|
-
process.exit(1);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
clear();
|
|
102
|
-
console.error('Audit failed:', error instanceof Error ? error.message : error);
|
|
103
|
-
process.exit(1);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}
|