seo-intel 1.3.1 → 1.4.1

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.
@@ -265,7 +265,7 @@ async function run() {
265
265
  } else {
266
266
  warn('No Ollama available. Extraction will use degraded mode (regex only).');
267
267
  info('Install Ollama (https://ollama.com) and pull a model for better results.');
268
- info('Recommended: ollama pull qwen3.5:9b');
268
+ info('Recommended: ollama pull gemma4:e4b');
269
269
  }
270
270
 
271
271
  // ── Analysis tier ──
package/extractor/qwen.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fetch from 'node-fetch';
2
2
 
3
3
  const DEFAULT_OLLAMA_URL = 'http://localhost:11434';
4
- const DEFAULT_OLLAMA_MODEL = 'qwen3:4b';
4
+ const DEFAULT_OLLAMA_MODEL = 'gemma4:e4b';
5
5
  const OLLAMA_CTX = parseInt(process.env.OLLAMA_CTX || '8192', 10);
6
6
  const OLLAMA_TIMEOUT_MS = parseInt(process.env.OLLAMA_TIMEOUT_MS || '60000', 10); // BUG-008: was 5000ms, too short for slow machines
7
7
  const OLLAMA_PREFLIGHT_TIMEOUT_MS = parseInt(process.env.OLLAMA_PREFLIGHT_TIMEOUT_MS || '2500', 10);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seo-intel",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Local Ahrefs-style SEO competitor intelligence. Crawl → SQLite → cloud analysis.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -22,6 +22,22 @@
22
22
  "bin": {
23
23
  "seo-intel": "cli.js"
24
24
  },
25
+ "exports": {
26
+ ".": "./cli.js",
27
+ "./froggo": "./froggo.js",
28
+ "./aeo": "./analyses/aeo/index.js",
29
+ "./aeo/scorer": "./analyses/aeo/scorer.js",
30
+ "./gap-intel": "./analyses/gap-intel/index.js",
31
+ "./blog-draft": "./analyses/blog-draft/index.js",
32
+ "./crawler": "./crawler/index.js",
33
+ "./db": "./db/db.js",
34
+ "./exports/technical": "./exports/technical.js",
35
+ "./exports/competitive": "./exports/competitive.js",
36
+ "./exports/suggestive": "./exports/suggestive.js",
37
+ "./exports/queries": "./exports/queries.js",
38
+ "./templates": "./analyses/templates/index.js",
39
+ "./dashboard": "./reports/generate-html.js"
40
+ },
25
41
  "engines": {
26
42
  "node": ">=22.5.0"
27
43
  },
package/server.js CHANGED
@@ -596,7 +596,7 @@ async function handleRequest(req, res) {
596
596
  const ALLOWED = ['crawl', 'extract', 'analyze', 'export-actions', 'competitive-actions',
597
597
  'suggest-usecases', 'html', 'status', 'brief', 'keywords', 'report', 'guide',
598
598
  'schemas', 'headings-audit', 'orphans', 'entities', 'friction', 'shallow', 'decay', 'export', 'templates',
599
- 'aeo', 'blog-draft'];
599
+ 'aeo', 'blog-draft', 'gap-intel'];
600
600
 
601
601
  if (!command || !ALLOWED.includes(command)) {
602
602
  json(res, 400, { error: `Invalid command. Allowed: ${ALLOWED.join(', ')}` });
@@ -613,6 +613,11 @@ async function handleRequest(req, res) {
613
613
  if (params.get('lang')) args.push('--lang', params.get('lang'));
614
614
  if (params.get('model')) args.push('--model', params.get('model'));
615
615
  if (params.has('save')) args.push('--save');
616
+ if (params.get('vs')) args.push('--vs', params.get('vs'));
617
+ if (params.get('type')) args.push('--type', params.get('type'));
618
+ if (params.get('limit')) args.push('--limit', params.get('limit'));
619
+ if (params.has('raw')) args.push('--raw');
620
+ if (params.get('out')) args.push('--out', params.get('out'));
616
621
 
617
622
  // Auto-save exports from dashboard to reports/
618
623
  const EXPORT_CMDS = ['export-actions', 'suggest-usecases', 'competitive-actions'];
@@ -148,7 +148,7 @@ export function* createEnvFile(rootDir = ROOT) {
148
148
  '',
149
149
  '# Local Ollama for extraction',
150
150
  'OLLAMA_URL=http://localhost:11434',
151
- 'OLLAMA_MODEL=qwen3.5:9b',
151
+ 'OLLAMA_MODEL=gemma4:e4b',
152
152
  'OLLAMA_CTX=8192',
153
153
  '',
154
154
  '# Crawler settings',
package/setup/models.js CHANGED
@@ -17,6 +17,56 @@
17
17
  // Minimum viable: 4B parameters for reliable JSON output
18
18
 
19
19
  export const EXTRACTION_MODELS = [
20
+ // ── Gemma 4 (Google, MoE) — new recommended default ──
21
+ {
22
+ id: 'gemma4:e2b',
23
+ name: 'Gemma 4 E2B',
24
+ family: 'gemma4',
25
+ tier: 'budget',
26
+ vram: '~5 GB',
27
+ minVramMB: 4000,
28
+ speed: '~1.5s/page',
29
+ quality: 'good',
30
+ description: 'Google Gemma 4 edge model. MoE (5.1B total, 2.3B active) — fast inference with good JSON output. Great for laptops.',
31
+ recommended: false,
32
+ },
33
+ {
34
+ id: 'gemma4:e4b',
35
+ name: 'Gemma 4 E4B',
36
+ family: 'gemma4',
37
+ tier: 'balanced',
38
+ vram: '~7 GB',
39
+ minVramMB: 5500,
40
+ speed: '~2s/page',
41
+ quality: 'great',
42
+ description: 'Default recommendation. MoE (8B total, 4.5B active) — excellent extraction quality at edge-model speed. Best quality/speed ratio.',
43
+ recommended: true,
44
+ },
45
+ {
46
+ id: 'gemma4:26b',
47
+ name: 'Gemma 4 26B',
48
+ family: 'gemma4',
49
+ tier: 'quality',
50
+ vram: '~13 GB',
51
+ minVramMB: 11000,
52
+ speed: '~4s/page',
53
+ quality: 'excellent',
54
+ description: 'MoE (25.2B total, 3.8B active) — frontier quality at efficient compute. Needs RTX 3090+ or M-series with 16GB+.',
55
+ recommended: false,
56
+ },
57
+ {
58
+ id: 'gemma4:31b',
59
+ name: 'Gemma 4 31B (Dense)',
60
+ family: 'gemma4',
61
+ tier: 'power',
62
+ vram: '~20 GB',
63
+ minVramMB: 16000,
64
+ speed: '~7s/page',
65
+ quality: 'excellent',
66
+ description: 'Dense 30.7B model — maximum extraction quality. Needs RTX 3090/4090 or M2 Pro+ with 24GB+.',
67
+ recommended: false,
68
+ },
69
+ // ── Qwen 3.5 (Alibaba) ──
20
70
  {
21
71
  id: 'qwen3.5:4b',
22
72
  name: 'Qwen 3.5 4B',
@@ -26,7 +76,7 @@ export const EXTRACTION_MODELS = [
26
76
  minVramMB: 2500,
27
77
  speed: '~2s/page',
28
78
  quality: 'good',
29
- description: 'Minimum recommended. Reliable JSON extraction, decent keyword detection. Great for laptops and older GPUs.',
79
+ description: 'Reliable JSON extraction, decent keyword detection. Great for laptops and older GPUs.',
30
80
  recommended: false,
31
81
  },
32
82
  {
@@ -38,8 +88,8 @@ export const EXTRACTION_MODELS = [
38
88
  minVramMB: 4500,
39
89
  speed: '~3s/page',
40
90
  quality: 'better',
41
- description: 'Default recommendation. Better entity detection and intent classification. Works on most modern GPUs.',
42
- recommended: true,
91
+ description: 'Good entity detection and intent classification. Works on most modern GPUs.',
92
+ recommended: false,
43
93
  },
44
94
  {
45
95
  id: 'qwen3.5:27b',
@@ -62,10 +112,10 @@ export const EXTRACTION_MODELS = [
62
112
  minVramMB: 18000,
63
113
  speed: '~8s/page',
64
114
  quality: 'excellent',
65
- description: 'Near-cloud quality extraction. Needs RTX 3090/4090 or M2 Ultra. Overkill for most users.',
115
+ description: 'Near-cloud quality extraction. Needs RTX 3090/4090 or M2 Ultra.',
66
116
  recommended: false,
67
117
  },
68
- // Alternative providers
118
+ // ── Alternative providers ──
69
119
  {
70
120
  id: 'nemotron-nano:4b',
71
121
  name: 'Nemotron 3 Nano 4B',
@@ -78,7 +128,7 @@ export const EXTRACTION_MODELS = [
78
128
  description: 'NVIDIA agentic model. Efficient extraction with tool-use training. Good alternative to Qwen 3.5 4B.',
79
129
  recommended: false,
80
130
  },
81
- // Legacy / fallback models (already installed by many users)
131
+ // ── Legacy / fallback models (already installed by many users) ──
82
132
  {
83
133
  id: 'qwen3:4b',
84
134
  name: 'Qwen 3 4B (legacy)',
@@ -88,7 +138,7 @@ export const EXTRACTION_MODELS = [
88
138
  minVramMB: 2500,
89
139
  speed: '~2s/page',
90
140
  quality: 'good',
91
- description: 'Previous generation. Works well but Qwen 3.5 is better if you can upgrade.',
141
+ description: 'Previous generation. Gemma 4 or Qwen 3.5 recommended for new installs.',
92
142
  recommended: false,
93
143
  legacy: true,
94
144
  },
@@ -101,7 +151,7 @@ export const EXTRACTION_MODELS = [
101
151
  minVramMB: 4500,
102
152
  speed: '~3s/page',
103
153
  quality: 'better',
104
- description: 'Previous generation. Solid extraction. Qwen 3.5 recommended for new installs.',
154
+ description: 'Previous generation. Gemma 4 or Qwen 3.5 recommended for new installs.',
105
155
  recommended: false,
106
156
  legacy: true,
107
157
  },
@@ -117,6 +167,32 @@ export const EXTRACTION_MODELS = [
117
167
  // Cloud models (Claude, GPT-5.4, Gemini) available via OpenClaw agent setup
118
168
 
119
169
  export const ANALYSIS_MODELS = [
170
+ {
171
+ id: 'gemma4:26b',
172
+ name: 'Gemma 4 26B (MoE)',
173
+ family: 'gemma4',
174
+ type: 'local',
175
+ vram: '~13 GB',
176
+ minVramMB: 11000,
177
+ context: '128K tokens',
178
+ costNote: 'Free (your GPU)',
179
+ quality: 'great',
180
+ recommended: true,
181
+ description: 'Google Gemma 4 MoE — 25.2B total, 3.8B active. Fast analysis with frontier quality. Best local value.',
182
+ },
183
+ {
184
+ id: 'gemma4:31b',
185
+ name: 'Gemma 4 31B (Dense)',
186
+ family: 'gemma4',
187
+ type: 'local',
188
+ vram: '~20 GB',
189
+ minVramMB: 16000,
190
+ context: '128K tokens',
191
+ costNote: 'Free (your GPU)',
192
+ quality: 'excellent',
193
+ recommended: false,
194
+ description: 'Google Gemma 4 dense model — maximum quality for local analysis. Needs RTX 3090+ or M2 Pro+ with 24GB.',
195
+ },
120
196
  {
121
197
  id: 'qwen3:14b',
122
198
  name: 'Qwen 3 14B',
@@ -140,8 +216,8 @@ export const ANALYSIS_MODELS = [
140
216
  context: '32K tokens',
141
217
  costNote: 'Free (your GPU)',
142
218
  quality: 'good',
143
- recommended: true,
144
- description: 'Sweet spot for local analysis. Strong reasoning with 27.8B params. Needs RTX 3090/4080+ or M-series with 24GB+.',
219
+ recommended: false,
220
+ description: 'Strong reasoning with 27.8B params. Needs RTX 3090/4080+ or M-series with 24GB+.',
145
221
  },
146
222
  {
147
223
  id: 'qwen3.5:35b',
@@ -228,12 +304,13 @@ export const ANALYSIS_MODELS = [
228
304
  // ── VRAM-Based Recommendations ──────────────────────────────────────────────
229
305
 
230
306
  const VRAM_TIERS = [
231
- { maxMB: 2500, extraction: null, note: 'Not enough VRAM for local extraction. Use cloud or CPU mode (slow).' },
232
- { maxMB: 4500, extraction: 'qwen3.5:4b', note: 'Budget tier — Qwen 3.5 4B fits your GPU.' },
233
- { maxMB: 8000, extraction: 'qwen3.5:9b', note: 'Balanced tier — Qwen 3.5 9B recommended for best quality/speed.' },
234
- { maxMB: 18000, extraction: 'qwen3.5:27b', note: 'Quality tier — Qwen 3.5 27B for nuanced extraction.' },
235
- { maxMB: 48000, extraction: 'qwen3.5:35b', note: 'Power tier — Qwen 3.5 35B for near-cloud quality.' },
236
- { maxMB: Infinity, extraction: 'qwen3.5:35b', note: 'Power tier — Qwen 3.5 35B recommended. Your GPU can handle anything.' },
307
+ { maxMB: 2500, extraction: null, note: 'Not enough VRAM for local extraction. Use cloud or CPU mode (slow).' },
308
+ { maxMB: 4500, extraction: 'qwen3.5:4b', note: 'Budget tier — Qwen 3.5 4B fits your GPU.' },
309
+ { maxMB: 6000, extraction: 'gemma4:e2b', note: 'Edge tier — Gemma 4 E2B (MoE, fast).' },
310
+ { maxMB: 12000, extraction: 'gemma4:e4b', note: 'Balanced tier — Gemma 4 E4B recommended. MoE gives best quality/speed.' },
311
+ { maxMB: 18000, extraction: 'gemma4:26b', note: 'Quality tier — Gemma 4 26B MoE for frontier extraction.' },
312
+ { maxMB: 48000, extraction: 'gemma4:31b', note: 'Power tier — Gemma 4 31B Dense for maximum quality.' },
313
+ { maxMB: Infinity, extraction: 'gemma4:31b', note: 'Power tier — Gemma 4 31B Dense recommended. Your GPU can handle anything.' },
237
314
  ];
238
315
 
239
316
  /**
@@ -250,8 +327,9 @@ export function recommendExtractionModel(availableModels = [], vramMB = 0) {
250
327
 
251
328
  // Preferred model order (newest → legacy)
252
329
  const preferenceOrder = [
330
+ 'gemma4:e4b', 'gemma4:26b', 'gemma4:e2b', 'gemma4:31b',
253
331
  'qwen3.5:9b', 'qwen3.5:27b', 'qwen3.5:4b', 'qwen3.5:35b',
254
- 'qwen3:8b', 'qwen3:4b', 'qwen3.5:0.6b',
332
+ 'qwen3:8b', 'qwen3:4b',
255
333
  ];
256
334
 
257
335
  // Filter to models that fit VRAM
@@ -310,7 +388,7 @@ export function recommendExtractionModel(availableModels = [], vramMB = 0) {
310
388
  */
311
389
  export function recommendAnalysisModel(availableModels = [], vramMB = 0) {
312
390
  const preferenceOrder = [
313
- 'qwen3.5:27b', 'qwen3.5:35b', 'qwen3:14b', 'nemotron-3-super:120b',
391
+ 'gemma4:26b', 'gemma4:31b', 'qwen3.5:27b', 'qwen3.5:35b', 'qwen3:14b', 'nemotron-3-super:120b',
314
392
  ];
315
393
 
316
394
  // Filter to models that fit VRAM
@@ -332,8 +410,9 @@ export function recommendAnalysisModel(availableModels = [], vramMB = 0) {
332
410
  // 2. VRAM-based recommendation
333
411
  let recId = 'qwen3:14b'; // default minimum
334
412
  if (vramMB >= 48000) recId = 'nemotron-3-super:120b';
335
- else if (vramMB >= 18000) recId = 'qwen3.5:35b';
336
- else if (vramMB >= 15000) recId = 'qwen3.5:27b';
413
+ else if (vramMB >= 16000) recId = 'gemma4:31b';
414
+ else if (vramMB >= 11000) recId = 'gemma4:26b';
415
+ else if (vramMB >= 8000) recId = 'qwen3:14b';
337
416
 
338
417
  const recModel = ANALYSIS_MODELS.find(m => m.id === recId);
339
418
  if (recModel) {
@@ -188,7 +188,7 @@ AVAILABLE COMMANDS (run these from ${ROOT}):
188
188
  TO INSTALL THINGS:
189
189
  - npm install (in ${ROOT}) → install Node dependencies
190
190
  - npx playwright install chromium → install browser
191
- - ollama pull qwen3.5:9b → install extraction model
191
+ - ollama pull gemma4:e4b → install extraction model
192
192
 
193
193
  TO CONFIGURE:
194
194
  - Edit ${ROOT}/.env for API keys and settings
@@ -201,9 +201,10 @@ ANALYSIS MODELS (user needs at least one API key):
201
201
  - DeepSeek: Budget option (~$0.02-0.08) → DEEPSEEK_API_KEY
202
202
 
203
203
  EXTRACTION MODELS (local, free):
204
- - qwen3.5:9b (recommended, needs 6GB+ VRAM)
205
- - qwen3.5:4b (budget, needs 3GB+ VRAM)
206
- - qwen3.5:27b (quality, needs 16GB+ VRAM)`;
204
+ - gemma4:e4b (recommended, MoE, needs 6GB+ VRAM)
205
+ - gemma4:e2b (budget, MoE, needs 4GB+ VRAM)
206
+ - gemma4:26b (quality, MoE, needs 12GB+ VRAM)
207
+ - qwen3.5:9b (alternative, needs 5GB+ VRAM)`;
207
208
 
208
209
  // ── Agent-Driven Setup Flow ────────────────────────────────────────────────
209
210
 
@@ -21,7 +21,7 @@ const ROOT = join(__dirname, '..');
21
21
  * Test Ollama host + model by sending a tiny prompt.
22
22
  *
23
23
  * @param {string} host - e.g. 'http://localhost:11434'
24
- * @param {string} model - e.g. 'qwen3.5:9b'
24
+ * @param {string} model - e.g. 'gemma4:e4b'
25
25
  * @returns {{ success: boolean, latencyMs: number, response?: string, error?: string }}
26
26
  */
27
27
  export async function testOllamaConnectivity(host, model) {
package/setup/wizard.html CHANGED
@@ -1359,7 +1359,7 @@ Start by checking what's already installed.</div>
1359
1359
  Tasks:
1360
1360
  1. Verify Node.js 22.5+ (install via nvm if needed)
1361
1361
  2. Install Ollama (https://ollama.com) if not present
1362
- 3. Pull qwen3.5:9b or smaller if VRAM < 6GB
1362
+ 3. Pull gemma4:e4b or smaller if VRAM < 6GB
1363
1363
  4. Create ./config/myproject.json — ask me for my target domain and up to 3 competitor domains
1364
1364
  5. Add GEMINI_API_KEY or ANTHROPIC_API_KEY to .env if I have one
1365
1365
  6. Run: seo-intel crawl myproject
@@ -1380,7 +1380,7 @@ It's installed via: npm install -g seo-intel
1380
1380
  Please help me:
1381
1381
  1. Check that Node.js 22.5+ is installed on my machine
1382
1382
  2. Install Ollama (ollama.com) if it's not there
1383
- 3. Download a Qwen AI model that fits my machine's RAM
1383
+ 3. Download a Gemma 4 AI model that fits my machine's RAM
1384
1384
  4. Create a project config file pointing at my website and competitors
1385
1385
  5. Run the first crawl and show me the results
1386
1386
 
@@ -1403,15 +1403,15 @@ Ask me for my website URL before starting.</div>
1403
1403
  <button class="btn btn-sm agent-runtime-tab-min" data-runtime="openclaw" onclick="selectAgentRuntimeMin('openclaw', this)" style="font-size:0.62rem;"><i class="fa-solid fa-wand-magic-sparkles" style="margin-right:3px;"></i>OpenClaw</button>
1404
1404
  </div>
1405
1405
  <div id="minRuntime-claudecode" class="min-runtime-panel" style="position:relative; padding:7px 9px; background:rgba(10,10,10,0.5); border:1px solid var(--border-subtle); border-radius:var(--radius); font-family:var(--font-mono); font-size:0.6rem; color:var(--text-secondary); line-height:1.5;">
1406
- <div>Set up seo-intel: check Node 22.5+, install Ollama, pull qwen3.5:9b, create config, run crawl.</div>
1406
+ <div>Set up seo-intel: check Node 22.5+, install Ollama, pull gemma4:e4b, create config, run crawl.</div>
1407
1407
  <button class="btn btn-sm" style="position:absolute; top:4px; right:4px; padding:2px 5px; font-size:0.48rem;" onclick="navigator.clipboard.writeText(this.previousElementSibling.textContent.trim());this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',1500);">Copy</button>
1408
1408
  </div>
1409
1409
  <div id="minRuntime-codex" class="min-runtime-panel" style="display:none; position:relative; padding:7px 9px; background:rgba(10,10,10,0.5); border:1px solid var(--border-subtle); border-radius:var(--radius); font-family:var(--font-mono); font-size:0.6rem; color:var(--text-secondary); line-height:1.5;">
1410
- <div>Install seo-intel deps (Node 22.5+, Ollama, qwen3.5:9b), create project config, run: seo-intel crawl myproject. Use full disk access.</div>
1410
+ <div>Install seo-intel deps (Node 22.5+, Ollama, gemma4:e4b), create project config, run: seo-intel crawl myproject. Use full disk access.</div>
1411
1411
  <button class="btn btn-sm" style="position:absolute; top:4px; right:4px; padding:2px 5px; font-size:0.48rem;" onclick="navigator.clipboard.writeText(this.previousElementSibling.textContent.trim());this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',1500);">Copy</button>
1412
1412
  </div>
1413
1413
  <div id="minRuntime-perplexity" class="min-runtime-panel" style="display:none; position:relative; padding:7px 9px; background:rgba(10,10,10,0.5); border:1px solid var(--border-subtle); border-radius:var(--radius); font-family:var(--font-mono); font-size:0.6rem; color:var(--text-secondary); line-height:1.5;">
1414
- <div>Help me set up SEO Intel local SEO tool: install Node.js 22.5+, Ollama, download a Qwen model, create config for my website. Ask for my URL.</div>
1414
+ <div>Help me set up SEO Intel local SEO tool: install Node.js 22.5+, Ollama, download Gemma 4 model, create config for my website. Ask for my URL.</div>
1415
1415
  <button class="btn btn-sm" style="position:absolute; top:4px; right:4px; padding:2px 5px; font-size:0.48rem;" onclick="navigator.clipboard.writeText(this.previousElementSibling.textContent.trim());this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',1500);">Copy</button>
1416
1416
  </div>
1417
1417
  <div id="minRuntime-openclaw" class="min-runtime-panel" style="display:none; position:relative; padding:7px 9px; background:rgba(10,10,10,0.5); border:1px solid var(--border-subtle); border-radius:var(--radius); font-family:var(--font-mono); font-size:0.6rem; color:var(--text-secondary); line-height:1.5;">