Quick Start
The fastest way to add AEO to your site depends on your framework.
-
Install the package:
Terminal window npm install aeo.js -
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',}),],}); -
Build your site — all AEO files are generated automatically.
Next.js
Section titled “Next.js”-
Install the package:
Terminal window npm install aeo.js -
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',},}); -
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' }))\""}}
-
Install the package:
Terminal window npm install aeo.js -
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',}),],});
CLI (any site)
Section titled “CLI (any site)”No framework integration needed:
npx aeo.js generate --url https://mysite.com --title "My Site"See CLI docs for all commands and options.