GEO AI CLI
geo-ai-cli — generate and validate llms.txt / llms-full.txt for any Node.js project. Works with any framework. Powered by geo-ai-core.
Overview
The CLI is a standalone tool for generating and validating the AI visibility files that GEO AI produces. It reads a geo-ai.config.ts (or .js / .json) file and writes llms.txt and llms-full.txt to your output directory.
It is framework-agnostic — use it with Next.js, Express, Fastify, or any static site generator. Zero runtime dependencies beyond geo-ai-core.
Installation
# Local (recommended)
npm install --save-dev geo-ai-cli
# Global
npm install -g geo-ai-cliQuick start
# 1. Scaffold a config file
npx geo-ai init
# 2. Edit geo-ai.config.ts with your site details
# 3. Generate llms.txt and llms-full.txt into ./public
npx geo-ai generate
# 4. Validate the output
npx geo-ai validateBuild integration
geo-ai generate to your build script so files are always up to date before deployment.Commands
geo-ai init
Scaffolds a geo-ai.config.ts starter file in the current directory. Exits safely without overwriting if a config already exists.
geo-ai initgeo-ai generate
Generates llms.txt and llms-full.txt from your config and writes them to the output directory (default: ./public).
geo-ai generate [--config <path>] [--out <path>]| Flag | Default | Description |
|---|---|---|
| --config | auto-discover | Path to config file |
| --out | ./public | Output directory |
Config discovery order: geo-ai.config.ts → geo-ai.config.js → geo-ai.config.json
geo-ai validate
Checks that llms.txt and llms-full.txt are present and have valid content. Supports both local files and remote URLs. Exits 1 on any failure.
geo-ai validate [--path <dir>] [--url <url>]| Flag | Default | Description |
|---|---|---|
| --path | ./public | Local directory to check |
| --url | — | Remote base URL (fetches /llms.txt and /llms-full.txt) |
geo-ai inspect
Previews your config: site info, crawler rules, resource sections with item counts. Optionally fetches and displays remote llms files via --url.
geo-ai inspect [--config <path>] [--url <url>]Config file
import type { GeoAIConfig } from 'geo-ai-core';
export default {
siteName: 'My Site',
siteUrl: 'https://example.com',
siteDescription: 'A brief description for AI crawlers.',
crawlers: 'all',
provider: {
Pages: [
{ title: 'Home', url: 'https://example.com/', description: 'Welcome page' },
],
Blog: [
{ title: 'Getting Started', url: 'https://example.com/blog/start', description: 'First steps' },
],
},
} satisfies GeoAIConfig;Required fields: siteName, siteUrl, provider.
Debug mode
Set DEBUG=geo-ai to print stack traces to stderr:
DEBUG=geo-ai geo-ai generateRequirements
- Node.js >= 20