Skip to content

Quick Start

The fastest way to add AEO to your site depends on your framework.

  1. Install the package:

    Terminal window
    npm install aeo.js
  2. Add the integration to your Astro config:

    astro.config.mjs
    import { defineConfig } from 'astro/config';
    import { aeoAstroIntegration } from 'aeo.js/astro';
    export default defineConfig({
    site: 'https://mysite.com',
    integrations: [
    aeoAstroIntegration({
    title: 'My Site',
    description: 'A site optimized for AI discovery',
    url: 'https://mysite.com',
    }),
    ],
    });
  3. Build your site — all AEO files are generated automatically.

  1. Install the package:

    Terminal window
    npm install aeo.js
  2. Wrap your Next.js config:

    next.config.mjs
    import { withAeo } from 'aeo.js/next';
    export default withAeo({
    aeo: {
    title: 'My Site',
    description: 'A site optimized for AI discovery',
    url: 'https://mysite.com',
    },
    });
  3. Add the post-build step to package.json:

    {
    "scripts": {
    "postbuild": "node -e \"import('aeo.js/next').then(m => m.postBuild({ title: 'My Site', url: 'https://mysite.com' }))\""
    }
    }
  1. Install the package:

    Terminal window
    npm install aeo.js
  2. Add the plugin to your Vite config:

    vite.config.ts
    import { defineConfig } from 'vite';
    import { aeoVitePlugin } from 'aeo.js/vite';
    export default defineConfig({
    plugins: [
    aeoVitePlugin({
    title: 'My Site',
    description: 'A site optimized for AI discovery',
    url: 'https://mysite.com',
    }),
    ],
    });

No framework integration needed:

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

See CLI docs for all commands and options.