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

astro-llm

v0.1.0

Published

Generates a deterministic, static LLM-readable context file for Astro sites using a first-run config file

Readme

astro-llm

Deterministic, build-time content extraction for Astro sites, designed for Large Language Model (LLM) usage.

astro-llm generates a single, clean, static context file from your built HTML — suitable for:

  • Retrieval-Augmented Generation (RAG)
  • Chat grounding
  • Offline LLM training
  • Search indexing
  • Auditable documentation snapshots

No runtime JavaScript.
No servers.
No magic.


Core Principles

  • Build-time only – runs after astro build
  • Deterministic output – same input, same output
  • Config-first – behaviour controlled by llm.config.json
  • Safety by default – sensitive data stripped
  • LLM-friendly – readable, predictable structure

What This Plugin Does

After your site is built:

  1. Scans generated .html files in /dist
  2. Extracts readable content in DOM order
  3. Applies safety rules (email / phone / scripts)
  4. Applies include/exclude rules
  5. Writes a single output file (e.g. llm.txt or llm.json)

What This Plugin Does NOT Do

  • ❌ No runtime DOM mutation
  • ❌ No network requests
  • ❌ No environment variables
  • ❌ No telemetry or analytics
  • ❌ No automatic crawling or discovery

Everything is explicit.


First Run Behaviour

On first run (dev or build), astro-llm will:

  • Create llm.config.json in the project root
  • Populate it with explicit defaults
  • Never overwrite it again

If the file already exists, it is left untouched.


Configuration (llm.config.json)

This file is the single source of truth.

{
  "enabled": true,
  "output": {
    "format": "txt",
    "filename": "llm.txt"
  },
  "include": {
    "pages": true,
    "headings": true,
    "paragraphs": true,
    "lists": true,
    "tables": true,
    "codeBlocks": true,
    "meta": {
      "title": true,
      "description": true,
      "keywords": true
    }
  },
  "exclude": {
    "paths": [],
    "selectors": []
  },
  "safety": {
    "stripEmails": true,
    "stripPhoneNumbers": true,
    "stripForms": true,
    "stripScripts": true
  },
  "purpose": {
    "llmTraining": true,
    "ragIndexing": true,
    "chatGrounding": true
  }
}

Output Format

TXT (default)

---
PATH: /index.html
---
Page title
Section heading
Paragraph content here
[email removed]

JSON

{
  "documents": [
    {
      "path": "/index.html",
      "content": "..."
    }
  ]
}

Safety Rules

When enabled, the plugin removes:

  • Email addresses → [email removed]
  • Phone numbers → [phone removed]
  • <script>, <style>, <form> blocks
  • Inline JavaScript content

Already-encoded entities are preserved.


Exclusions

Path exclusions

"exclude": {
  "paths": ["/admin", "/api"]
}

Selector exclusions

"exclude": {
  "selectors": [".llm-ignore", "#internal"]
}

Determinism Guarantee

Given:

  • Same HTML output
  • Same config
  • Same plugin version

You will always get identical output.


Recommended Use Cases

  • RAG pipelines
  • Static knowledge bases
  • LLM prompt grounding
  • Offline semantic indexing
  • Compliance-safe extraction

License

MIT © Velohost