npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

geo-ai-core

v0.2.2

Published

Zero-dependency TypeScript engine for AI Search Optimization (GEO) — generates llms.txt, manages AI crawlers, SEO signals, caching and more

Readme

geo-ai-core

npm

Part of the GEO AI – AI Search Optimization ecosystem. GitHub

Zero-dependency TypeScript engine for AI Search Optimization (GEO). Optimizes websites for AI search engines — ChatGPT, Claude, Gemini, Perplexity, DeepSeek, Grok, YandexGPT, GigaChat and more.

Works with any Node.js framework or plain server. For Next.js, use geo-ai-next which adds static file generation, middleware, and a route handler on top.

Try the analyzer at geoai.run/analyze

Ecosystem

| Package | Platform | Description | |---------|----------|-------------| | geo-ai-core | Any Node.js | Zero-dependency engine (this package) | | geo-ai-next | Next.js >= 16 | Middleware + route handler + static file generation | | geo-ai-cli | Any Node.js | CLI — geo-ai init / generate / validate / inspect |

Installation

npm install geo-ai-core
# Next.js projects:
npm install geo-ai-next
# CLI (any project):
npm install --save-dev geo-ai-cli
# or globally:
npm install -g geo-ai-cli

Quick Start

import { createGeoAI } from 'geo-ai-core';

const geo = createGeoAI({
  siteName: 'My Site',
  siteUrl: 'https://example.com',
  provider: {
    Products: [
      { title: 'Widget', url: '/products/widget', description: 'A great widget' },
    ],
    Blog: [
      { title: 'Hello World', url: '/blog/hello', description: 'First post' },
    ],
  },
});

// llms.txt / llms-full.txt
const llmsTxt = await geo.generateLlms(false);
const llmsFullTxt = await geo.generateLlms(true);

// robots.txt block
const robotsTxt = geo.generateRobotsTxt();

// SEO signals
const metaTags = geo.generateMetaTags();
const linkHeader = geo.generateLinkHeader();
const jsonLd = geo.generateJsonLd();

ContentProvider

For dynamic data sources, implement the ContentProvider interface:

import { createGeoAI, type ContentProvider } from 'geo-ai-core';

class MyProvider implements ContentProvider {
  async getSections(options?: { locale?: string }) {
    return [
      { name: 'Products', type: 'product', resources: await fetchProducts() },
      { name: 'Blog', type: 'page', resources: await fetchPosts() },
    ];
  }
}

const geo = createGeoAI({
  siteName: 'My Site',
  siteUrl: 'https://example.com',
  provider: new MyProvider(),
  crawlers: 'all',
  cache: '24h',
  crawlTracking: true,
});

AI Description Generation

Separate entry point — only loaded when imported, fully tree-shakeable:

import { AiGenerator } from 'geo-ai-core/ai';

const ai = new AiGenerator({
  provider: 'anthropic',
  apiKey: 'sk-...',
  model: 'claude-sonnet-4-20250514',
});

const description = await ai.generate({
  title: 'Premium Widget',
  content: 'A high-quality widget...',
  type: 'product',
  price: '$29.99',
});

Bulk generation with progress (concurrent within each batch):

const results = await ai.bulkGenerate(items, {
  batchSize: 5,
  maxItems: 50,
  onProgress: (completed, total) => console.log(`${completed}/${total}`),
});

Configuration

interface GeoAIConfig {
  siteName: string;
  siteUrl: string;
  provider: ContentProvider | Record<string, Resource[]>;

  siteDescription?: string;
  crawlers?: Record<string, 'allow' | 'disallow'> | 'all';
  cache?: CacheAdapter | string;  // '1h', '24h', '7d' or custom adapter
  crypto?: { encryptionKey: string };  // 64-char hex for AES-256-GCM
  crawlTracking?: { store?: CrawlStore; secret?: string } | true;
}

Entry Points

| Entry | Import | Contents | |-------|--------|----------| | Main | geo-ai-core | createGeoAI, LlmsGenerator, BotRulesEngine, CrawlTracker, SeoGenerator, CryptoService, cache adapters, all types | | AI | geo-ai-core/ai | AiGenerator, RateLimiter, buildPrompt, classifyAiError, AiProviderError |

Supported AI Crawlers

GPTBot, OAI-SearchBot, ClaudeBot, claude-web, Google-Extended, PerplexityBot, DeepSeekBot, GrokBot, meta-externalagent, PanguBot, YandexBot, SputnikBot, Bytespider, Baiduspider, Amazonbot, Applebot

Requirements

  • Node.js >= 20
  • TypeScript >= 5.5 (recommended)

License

GPL v2