CLI
npx aeo.js <command> [options]Commands
Section titled “Commands”generate
Section titled “generate”Generate all AEO files (robots.txt, llms.txt, sitemap.xml, etc.):
npx aeo.js generatenpx aeo.js generate --url https://mysite.com --title "My Site" --out publicCreate an aeo.config.ts configuration file in your project:
npx aeo.js initThis 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:
npx aeo.js check # formatted outputnpx aeo.js check --json # machine-readable JSON for scriptingFail a CI build if the score drops below a threshold:
SCORE=$(npx aeo.js check --json | jq '.audit.score')[ "$SCORE" -ge 70 ] || { echo "GEO score $SCORE below 70"; exit 1; }report
Section titled “report”Deeper analysis than check: per-page citability scores, platform-specific hints (ChatGPT, Claude, Perplexity, Google AI Overviews, Bing Copilot), and a prioritized fix list.
npx aeo.js report > aeo-report.mdnpx aeo.js report --json > aeo-report.jsonOptions
Section titled “Options”| Flag | Description |
|---|---|
--out <dir> | Output directory (default: auto-detected) |
--url <url> | Site URL |
--title <title> | Site title |
--no-widget | Disable widget generation |
--json | JSON output (for check and report) |
--help, -h | Show help |
--version, -v | Show version |
Both --flag value and --flag=value forms are supported.
Configuration file
Section titled “Configuration file”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:
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:
npx aeo.js generate --url https://mysite.com --title "My Site" --out publicSee 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.