Configuration Reference
Full reference for GeoAIConfig and GenerateLlmsFilesConfig options.
GeoAIConfig
Passed to createGeoAI(). All options from this interface are also accepted by geoAIMiddleware(), createLlmsHandler(), and the CLI config file.
| Option | Type | Required | Description |
|---|---|---|---|
| siteName | string | Yes | Your site name — used as the H1 in llms.txt |
| siteUrl | string | Yes | Canonical site URL — used to build absolute resource URLs |
| provider | ContentProvider | Record<string, Resource[]> | Yes | Content source — static object or ContentProvider instance |
| siteDescription | string | No | Short site description — used as the blockquote in llms.txt |
| crawlers | 'all' | Record<string, 'allow' | 'disallow'> | No | AI crawler rules — 'all' allows every registered bot |
| cache | CacheAdapter | '1h' | '24h' | '7d' | No | Cache adapter or duration shorthand |
| crawlTracking | boolean | CrawlTrackingConfig | No | Enable GDPR-compliant bot visit logging |
| crypto | { encryptionKey: string } | No | AES-256-GCM encryption key (64-char hex) for API key storage |
provider
Either a static object mapping section names to resource arrays, or a class implementing ContentProvider:
typescript
// Static object
provider: {
Pages: [
{ title: 'Home', url: '/', description: 'Welcome' },
],
Products: [
{ title: 'Widget', url: '/products/widget', description: 'A widget', price: '$29' },
],
}
// ContentProvider interface
interface ContentProvider {
getSections(options?: { locale?: string }): Promise<Section[]>;
}
interface Section {
name: string;
type?: 'product' | 'article' | 'page';
resources: Resource[];
}
interface Resource {
title: string;
url: string;
description?: string;
content?: string;
price?: string;
available?: boolean;
}crawlers
typescript
// Allow all 16 registered AI crawlers
crawlers: 'all'
// Per-bot rules
crawlers: {
GPTBot: 'allow',
ClaudeBot: 'allow',
Bytespider: 'disallow',
}cache
typescript
// Duration shorthands (creates MemoryCacheAdapter)
cache: '1h'
cache: '24h'
cache: '7d'
// Custom adapter
import { FileCacheAdapter } from 'geo-ai-core';
cache: new FileCacheAdapter({ dir: '.cache/geo-ai' })crawlTracking
typescript
// Simple enable (uses MemoryCrawlStore, 10,000 max entries)
crawlTracking: true
// With custom store and HMAC secret
crawlTracking: {
store: new MyCustomStore(),
secret: process.env.CRAWL_SECRET,
}crypto
typescript
crypto: {
encryptionKey: process.env.ENCRYPTION_KEY!, // 64-char hex string
}
// Generate a key:
// node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"GenerateLlmsFilesConfig
Extends GeoAIConfig with two additional options for the CLI and generateLlmsFiles():
| Option | Type | Default | Description |
|---|---|---|---|
| outDir | string | 'public' | Output directory relative to cwd |
| locale | string | — | Locale passed to ContentProvider.getSections() |
All
GeoAIConfig options are valid in geo-ai.config.mjs — the CLI passes the entire config object to generateLlmsFiles().