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

  1. Finds all page.tsx files in your Next.js app directory
  2. Extracts metadata exports (export const metadata and generateMetadata())
  3. Validates each page against 15 SEO rules
  4. Outputs a score summary with errors and warnings

Flags

ParameterTypeDescription
--cibooleanCI mode: strict validation + exit code 1 on any error. Use in CI/CD pipelines.
--diffbooleanCompare with the previous run (stored in .indxel/last-check.json). Shows fixed, new, and unchanged issues.
--jsonbooleanOutput results as JSON instead of formatted text
--strictbooleanTreat warnings as errors
--cwd <path>stringSet 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 declared

CI 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-hreflang

Diff 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.