Quick Start
Get GEO AI running in your project in under 5 minutes.
Installation
Pick the package that matches your stack:
| Stack | Package | Install |
|---|---|---|
| Next.js | geo-ai-next | npm install geo-ai-next |
| NestJS | geo-ai-nest | npm install geo-ai-nest |
| Any Node.js | geo-ai-core | npm install geo-ai-core |
| WordPress / WooCommerce | geo-ai-woo | Download plugin from GitHub |
| Shopify | geo-ai-shopify | Install from Shopify Partner dashboard |
Next.js setup
The recommended production approach is static file generation — generate llms.txt and llms-full.txt before next build. Next.js serves them from public/ automatically with no middleware needed.
1. Create geo-ai.config.mjs
geo-ai.config.mjs
// @ts-check
/** @type {import('geo-ai-next').GenerateLlmsFilesConfig} */
export default {
siteName: 'My Site',
siteUrl: 'https://example.com',
siteDescription: 'A short description for AI crawlers',
provider: {
Pages: [
{ title: 'Home', url: '/', description: 'Welcome page' },
{ title: 'About', url: '/about', description: 'About us' },
],
Products: [
{
title: 'Widget Pro',
url: '/products/widget-pro',
description: 'Our flagship widget',
price: '$29.99',
available: true,
},
],
},
crawlers: 'all',
};2. Add the build script
package.json
{
"scripts": {
"geo:generate": "geo-ai-generate",
"build": "npm run geo:generate && next build"
}
}How it works
geo-ai-generate reads your config, writes public/llms.txt and public/llms-full.txt, then next build picks them up as static assets.3. Run and verify
bash
npm run build
# Verify the files were generated
ls public/llms.txt public/llms-full.txt
# Check the output
curl https://yoursite.com/llms.txtBoth files return 200 OK with text/plain content. No middleware, no route handler needed for the static approach.
NestJS setup
Import GeoAIModule into your root AppModule using forRoot. The module registers GeoAIService and the middleware globally.
app.module.ts
import { Module } from '@nestjs/common';
import { GeoAIModule } from 'geo-ai-nest';
@Module({
imports: [
GeoAIModule.forRoot({
siteName: 'My Site',
siteUrl: 'https://example.com',
siteDescription: 'A short description for AI crawlers',
provider: {
Pages: [
{ title: 'Home', url: '/', description: 'Welcome page' },
],
},
crawlers: 'all',
middleware: { enabled: true },
}),
],
})
export class AppModule {}Then inject GeoAIService wherever you need it:
typescript
import { Injectable } from '@nestjs/common';
import { GeoAIService } from 'geo-ai-nest';
@Injectable()
export class SiteService {
constructor(private readonly geo: GeoAIService) {}
async getLlmsTxt() {
return this.geo.generateLlms(false);
}
}Full NestJS docs
See the geo-ai-nest package docs for module options, middleware, guard, interceptor, and decorators.
Node.js / other frameworks
Use geo-ai-core directly with any Node.js framework — Express, Fastify, Hono, etc.
typescript
import { createGeoAI } from 'geo-ai-core';
const geo = createGeoAI({
siteName: 'My Site',
siteUrl: 'https://example.com',
provider: {
Pages: [
{ title: 'Home', url: '/', description: 'Welcome' },
],
},
});
// Generate llms.txt content
const llmsTxt = await geo.generateLlms(false);
const llmsFullTxt = await geo.generateLlms(true);
// Generate robots.txt block
const robotsTxt = geo.generateRobotsTxt();
// SEO signals
const metaTags = geo.generateMetaTags();
const linkHeader = geo.generateLinkHeader();
const jsonLd = geo.generateJsonLd();Next steps
- Read the
geo-ai-coredocs for the full API — caching, crawl tracking, AI description generation. - Read the
geo-ai-nextdocs for middleware and route handler options. - Read the
geo-ai-nestdocs for NestJS module, guard, interceptor, and decorators. - Check the GEO Specification to understand what llms.txt and AI metadata actually do.
- Run the Analyzer on your site to see your current AI visibility score.