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

llms-txt-check

v0.1.5

Published

Parse, lint, and validate llms.txt files against the deployed site that serves them.

Downloads

107

Readme

llms-txt-check

Validate a site's llms.txt against what the site actually serves.

Your llms.txt generator promises AI tools a map of your docs. This tool verifies the deployed site honors the map, and fails your CI when it stops.

npx llms-txt-check https://your-docs-site.com

Why a generator isn't enough

Generators run at build time. Breakage happens at the serving layer: host redirect rules, trailing-slash normalization, docs restructures, domain migrations. Your build can be green while every AI agent reading your llms.txt gets 404s.

Real examples found with this tool in August 2026:

  • Drizzle ORM's llms.txt listed 71 URLs that returned 404 in production (16% of the file, the entire PostgreSQL section).
  • Cursor's docs moved domains, and the old docs.cursor.com/llms.txt started redirecting to an HTML marketing page. Agents holding the previously correct URL now ingest a React shell.
  • LiteLLM's llms.txt had dead links too, including its own intro page.
  • A Docusaurus site once served a zero-byte llms.txt thanks to a trailingSlash config interaction with its host.

Every one of these sites had a green build while serving a broken llms.txt.

What it checks

  1. Discovery. /llms.txt exists, returns 200, and is markdown rather than an HTML app shell.
  2. Spec lint. One H1 title, well-formed - [title](url): description entries, no duplicate or relative URLs, no staging domains baked in.
  3. Serving validation. Every listed URL is fetched against the live site and checked for HTTP errors, zero-byte and near-empty bodies, and .md URLs that return HTML.

Usage

# Check a deployed site (fetches <url>/llms.txt)
npx llms-txt-check https://docs.example.com

# Check a llms.txt URL directly
npx llms-txt-check https://docs.example.com/llms.txt

# Lint a local file without network checks
npx llms-txt-check ./static/llms.txt --lint

# Spot-check 50 URLs spread across a large file
npx llms-txt-check https://docs.example.com --sample 50

# Machine-readable output
npx llms-txt-check https://docs.example.com --json

Exit code 0 means healthy, 1 means problems were found, 2 means the tool itself could not run. That makes CI integration one line:

# .github/workflows/deploy.yml, after your deploy step
- run: npx llms-txt-check ${{ env.DEPLOY_URL }}

Library API

The parser and checks are exported for programmatic use, with zero dependencies:

import { parse, lint, checkSite } from "llms-txt-check";

const doc = parse(text);
// { title, summary, preamble, sections: [{ name, links: [{ title, url, description }] }] }

const issues = lint(doc, { origin: "https://docs.example.com" });

const report = await checkSite("https://docs.example.com", { sample: 50 });
console.log(report.failures);

Options

| Flag | Default | What it does | | --- | --- | --- | | --sample <n> | all | Check at most n URLs, spread evenly across the file | | --concurrency <n> | 8 | Parallel requests | | --timeout <ms> | 15000 | Per-request timeout | | --lint | off | Skip network checks, lint the file structure only | | --json | off | Machine-readable report |

License

MIT