CLI
indxel check
Static analysis of your Next.js source code. Scans page files, extracts metadata, validates against 15 rules.
Usage
bash
npx indxel-cli check [--ci] [--diff] [--json] [--strict] [--cwd <path>]What it does
- Finds all
page.tsxfiles in your Next.js app directory - Extracts metadata exports (
export const metadataandgenerateMetadata()) - Validates each page against 15 SEO rules
- Outputs a score summary with errors and warnings
Flags
| Parameter | Type | Description |
|---|---|---|
| --ci | boolean | CI mode: strict validation + exit code 1 on any error. Use in CI/CD pipelines. |
| --diff | boolean | Compare with the previous run (stored in .indxel/last-check.json). Shows fixed, new, and unchanged issues. |
| --json | boolean | Output results as JSON instead of formatted text |
| --strict | boolean | Treat warnings as errors |
| --cwd <path> | string | Set the working directory |
Examples
Basic check
bash
$ npx indxel-cli check
indxel check — 12 pages scanned
Score: 91/100 (A)
✓ 10 pages pass (A/B)
⚠ 1 page with warnings
✗ 1 page with errors
Errors:
/blog/[slug] → title-length: Title is 72 characters (max 60)
Warnings:
/about → alternates-hreflang: No hreflang alternates declaredCI mode
In your build script or CI pipelinebash
npx indxel-cli check --ci
# Exit code 0 = all pages pass
# Exit code 1 = at least one error (build fails)Diff mode
bash
$ npx indxel-cli check --diff
indxel check — comparing with previous run
Score: 91/100 (A) — was 85/100 (B) ↑ +6
Fixed:
✓ /pricing → og-image (was missing)
New issues:
✗ /blog/[slug] → title-length
Unchanged:
⚠ /about → alternates-hreflangDiff storage
Diff data is saved in
.indxel/last-check.json. Add .indxel/ to your .gitignore.JSON output
bash
npx indxel-cli check --json | jq '.pages[] | select(.score < 80)'CI/CD Integration
See the dedicated CI/CD Guard documentation for GitHub Actions and Vercel setup.