-
Notifications
You must be signed in to change notification settings - Fork 0
Description
aeo-starter — AI Discoverability CLI
Build a standalone CLI tool called aeo-starter that scans any codebase, detects the framework, and auto-implements Answer Engine Optimization so AI crawlers can discover and cite the site.
Problem
Websites need AEO (Answer Engine Optimization) but:
- Most developers don't know which AI crawlers exist or how they behave
- AI crawlers don't execute JavaScript — content behind JS is invisible
- There's no standard tooling for
llms.txt, AI-specific sitemaps, or citation tracking - Every framework has different routing patterns for serving these files
- Implementing all of this manually across a codebase is tedious and error-prone
Solution
A CLI tool with two modes:
Audit mode — Point it at any URL, get an AEO score:
npx aeo-starter audit https://example.comChecks robots.txt AI directives, llms.txt presence, structured data, SSR status. Scores 0-100.
Implement mode — Point it at a codebase, it auto-generates everything:
npx aeo-starter implement ./my-projectReads package.json, detects the framework, scans existing routes/pages, and generates robots.txt, llms.txt, sitemap, JSON-LD, bot detection middleware, and markdown endpoints.
Key Feature: Codebase Intelligence
Unlike the ralph-templates AEO/SEO specs (which add AEO to a new project), this tool works on existing codebases by:
- Detecting the stack — Reads
package.json: Next.js, Nuxt, Astro, Remix, SvelteKit, Express, Hono, Fastify, or static HTML - Scanning existing pages — Discovers all routes from the project's file structure
- Analyzing content — Extracts titles, descriptions, headings to auto-populate
llms.txtand structured data - Generating framework-native code — Outputs route handlers, middleware, and components matching the project's patterns
- Non-destructive — Generates new files, never modifies existing code. Dry-run mode to preview.
Architecture
aeo-starter/
├── src/
│ ├── cli.ts # Commander.js entry (audit, implement)
│ ├── detector/
│ │ ├── framework.ts # package.json → framework detection
│ │ └── routes.ts # File structure → route discovery
│ ├── analyzer/
│ │ ├── content.ts # Page content extraction
│ │ └── existing-aeo.ts # Detect existing robots.txt, JSON-LD, etc.
│ ├── audit/
│ │ ├── index.ts # Audit orchestrator
│ │ ├── checks.ts # Individual audit checks
│ │ └── scorer.ts # 0-100 scoring engine
│ ├── generators/
│ │ ├── robots.ts # robots.txt code generator
│ │ ├── llms-txt.ts # llms.txt code generator
│ │ ├── sitemap.ts # Sitemap code generator
│ │ ├── structured-data.ts # JSON-LD code generator
│ │ ├── bot-detector.ts # Middleware code generator
│ │ └── markdown.ts # Markdown endpoint code generator
│ ├── frameworks/ # Framework-specific templates
│ │ ├── nextjs.ts
│ │ ├── nuxt.ts
│ │ ├── astro.ts
│ │ ├── remix.ts
│ │ ├── sveltekit.ts
│ │ ├── express.ts
│ │ └── static.ts
│ └── utils/
│ ├── ai-bots.ts # AI crawler user-agent database
│ └── config.ts # Config schema and loader
└── tests/
Tech Stack
TypeScript, Commander.js, Zod, Cheerio, Unified/Remark, xml2js, glob, chalk, ora, Vitest
Labels
P1, templates, automation, web-dev, seo
Related
- ralph-templates: AEO Toolkit — Drop-in AEO for new projects
- llmstxt.org — llms.txt specification
- Conductor AI Crawlability
- Firecrawl