{"_id":"@dualnova/llms-txt","name":"@dualnova/llms-txt","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dualnova/llms-txt","version":"0.1.0","description":"Parse, validate, and generate /llms.txt files — the emerging standard for guiding AI search crawlers (ChatGPT, Perplexity, Claude, Gemini).","keywords":["llms-txt","llmstxt","ai-search","geo","generative-engine-optimization","aeo","answer-engine-optimization","chatgpt","perplexity","claude","gemini","ai-seo","agent-ready"],"homepage":"https://github.com/DualNova/llms-txt#readme","bugs":{"url":"https://github.com/DualNova/llms-txt/issues"},"repository":{"type":"git","url":"git+https://github.com/DualNova/llms-txt.git"},"author":{"name":"DualNova LLC","email":"hello@dualnova.org","url":"https://dualnova.org"},"license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"llms-txt":"dist/cli.js"},"scripts":{"build":"tsc","test":"node --test --import tsx test/*.test.ts","lint":"tsc --noEmit","prepublishOnly":"npm run lint && npm run test && npm run build"},"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"^5.6.0"},"engines":{"node":">=20"},"_id":"@dualnova/llms-txt@0.1.0","gitHead":"291b15cb50f1e21e9ee9477e911c4f7874eb365f","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-h+PbTnNsVqIug8GQXK2hoQiXmS0QnmApUJ7oJDoNbhRb/rqgSYTgE2ytoDZc7wX1w9glu9mxrP/Ruoqk0IEhKw==","shasum":"0b0ef912a09d1d64713e25b44445d9f28ead1fde","tarball":"https://registry.npmjs.org/@dualnova/llms-txt/-/llms-txt-0.1.0.tgz","fileCount":23,"unpackedSize":41974,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dualnova%2fllms-txt@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAweXdbC7Y/V+wY55EjokteMHRyVrLhmyzKLaRgzfFHiAiAQi19H28YZ6+VgCT0ZlBDjvWHAeAjHWcgXR3HApwVxcw=="}]},"_npmUser":{"name":"miguelesco","email":"miguelangelescorche@gmail.com"},"directories":{},"maintainers":[{"name":"miguelesco","email":"miguelangelescorche@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/llms-txt_0.1.0_1779904038302_0.1570149472179876"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-27T17:47:18.160Z","0.1.0":"2026-05-27T17:47:18.449Z","modified":"2026-05-27T17:47:18.892Z"},"maintainers":[{"name":"miguelesco","email":"miguelangelescorche@gmail.com"}],"description":"Parse, validate, and generate /llms.txt files — the emerging standard for guiding AI search crawlers (ChatGPT, Perplexity, Claude, Gemini).","homepage":"https://github.com/DualNova/llms-txt#readme","keywords":["llms-txt","llmstxt","ai-search","geo","generative-engine-optimization","aeo","answer-engine-optimization","chatgpt","perplexity","claude","gemini","ai-seo","agent-ready"],"repository":{"type":"git","url":"git+https://github.com/DualNova/llms-txt.git"},"author":{"name":"DualNova LLC","email":"hello@dualnova.org","url":"https://dualnova.org"},"bugs":{"url":"https://github.com/DualNova/llms-txt/issues"},"license":"MIT","readme":"# @dualnova/llms-txt\n\n> Parse, validate, and generate `/llms.txt` files — the emerging standard for guiding AI search crawlers (ChatGPT, Perplexity, Claude, Gemini).\n\n[![npm](https://img.shields.io/npm/v/@dualnova/llms-txt.svg)](https://www.npmjs.com/package/@dualnova/llms-txt)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/DualNova/llms-txt.svg?style=social)](https://github.com/DualNova/llms-txt)\n\nA tiny TypeScript library and CLI for working with `/llms.txt` files. Zero runtime dependencies, ESM-only, Node 20+.\n\n> 🇪🇸 **¿Español?** Lee este README en [español más abajo](#-leeme-en-español).\n\n---\n\n## What is `llms.txt`?\n\n`llms.txt` is an emerging convention (see [llmstxt.org](https://llmstxt.org)) that publishes a Markdown summary of a site at the well-known path `/llms.txt`. The goal is to give AI assistants and crawlers a curated, low-noise view of the site — the equivalent of `robots.txt` but for LLM-friendly content discovery.\n\nA minimal example:\n\n```markdown\n# Example Site\n\n> A short summary of what this site is and who it is for.\n\n## Key pages\n\n- [Home](https://example.com/): main landing page\n- [About](https://example.com/about): team and mission\n- [Pricing](https://example.com/pricing)\n```\n\n### Honest note on impact (May 2026)\n\nAs of this writing, primary sources from Google (John Mueller, Gary Illyes), the [SE Ranking 300k-domain study](https://seranking.com/blog/llms-txt-research/) and the OtterlyAI server-log audit report that **no major AI search engine currently uses `llms.txt` as a citation-ranking signal**. The file is still worth publishing as a low-cost, declarative statement of intent that may be adopted as the standard matures. This library treats `llms.txt` as a useful piece of site hygiene, not a silver bullet.\n\nIf you want measurable AI search visibility today, focus on these in order:\n\n1. **Unblock AI crawlers in `robots.txt`** (`GPTBot`, `ClaudeBot`, `Google-Extended`, `PerplexityBot`).\n2. **Publish 134-167 word citable passages** with the \"X is [definition]\" pattern on key pages.\n3. **Build brand mentions on Reddit, YouTube, and Wikipedia** — these correlate 3× more strongly with AI citations than backlinks (Ahrefs Dec 2025 study, n=75,000 brands).\n4. **Publish `llms.txt`** — this library.\n\n## Install\n\n```sh\nnpm install @dualnova/llms-txt\n# or\npnpm add @dualnova/llms-txt\n# or run the CLI without installing\nnpx @dualnova/llms-txt validate https://example.com/llms.txt\n```\n\n## CLI\n\n```sh\n# Validate the llms.txt in the current directory\nllms-txt validate\n\n# Validate a specific local file\nllms-txt validate ./public/llms.txt\n\n# Fetch and validate a remote one\nllms-txt validate --url https://dualnova.org/llms.txt\n\n# Show help\nllms-txt --help\n```\n\nSample output:\n\n```\nValidating /Users/me/site/public/llms.txt\n  Title:        DualNova\n  Description:  DualNova is a blockchain and AI software development company …\n  Sections:     5\n  Links:        18\n\nWARN  Section \"Recent client work\" has no links and no content. (sections[3])\n\n✓ 0 error(s), 1 warning(s)\n```\n\nExit codes:\n\n| Code | Meaning |\n|------|---------|\n| `0`  | No errors. Warnings may still be printed. |\n| `1`  | Validation errors found, or invalid CLI arguments. |\n| `2`  | Could not read the file or fetch the URL. |\n\n## Programmatic API\n\n### Validate\n\n```typescript\nimport { validateLlmsTxt } from '@dualnova/llms-txt';\nimport { readFileSync } from 'node:fs';\n\nconst source = readFileSync('./public/llms.txt', 'utf8');\nconst { valid, issues, parsed } = validateLlmsTxt(source);\n\nif (!valid) {\n  for (const issue of issues.filter(i => i.severity === 'error')) {\n    console.error(`✗ ${issue.message}`);\n  }\n  process.exit(1);\n}\n\nconsole.log(`Parsed ${parsed.sections.length} sections.`);\n```\n\n### Parse\n\n```typescript\nimport { parseLlmsTxt } from '@dualnova/llms-txt';\n\nconst { title, description, sections } = parseLlmsTxt(source);\nfor (const section of sections) {\n  console.log(`## ${section.heading}`);\n  for (const link of section.links) {\n    console.log(`  - ${link.title}: ${link.url}`);\n  }\n}\n```\n\n### Build\n\nGenerate `llms.txt` from typed input — useful in build pipelines that read from a CMS, sitemap, or MDX frontmatter.\n\n```typescript\nimport { buildLlmsTxt } from '@dualnova/llms-txt';\nimport { writeFileSync } from 'node:fs';\n\nconst md = buildLlmsTxt({\n  title: 'Acme Robotics',\n  description: 'Acme Robotics builds autonomous mobile robots for warehouse logistics.',\n  intro: 'Founded in 2021. HQ in Pittsburgh, PA.',\n  sections: [\n    {\n      heading: 'Key pages',\n      links: [\n        { title: 'Home', url: 'https://acme-robotics.example/', description: 'overview' },\n        { title: 'Products', url: 'https://acme-robotics.example/products' },\n      ],\n    },\n  ],\n});\n\nwriteFileSync('./public/llms.txt', md);\n```\n\n### Use in a Next.js build\n\nAdd a route at `app/llms.txt/route.ts`:\n\n```typescript\nimport { buildLlmsTxt } from '@dualnova/llms-txt';\n\nexport function GET() {\n  const body = buildLlmsTxt({\n    title: 'My Site',\n    description: 'One-sentence summary.',\n    sections: [\n      { heading: 'Pages', links: [{ title: 'Home', url: 'https://my-site.example/' }] },\n    ],\n  });\n  return new Response(body, {\n    headers: { 'content-type': 'text/plain; charset=utf-8' },\n  });\n}\n\nexport const dynamic = 'force-static';\n```\n\n### Use in CI to fail builds on broken llms.txt\n\n```yaml\n# .github/workflows/llms-txt.yml\nname: Validate llms.txt\non: [push, pull_request]\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with: { node-version: '20' }\n      - run: npx -y @dualnova/llms-txt validate ./public/llms.txt\n```\n\n## Types\n\n```typescript\ninterface ParsedLlmsTxt {\n  title: string;\n  description?: string;\n  intro: string;\n  sections: LlmsSection[];\n}\n\ninterface LlmsSection {\n  heading: string;\n  links: LlmsLink[];\n  freeform: string;\n}\n\ninterface LlmsLink {\n  title: string;\n  url: string;\n  description?: string;\n}\n\ninterface ValidationIssue {\n  severity: 'error' | 'warning' | 'info';\n  message: string;\n  at?: string;\n}\n```\n\n## Examples in this repo\n\n- [`examples/minimal.txt`](examples/minimal.txt) — bare minimum that passes validation\n- [`examples/full.txt`](examples/full.txt) — a realistic small-company example\n\n## Contributing\n\nPRs welcome — please open an issue first for non-trivial changes. The codebase is intentionally tiny (3 files in `src/`, no runtime deps). Tests use Node's built-in test runner.\n\n## License\n\n[MIT](LICENSE) © [DualNova LLC](https://dualnova.org)\n\n---\n\n## 🇪🇸 Léeme en español\n\n### ¿Qué es `llms.txt`?\n\n`llms.txt` es una convención emergente (ver [llmstxt.org](https://llmstxt.org)) que publica un resumen en Markdown del sitio en la ruta well-known `/llms.txt`. El objetivo es darle a los crawlers e IA una vista curada y de bajo ruido del sitio — el equivalente de `robots.txt` pero para descubrimiento de contenido amigable para LLMs.\n\n### Nota honesta sobre impacto (mayo 2026)\n\nA la fecha, fuentes primarias de Google (John Mueller, Gary Illyes), el [estudio de SE Ranking con 300k dominios](https://seranking.com/blog/llms-txt-research/) y la auditoría de logs de OtterlyAI reportan que **ningún motor de búsqueda AI mayor usa hoy `llms.txt` como señal de ranking de citaciones**. Vale la pena publicarlo igual como declaración de bajo costo de intención que puede adoptarse a medida que madura el standard. Esta librería trata a `llms.txt` como higiene útil del sitio, no como bala de plata.\n\nSi quieres visibilidad medible en AI search HOY, prioriza en este orden:\n\n1. **Desbloquea los AI crawlers en `robots.txt`** (`GPTBot`, `ClaudeBot`, `Google-Extended`, `PerplexityBot`).\n2. **Publica pasajes citables de 134-167 palabras** con el patrón \"X es [definición]\" en páginas clave.\n3. **Construye menciones de marca en Reddit, YouTube y Wikipedia** — estas correlacionan 3× más con citaciones AI que los backlinks (estudio Ahrefs Dic 2025, n=75,000 marcas).\n4. **Publica `llms.txt`** — esta librería.\n\n### Instalación y uso\n\nLos ejemplos arriba aplican igual. La CLI tiene la misma sintaxis. Toda la documentación de la API es traducible directamente.\n\n```sh\nnpm install @dualnova/llms-txt\nnpx @dualnova/llms-txt validate ./public/llms.txt\n```\n\n### Licencia\n\n[MIT](LICENSE) © [DualNova LLC](https://dualnova.org) — equipo bilingüe (español + inglés) basado en Caracas, Bogotá y Miami. Construido como parte del esfuerzo abierto de Generative Engine Optimization (GEO) que mantenemos en [dualnova.org](https://dualnova.org).\n\n---\n\n**Built by [DualNova](https://dualnova.org)** — blockchain and AI software development for LATAM and the US.\n","readmeFilename":"README.md","_rev":"1-d4a7ded105babb6bc2edb50ee00c44f1"}