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

turva-llms-txt-validator

v0.1.8

Published

Validate a site's llms.txt structure: eight checks, pass/warn/fail, JSON output. Same checks as the hosted validator at turva.dev/llms-txt-validator.

Readme

turva-llms-txt-validator

Validate a site's llms.txt structure from the command line, from Node or in CI. Eight checks, each reported as pass, warn or fail, with a one-line detail. No score on purpose: a structure check can say what is there and what is missing, and a number on top of eight checks would look like an agent-readiness score without measuring one.

This is the open-source form of the hosted validator at turva.dev/llms-txt-validator, which runs the same logic inside the open turva.dev Cloudflare Worker. The hosted validator stays canonical: if the two ever disagree, the hosted one wins and this package gets the fix.

Install

npm install -g turva-llms-txt-validator

Or run it without installing:

npx turva-llms-txt-validator example.com

CLI

llms-txt-validate example.com
llms-txt-validate example.com --json
llms-txt-validate example.com --strict

Exit codes: 0 valid (warnings allowed), 1 not valid (with --strict, warnings also exit 1), 2 fetch or input error. Only the target site's /llms.txt is fetched over https, following a redirect only to the same host or its www/apex twin (an off-site or unsafe redirect fails the first check), the fetch times out after 8 seconds and the read is capped at 256 KB. Nothing is stored.

The target has to be a public domain name: an IP literal, a bracketed IPv6 address, localhost and the internal-use TLDs local, internal, home, lan, corp, test and invalid are all refused before any request goes out, and every redirect hop is checked by the same rule. Names are not resolved here, so a public name that points at a private address is stopped by the network the fetch runs on rather than by this code. On the hosted validator that network is the Cloudflare edge, which does not route to private address space.

The eight checks

| # | Check | fail | warn | |---|-------|------|------| | 1 | File exists at /llms.txt, HTTP 200 (a same-site www/apex redirect is followed) | non-200, or an off-site or unsafe redirect | | | 2 | Response is plain text | body looks like HTML | content-type is not text/plain or text/markdown | | 3 | Starts with an H1 title | first non-empty line is not a markdown H1 | | | 4 | Blockquote summary after the title | | missing one-line summary | | 5 | H2 sections group the content | | no H2 sections | | 6 | Markdown links an agent can follow | | no links, or relative links | | 7 | Small enough to be cheap to read | | over 50 KB, or read truncated at 256 KB | | 8 | No HTML markup in the file | | HTML tags found |

Node API

import { validateHost } from "turva-llms-txt-validator";

const result = await validateHost("example.com");
console.log(result.summary);
for (const c of result.checks) console.log(c.status, c.label, c.detail);

The summary is one of valid, valid with warnings, or not valid. The result object is { target, summary, checks }, the same shape the hosted validator returns as JSON:

curl -H "Accept: application/json" "https://turva.dev/llms-txt-validator?url=example.com"

CI

GitHub Actions:

- name: Validate llms.txt
  run: npx turva-llms-txt-validator your-domain.com --strict

Woodpecker or any other runner: the same npx line works anywhere Node 18.17 or newer is present.

Why these checks

The llms.txt format is a plain text map of a site for AI agents: an H1 title, a one-line blockquote summary and H2 sections of markdown links. The checks test exactly that structure and nothing else. What the format is and why it matters is written out at llms.txt explained, and the free tools this package belongs to are collected at turva.dev/tools.

License

MIT. Source at github.com/erekola/llms-txt-validator. Published to npm from GitHub Actions with provenance, a signed attestation of where and how the package was built, verifiable on the npm package page.