Skip to content

CLI

Terminal window
npx aeo.js <command> [options]

Generate all AEO files (robots.txt, llms.txt, sitemap.xml, etc.):

Terminal window
npx aeo.js generate
npx aeo.js generate --url https://mysite.com --title "My Site" --out public

Create an aeo.config.ts configuration file in your project:

Terminal window
npx aeo.js init

This generates a starter config with all options documented.

Validate your AEO setup and get a GEO readiness score (0–100). Does not write any files — safe to run in CI:

Terminal window
npx aeo.js check # formatted output
npx aeo.js check --json # machine-readable JSON for scripting

Fail a CI build if the score drops below a threshold:

Terminal window
SCORE=$(npx aeo.js check --json | jq '.audit.score')
[ "$SCORE" -ge 70 ] || { echo "GEO score $SCORE below 70"; exit 1; }

Pass a URL (or bare domain) to audit a deployed site instead of your local setup — no install, no config:

Terminal window
npx aeo.js check mysite.com
npx aeo.js check https://mysite.com --json

This fetches the site’s AEO surface (robots.txt, llms.txt, llms-full.txt, sitemap.xml, ai-index.json), crawls the homepage plus up to 10 inner pages, and reports:

  • the same 5-category GEO readiness score (0–100) used by the local audit and check.aeojs.org
  • which of 23 known AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, …) can access the site
  • average content citability across crawled pages
  • the top fixes, ranked

Works on any site — yours, a competitor’s, or one you’re evaluating. Requires Node 18+. Exits 1 if the target is invalid or unreachable.

Deeper analysis than check: per-page citability scores, platform-specific hints (ChatGPT, Claude, Perplexity, Google AI Overviews, Bing Copilot), and a prioritized fix list.

Terminal window
npx aeo.js report > aeo-report.md
npx aeo.js report --json > aeo-report.json

report also accepts a live URL, adding platform hints (including Claude and Gemini, driven by the site’s actual robots.txt) and per-page citability to the remote scan:

Terminal window
npx aeo.js report mysite.com
npx aeo.js report mysite.com --json > scan.json
FlagDescription
--out <dir>Output directory (default: auto-detected)
--url <url>Site URL
--title <title>Site title
--no-widgetDisable widget generation
--jsonJSON output (for check and report)
--help, -hShow help
--version, -vShow version

Both --flag value and --flag=value forms are supported.

Create one with npx aeo.js init:

import { defineConfig } from 'aeo.js';
export default defineConfig({
title: 'My Site',
url: 'https://mysite.com',
description: 'A site optimized for AI discovery',
outDir: 'public',
});

Import it into your framework config so the integration picks it up:

vite.config.ts
import aeoConfig from './aeo.config';
import { aeoVitePlugin } from 'aeo.js/vite';
export default { plugins: [aeoVitePlugin(aeoConfig)] };

For raw CLI usage on a static site, pass values directly:

Terminal window
npx aeo.js generate --url https://mysite.com --title "My Site" --out public

See the full Configuration reference for all options.

A complete CLI reference with every flag, exit codes, JSON output shapes, framework auto-detection table, and CI scripting patterns is in docs/cli.md on GitHub.