Skip to content

feat: aeo-starter — standalone AEO CLI tool #83

@rubenmarcus

Description

@rubenmarcus

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:

  1. Most developers don't know which AI crawlers exist or how they behave
  2. AI crawlers don't execute JavaScript — content behind JS is invisible
  3. There's no standard tooling for llms.txt, AI-specific sitemaps, or citation tracking
  4. Every framework has different routing patterns for serving these files
  5. 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.com

Checks 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-project

Reads 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:

  1. Detecting the stack — Reads package.json: Next.js, Nuxt, Astro, Remix, SvelteKit, Express, Hono, Fastify, or static HTML
  2. Scanning existing pages — Discovers all routes from the project's file structure
  3. Analyzing content — Extracts titles, descriptions, headings to auto-populate llms.txt and structured data
  4. Generating framework-native code — Outputs route handlers, middleware, and components matching the project's patterns
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Critical priorityautomationPR/Issue/Release automationtemplatesProject templates and startersweb-devWeb development projects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions