indxel-cli 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Indxel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,289 @@
1
+ # indxel-cli
2
+
3
+ > 30 seconds. Zero config. Your SEO score, in the terminal.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/indxel-cli)](https://www.npmjs.com/package/indxel-cli)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ---
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install -D indxel-cli
14
+ ```
15
+
16
+ Or run directly:
17
+
18
+ ```bash
19
+ npx indxel-cli check
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ # Initialize config and boilerplate files
28
+ npx indxel-cli init
29
+
30
+ # Audit all pages
31
+ npx indxel-cli check
32
+ ```
33
+
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.
35
+
36
+ ---
37
+
38
+ ## Commands
39
+
40
+ ### `indxel init`
41
+
42
+ Scaffold SEO boilerplate in your Next.js project.
43
+
44
+ ```bash
45
+ npx indxel-cli init
46
+ ```
47
+
48
+ Creates:
49
+ - `seo.config.ts` -- Global SEO configuration using `defineSEO()`
50
+ - `app/sitemap.ts` -- Next.js dynamic sitemap
51
+ - `app/robots.ts` -- Next.js robots configuration
52
+
53
+ Options:
54
+ - `--cwd <path>` -- Project directory (default: current directory)
55
+ - `--force` -- Overwrite existing files
56
+
57
+ ```
58
+ $ npx indxel-cli init
59
+
60
+ ✓ Detected Next.js 15 (App Router)
61
+ ✓ Generated seo.config.ts
62
+ ✓ Generated src/app/sitemap.ts
63
+ ✓ Generated src/app/robots.ts
64
+
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
70
+ ```
71
+
72
+ ### `indxel check`
73
+
74
+ Audit SEO metadata for all pages in your project.
75
+
76
+ ```bash
77
+ npx indxel-cli check
78
+ ```
79
+
80
+ Options:
81
+ - `--ci` -- CI/CD mode: strict validation, exits with code 1 on any error
82
+ - `--diff` -- Compare results with previous check run
83
+ - `--json` -- Output results as JSON (for tooling integration)
84
+ - `--strict` -- Treat warnings as errors
85
+ - `--cwd <path>` -- Project directory
86
+
87
+ ```
88
+ $ npx indxel-cli check
89
+
90
+ Found 5 pages
91
+
92
+ Checking 5 pages...
93
+
94
+ ✓ / 92/100
95
+ ✓ /pricing 88/100
96
+ ✓ /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)
100
+ ✓ /about 90/100
101
+
102
+ ─────────────────────────────────────
103
+
104
+ Score: 83/100 (B)
105
+ Pages: 4/5 pass SEO validation
106
+
107
+ 1 critical issue. Fix before deploying.
108
+ ```
109
+
110
+ ### `indxel check --diff`
111
+
112
+ Track SEO score changes between runs. Results are stored in `.indxel/last-check.json`.
113
+
114
+ ```
115
+ $ npx indxel-cli check --diff
116
+
117
+ ...
118
+
119
+ SEO Diff:
120
+
121
+ Score: 78 -> 83 (+5)
122
+
123
+ IMPROVEMENTS (2):
124
+ + /pricing 82 -> 88
125
+ + /about 85 -> 90
126
+
127
+ REGRESSIONS (1):
128
+ - /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
+ ```
141
+
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
+ ```
165
+
166
+ ### `indxel crawl <url>`
167
+
168
+ Crawl a live website, audit every page, check sitemap, robots.txt, and assets. Cross-page analysis included.
169
+
170
+ ```bash
171
+ npx indxel-cli crawl https://yoursite.com
172
+ ```
173
+
174
+ Options:
175
+ - `--max-pages <n>` -- Maximum pages to crawl (default: 50)
176
+ - `--max-depth <n>` -- Maximum link depth (default: 5)
177
+ - `--delay <ms>` -- Delay between requests (default: 200ms)
178
+ - `--push` -- Push results to the Indxel dashboard
179
+ - `--api-key <key>` -- API key for `--push` (or set `INDXEL_API_KEY`)
180
+ - `--ignore <patterns>` -- Comma-separated path patterns to exclude (e.g. `/app/*,/admin/*`)
181
+ - `--strict` -- Treat warnings as errors
182
+ - `--json` -- Output results as JSON
183
+ - `--skip-assets` -- Skip asset verification
184
+ - `--skip-sitemap` -- Skip sitemap check
185
+ - `--skip-robots` -- Skip robots.txt check
186
+
187
+ ```
188
+ $ npx indxel-cli crawl https://mysite.com --push
189
+
190
+ indxel crawl — https://mysite.com
191
+
192
+ ✓ robots.txt found
193
+ ✓ 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
202
+ ✓ Verified 94 assets
203
+
204
+ - Duplicate titles
205
+ ✗ "My Site" (3 pages)
206
+ - Structured data (JSON-LD)
207
+ ✓ Organization — 47 pages
208
+ ✓ Article — 12 pages
209
+
210
+ ─── Summary ───
211
+
212
+ Pages crawled: 47
213
+ Average score: 86/100 (B)
214
+ Errors: 3
215
+ Warnings: 8
216
+
217
+ ✓ Pushed to dashboard — check clxyz123
218
+ ```
219
+
220
+ #### Push to Dashboard
221
+
222
+ The `--push` flag sends results to the [Indxel dashboard](https://indxel.com/dashboard) where you can track score evolution between crawls.
223
+
224
+ 1. Get your API key from **Dashboard > Settings**
225
+ 2. Run:
226
+
227
+ ```bash
228
+ # Using --api-key flag
229
+ npx indxel-cli crawl https://yoursite.com --push --api-key ix_your_key
230
+
231
+ # Or using environment variable
232
+ export INDXEL_API_KEY=ix_your_key
233
+ npx indxel-cli crawl https://yoursite.com --push
234
+ ```
235
+
236
+ ---
237
+
238
+ ## CI/CD Integration
239
+
240
+ ### GitHub Actions
241
+
242
+ ```yaml
243
+ name: SEO Check
244
+ on: [push, pull_request]
245
+
246
+ jobs:
247
+ seo:
248
+ runs-on: ubuntu-latest
249
+ steps:
250
+ - uses: actions/checkout@v4
251
+ - uses: actions/setup-node@v4
252
+ with:
253
+ node-version: 20
254
+ - run: npm ci
255
+ - run: npx indxel-cli check --ci
256
+ ```
257
+
258
+ ### Vercel (build command)
259
+
260
+ Add to your `package.json`:
261
+
262
+ ```json
263
+ {
264
+ "scripts": {
265
+ "build": "npx indxel-cli check --ci && next build"
266
+ }
267
+ }
268
+ ```
269
+
270
+ If any page has a critical SEO error, the build fails. Broken SEO never reaches production.
271
+
272
+ ---
273
+
274
+ ## Requirements
275
+
276
+ - Node.js >= 18
277
+ - Next.js App Router project (`app/` or `src/app/` directory)
278
+
279
+ ---
280
+
281
+ ## Related
282
+
283
+ - [`indxel`](https://www.npmjs.com/package/indxel) -- The SDK. Define metadata, generate JSON-LD, validate.
284
+
285
+ ---
286
+
287
+ ## License
288
+
289
+ [MIT](./LICENSE)