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; }

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