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

@strattlabs/llms-txt-kit

v0.1.1

Published

Generate and validate spec-compliant llms.txt and llms-full.txt files.

Readme

llms-txt-kit

License: MIT · strattlabs.com

Generate and validate spec-compliant llms.txt and llms-full.txt files.

llms.txt is a simple, growing convention for making a site legible to LLMs and AI agents: a single Markdown file at your site root that indexes your most important pages, plus an optional llms-full.txt that inlines the full content. This kit gives you a small, dependency-free CLI and library to generate those files from your existing Markdown content and to validate files you already have.

  • Zero runtime dependencies. Pure TypeScript; nothing to audit downstream.
  • Generator — crawl a content directory and emit llms.txt + llms-full.txt.
  • Validator/linter — check an existing file against the spec with precise, rule-coded diagnostics.
  • Library APIparse, format, validate, generate for programmatic use.

Status: v0.1 — early but production-shaped. The API surface in src/index.ts is the stable contract.

Install

pnpm add -D @strattlabs/llms-txt-kit
# or: npm i -D @strattlabs/llms-txt-kit / yarn add -D @strattlabs/llms-txt-kit

Requires Node.js ≥ 18.18.

CLI

Generate

llms-txt generate \
  --content ./docs \
  --base-url https://example.com \
  --title "Example Docs" \
  --summary "Everything you need to integrate with Example." \
  --out .

Writes llms.txt and llms-full.txt to --out (default: current directory). Use --stdout to print llms.txt instead of writing files.

Per-file metadata is read from optional YAML frontmatter; sensible fallbacks are derived from the document body and file path when it is absent:

---
title: Quickstart
description: Make your first API call in five minutes.
section: Guides
order: 1
draft: false
---

# Quickstart

...

| Frontmatter key | Effect | Fallback | | --------------- | -------------------------------------- | -------------------------------------------------- | | title | Link text in the index | first # H1, else humanized filename | | description | Trailing notes on the link | first prose line (truncated) | | section | ## Section the link is grouped under | top-level folder name, else Docs | | order | Sort order within a section | alphabetical by title | | url | Override the derived link URL | base-url + path (ext stripped, index → folder) | | draft | true excludes the file | included |

A section literally named Optional is emitted last, matching the spec's special-case semantics (consumers may skip it when they need a shorter context).

Validate

llms-txt validate ./llms.txt
llms-txt validate ./llms.txt --strict          # warnings fail too
llms-txt validate ./llms.txt --no-absolute-urls # don't warn on relative URLs

Exit code is 1 when there are errors (or warnings under --strict), else 0 — suitable for CI.

Library

import { generate, validate, parse, format } from '@strattlabs/llms-txt-kit';

const { llmsTxt, llmsFullTxt } = await generate({
  contentDir: './docs',
  baseUrl: 'https://example.com',
  title: 'Example Docs',
});

const result = validate(llmsTxt);
if (!result.valid) {
  for (const d of result.diagnostics) {
    console.error(`${d.rule} ${d.severity}: ${d.message}`);
  }
}

// Lossless AST round-trips: parse(format(doc)) deep-equals doc.
const doc = parse(llmsTxt);
const text = format(doc);

Validation rules

| Rule | Severity | Meaning | | ----- | -------- | --------------------------------------------------- | | LT001 | error | Missing required H1 title | | LT002 | error | More than one H1 | | LT003 | warning | Section has no links | | LT004 | error | Malformed list item (not - [title](url)) | | LT005 | error | Link missing a title or URL | | LT006 | warning | Duplicate URL | | LT007 | error | Content before the H1 title | | LT008 | warning | Heading deeper than H2 (index should be flat) | | LT009 | warning | No summary blockquote | | LT010 | warning | No sections at all | | LT011 | warning | Relative URL (absolute recommended for portability) | | LT012 | warning | Link declared before any section heading |

Validation is structural: it checks that a file conforms to the llms.txt format. It does not fetch URLs or judge content quality.

Why MIT?

This kit operates entirely on a public standard and formats public content into a public file format. We want the widest possible adoption — embedding it in other tools, docs pipelines, and frameworks — with zero friction. MIT is the lowest-friction, most-recognized permissive license for that goal. (Apache-2.0's explicit patent grant adds little here: there is no novel, patentable method in a text formatter, and the extra ceremony would only slow adoption.)

Examples

See examples/:

  • examples/content/ — a small Markdown tree you can run the generator against.
  • examples/llms-invalid.txt — a deliberately broken file that trips most validation rules; try llms-txt validate examples/llms-invalid.txt.

Development

pnpm install
pnpm test          # vitest
pnpm typecheck
pnpm lint
pnpm build         # emit dist/

License

MIT © 2026 Stratt Labs


Part of the Stratt Labs toolkit for the agentic web

Small, standards-friendly tools from Stratt Labs: