indxel-cli 0.1.1 → 0.3.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.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  ## Install
11
11
 
12
12
  ```bash
13
- npm install -D indxel-cli
13
+ npm install -g indxel-cli
14
14
  ```
15
15
 
16
16
  Or run directly:
@@ -27,11 +27,18 @@ npx indxel-cli check
27
27
  # Initialize config and boilerplate files
28
28
  npx indxel-cli init
29
29
 
30
- # Audit all pages
30
+ # Audit all pages (static analysis)
31
31
  npx indxel-cli check
32
- ```
33
32
 
34
- The CLI scans your Next.js App Router pages, extracts metadata, and validates it against 15 SEO rules using the [`indxel`](https://www.npmjs.com/package/indxel) SDK.
33
+ # Crawl a live site
34
+ npx indxel-cli crawl https://yoursite.com
35
+
36
+ # Research keywords
37
+ npx indxel-cli keywords "nextjs seo"
38
+
39
+ # Check indexation status
40
+ npx indxel-cli index https://yoursite.com
41
+ ```
35
42
 
36
43
  ---
37
44
 
@@ -43,35 +50,39 @@ Scaffold SEO boilerplate in your Next.js project.
43
50
 
44
51
  ```bash
45
52
  npx indxel-cli init
53
+ npx indxel-cli init --hook # + install git pre-push guard
46
54
  ```
47
55
 
48
56
  Creates:
49
57
  - `seo.config.ts` -- Global SEO configuration using `defineSEO()`
50
58
  - `app/sitemap.ts` -- Next.js dynamic sitemap
51
59
  - `app/robots.ts` -- Next.js robots configuration
60
+ - `.git/hooks/pre-push` -- (with `--hook`) SEO guard that blocks pushes on critical errors
52
61
 
53
62
  Options:
54
63
  - `--cwd <path>` -- Project directory (default: current directory)
55
64
  - `--force` -- Overwrite existing files
65
+ - `--hook` -- Install git pre-push hook
56
66
 
57
67
  ```
58
- $ npx indxel-cli init
68
+ $ npx indxel-cli init --hook
59
69
 
60
70
  ✓ Detected Next.js 15 (App Router)
61
71
  ✓ Generated seo.config.ts
62
72
  ✓ Generated src/app/sitemap.ts
63
73
  ✓ Generated src/app/robots.ts
74
+ ✓ Installed git pre-push hook
64
75
 
65
- 3 files created.
66
-
67
- Next steps:
68
- 1. Edit seo.config.ts with your site details
69
- 2. Run npx indxel check to audit your pages
76
+ 4 files created.
70
77
  ```
71
78
 
79
+ The pre-push hook runs `npx indxel-cli check --ci` before every `git push`. If critical SEO errors are found, the push is blocked.
80
+
81
+ ---
82
+
72
83
  ### `indxel check`
73
84
 
74
- Audit SEO metadata for all pages in your project.
85
+ Audit SEO metadata for all pages in your project (static analysis of source code).
75
86
 
76
87
  ```bash
77
88
  npx indxel-cli check
@@ -94,16 +105,13 @@ $ npx indxel-cli check
94
105
  ✓ / 92/100
95
106
  ✓ /pricing 88/100
96
107
  ✓ /blog 85/100
97
- x /blog/my-post 62/100
98
- x Missing og:image social shares will look broken
99
- ! Title is 42 characters slightly short (aim for 50-60)
108
+ /blog/my-post 62/100
109
+ Missing og:image -- social shares will look broken
110
+ Title is 42 characters -- slightly short (aim for 50-60)
100
111
  ✓ /about 90/100
101
112
 
102
- ─────────────────────────────────────
103
-
104
113
  Score: 83/100 (B)
105
114
  Pages: 4/5 pass SEO validation
106
-
107
115
  1 critical issue. Fix before deploying.
108
116
  ```
109
117
 
@@ -114,8 +122,6 @@ Track SEO score changes between runs. Results are stored in `.indxel/last-check.
114
122
  ```
115
123
  $ npx indxel-cli check --diff
116
124
 
117
- ...
118
-
119
125
  SEO Diff:
120
126
 
121
127
  Score: 78 -> 83 (+5)
@@ -126,42 +132,9 @@ $ npx indxel-cli check --diff
126
132
 
127
133
  REGRESSIONS (1):
128
134
  - /blog/my-post 70 -> 62
129
-
130
- NEW PAGES (1):
131
- + /changelog [new]
132
- ```
133
-
134
- ### `indxel check --ci`
135
-
136
- Strict mode for CI/CD pipelines. Warnings become errors. Exits with code 1 if any page has critical issues.
137
-
138
- ```bash
139
- npx indxel-cli check --ci
140
135
  ```
141
136
 
142
- ### `indxel check --json`
143
-
144
- Machine-readable output for custom tooling.
145
-
146
- ```json
147
- {
148
- "score": 83,
149
- "grade": "B",
150
- "totalPages": 5,
151
- "passedPages": 4,
152
- "criticalErrors": 1,
153
- "pages": [
154
- {
155
- "route": "/",
156
- "file": "src/app/page.tsx",
157
- "score": 92,
158
- "grade": "A",
159
- "errors": [],
160
- "warnings": [{ "id": "twitter-card", "message": "..." }]
161
- }
162
- ]
163
- }
164
- ```
137
+ ---
165
138
 
166
139
  ### `indxel crawl <url>`
167
140
 
@@ -187,43 +160,28 @@ Options:
187
160
  ```
188
161
  $ npx indxel-cli crawl https://mysite.com --push
189
162
 
190
- indxel crawl https://mysite.com
163
+ indxel crawl -- https://mysite.com
191
164
 
192
165
  ✓ robots.txt found
193
166
  ✓ Crawled 47 pages in 12.3s
194
-
195
- ✓ https://mysite.com 95/100
196
- ✓ https://mysite.com/pricing 88/100
197
- ✗ https://mysite.com/blog/new-post 62/100
198
- ✗ Missing meta description
199
- ⚠ Title is 42 characters — slightly short
200
-
201
- ✓ sitemap.xml found — 52 URLs
167
+ ✓ sitemap.xml found -- 52 URLs
202
168
  ✓ Verified 94 assets
203
169
 
204
170
  - Duplicate titles
205
171
  ✗ "My Site" (3 pages)
206
- - Structured data (JSON-LD)
207
- ✓ Organization — 47 pages
208
- ✓ Article — 12 pages
209
-
210
- ─── Summary ───
211
172
 
212
173
  Pages crawled: 47
213
174
  Average score: 86/100 (B)
214
175
  Errors: 3
215
176
  Warnings: 8
216
177
 
217
- ✓ Pushed to dashboard check clxyz123
178
+ ✓ Pushed to dashboard -- check clxyz123
218
179
  ```
219
180
 
220
181
  #### Push to Dashboard
221
182
 
222
183
  The `--push` flag sends results to the [Indxel dashboard](https://indxel.com/dashboard) where you can track score evolution between crawls.
223
184
 
224
- 1. Get your API key from **Dashboard > Settings**
225
- 2. Run:
226
-
227
185
  ```bash
228
186
  # Using --api-key flag
229
187
  npx indxel-cli crawl https://yoursite.com --push --api-key ix_your_key
@@ -233,6 +191,111 @@ export INDXEL_API_KEY=ix_your_key
233
191
  npx indxel-cli crawl https://yoursite.com --push
234
192
  ```
235
193
 
194
+ Get your API key from **Dashboard > Settings > API Keys**.
195
+
196
+ ---
197
+
198
+ ### `indxel keywords <seed>`
199
+
200
+ Research keyword opportunities using Google Autocomplete. No API key required.
201
+
202
+ ```bash
203
+ npx indxel-cli keywords "nextjs seo"
204
+ npx indxel-cli keywords "nextjs seo" --site mysite.com # + content gap analysis
205
+ ```
206
+
207
+ Options:
208
+ - `--locale <locale>` -- Language locale (default: en)
209
+ - `--country <country>` -- Country code (default: us)
210
+ - `--site <url>` -- Site URL to analyze content gaps against
211
+ - `--max-pages <n>` -- Max pages to crawl for gap analysis (default: 30)
212
+ - `--json` -- Output as JSON
213
+
214
+ ```
215
+ $ npx indxel-cli keywords "nextjs seo"
216
+
217
+ indxel keywords -- "nextjs seo"
218
+
219
+ ✓ Found 156 keywords
220
+
221
+ Direct suggestions (8)
222
+ nextjs seo best practices
223
+ nextjs seo metadata
224
+ nextjs seo optimization
225
+ ...
226
+
227
+ Questions (24)
228
+ ? how to improve seo in nextjs
229
+ ? what is nextjs metadata
230
+ ...
231
+
232
+ Long-tail (124)
233
+ nextjs seo plugin
234
+ nextjs seo analyzer
235
+ ...
236
+ ```
237
+
238
+ With `--site`, it crawls your site and identifies which keywords you already cover and which ones are content gaps:
239
+
240
+ ```
241
+ $ npx indxel-cli keywords "nextjs seo" --site mysite.com
242
+
243
+ ✓ Found 156 keywords
244
+ ✓ Crawled 28 pages
245
+
246
+ Content coverage: 42/156 keywords (27%)
247
+
248
+ High priority gaps (18)
249
+ ✗ "nextjs seo best practices" -> guide at /blog/nextjs-seo-best-practices
250
+ ✗ "nextjs metadata tutorial" -> guide at /blog/nextjs-metadata-tutorial
251
+
252
+ Medium priority gaps (34)
253
+ ⚠ "nextjs seo vs gatsby" -> comparison at /compare/nextjs-seo-vs-gatsby
254
+ ```
255
+
256
+ ---
257
+
258
+ ### `indxel index <url>`
259
+
260
+ Check indexation readiness and submit pages to search engines.
261
+
262
+ ```bash
263
+ npx indxel-cli index https://yoursite.com # free diagnostic
264
+ npx indxel-cli index https://yoursite.com --check # check indexation (Pro)
265
+ npx indxel-cli index https://yoursite.com --indexnow-key KEY # submit IndexNow (Pro)
266
+ ```
267
+
268
+ Options:
269
+ - `--check` -- Check which pages are indexed in Google cache (requires Pro plan + API key)
270
+ - `--indexnow-key <key>` -- Submit URLs via IndexNow to Bing/Yandex/DuckDuckGo (requires Pro plan + API key)
271
+ - `--api-key <key>` -- Indxel API key (required for `--check` and `--indexnow-key`)
272
+ - `--json` -- Output as JSON
273
+
274
+ The free diagnostic checks your sitemap and robots.txt, then provides setup instructions for Google Search Console and IndexNow.
275
+
276
+ ```
277
+ $ npx indxel-cli index mysite.com
278
+
279
+ indxel index -- https://mysite.com
280
+
281
+ ✓ Found sitemap -- 52 URLs
282
+ ✓ robots.txt references sitemap
283
+
284
+ IndexNow (Bing, Yandex, DuckDuckGo)
285
+ 1. Generate a key at https://www.bing.com/indexnow
286
+ 2. Host the key file at https://mysite.com/{key}.txt
287
+ 3. Run: npx indxel index mysite.com --indexnow-key YOUR_KEY
288
+
289
+ Google Search Console
290
+ 1. Go to https://search.google.com/search-console
291
+ 2. Add & verify mysite.com
292
+ 3. Submit your sitemap: Sitemaps > Add > sitemap.xml
293
+
294
+ Sitemap: 52 URLs
295
+ robots.txt: ✓ references sitemap
296
+ IndexNow: not configured (use --indexnow-key)
297
+ ```
298
+
236
299
  ---
237
300
 
238
301
  ## CI/CD Integration
@@ -257,8 +320,6 @@ jobs:
257
320
 
258
321
  ### Vercel (build command)
259
322
 
260
- Add to your `package.json`:
261
-
262
323
  ```json
263
324
  {
264
325
  "scripts": {
@@ -267,20 +328,28 @@ Add to your `package.json`:
267
328
  }
268
329
  ```
269
330
 
270
- If any page has a critical SEO error, the build fails. Broken SEO never reaches production.
331
+ ### Git pre-push hook
332
+
333
+ ```bash
334
+ npx indxel-cli init --hook
335
+ ```
336
+
337
+ Blocks `git push` if critical SEO errors are found. No CI setup required.
271
338
 
272
339
  ---
273
340
 
274
341
  ## Requirements
275
342
 
276
343
  - Node.js >= 18
277
- - Next.js App Router project (`app/` or `src/app/` directory)
344
+ - Next.js App Router project (`app/` or `src/app/` directory) for `check` and `init`
345
+ - Any website for `crawl`, `index`, and `keywords`
278
346
 
279
347
  ---
280
348
 
281
349
  ## Related
282
350
 
283
- - [`indxel`](https://www.npmjs.com/package/indxel) -- The SDK. Define metadata, generate JSON-LD, validate.
351
+ - [`indxel`](https://www.npmjs.com/package/indxel) -- The SDK. Define metadata, generate JSON-LD, validate, crawl.
352
+ - [indxel.com](https://indxel.com) -- Dashboard for monitoring SEO over time.
284
353
 
285
354
  ---
286
355