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

@logeix/agent-files

v0.1.0

Published

Astro integration for LOGEIX client sites: markdown copies of every page, llms.txt, and IndexNow pings on deploy

Readme

@logeix/agent-files

Astro integration for LOGEIX client sites (Astro + Cloudflare Pages). After each build it writes:

  • A markdown copy of every indexable page next to it: /drain-cleaning/ → /drain-cleaning.md, the homepage → /index.md. Each starts with YAML frontmatter (title, description, canonical URL, blog dates) followed by the page's main content. Nav, forms, images, SVG, buttons and anything aria-hidden are dropped.
  • /llms.txt: the business details from the homepage JSON-LD (phone, email, address or base town, hours, areas served, founding year, Maps link, profiles), then every page grouped as Main pages, Services, Services by area and Blog, linking to the markdown copies.
  • <link rel="alternate" type="text/markdown"> in each page's <head>.
  • _headers rules: .md files get Content-Type: text/markdown; charset=utf-8 and X-Robots-Tag: noindex (so they never compete with the HTML in search), and llms.txt gets text/plain; charset=utf-8. Existing rules are kept.
  • /agent-files.json: a hash of each page's markdown, so the next build can tell which pages changed.
  • IndexNow (optional): /<key>.txt, plus a ping with the changed and removed URLs on production Cloudflare Pages builds. IndexNow feeds Bing (and through it ChatGPT search and Copilot), Yandex, Seznam and Naver. Google doesn't take part.

Every fact in these files comes from the built pages: the JSON-LD, meta tags and page text. Nothing is typed in twice.

Which pages count: the URLs in the sitemap (so the sitemap's own filter applies), minus pages with a noindex robots tag, pages whose canonical points elsewhere, 404/500, and anything in exclude. Without a sitemap, every indexable HTML page counts.

Install

npm install @logeix/agent-files
// astro.config.mjs
import sitemap from "@astrojs/sitemap";
import agentFiles from "@logeix/agent-files";

export default defineConfig({
  site: "https://www.example.com",
  integrations: [
    sitemap({ filter: (page) => !page.includes("/thank-you/") && !page.includes("/review/") }),
    // After sitemap(): it reads the sitemap the build just wrote.
    agentFiles({
      indexNow: { key: "<32 random hex characters>" },
    }),
  ],
});

Make a key with node -e "console.log(crypto.randomUUID().replaceAll('-', ''))". One key per site. It isn't secret: IndexNow checks it by fetching /<key>.txt from the site.

Options

| Option | Default | What it does | | --- | --- | --- | | content | ["main", "[role=main]", "body"] | CSS selectors tried in order for the page's main content. Set it when the layout has no <main>. | | remove | [] | Extra selectors to drop from the content, on top of the defaults. Any element with a data-agent-skip attribute is dropped too. | | exclude | [] | Path prefixes or RegExps to leave out. | | llms.title | business name from JSON-LD, else the homepage title | The # heading of llms.txt. | | llms.summary | homepage meta description | The > summary line. | | llms.notes | [] | Extra paragraphs after the business details. | | llms.sections | none | [{ title, match }] checked before the defaults. match is a path prefix or a RegExp, e.g. { title: "Towns we serve", match: /^\/plumber-in-/ }. | | llms | | false skips llms.txt. | | alternateLink | true | false leaves the HTML untouched. | | indexNow.key | none | Turns IndexNow on. 8 to 128 letters, digits or dashes. | | indexNow.branches | ["master", "main"] | Cloudflare Pages branches that count as production. |

Page grouping in llms.txt comes from the JSON-LD the structured-data template already writes: a Service node makes a service page, a Service with one areaServed place makes a service-by-area page, a BlogPosting makes a blog post.

IndexNow

The integration pings only on a production Cloudflare Pages build (CF_PAGES=1 and CF_PAGES_BRANCH in branches). Local and preview builds write the key file and send nothing.

On a production build it fetches the live /agent-files.json (the previous deploy), compares hashes, and sends the new, changed and removed URLs. A build where nothing changed sends nothing. Failures are logged and never fail the build.

The first deploy has no live page list yet, so it sends nothing. Once that deploy is live, submit every page once:

npx agent-files-indexnow https://www.example.com <key>

The ping goes out during the build, a minute or so before the deploy finishes. IndexNow engines fetch later than that in practice.

AGENT_FILES_INDEXNOW=off turns pinging off for a build, and AGENT_FILES_INDEXNOW=dry logs what a build would send.

Checking a site

npm run build
npx wrangler pages dev dist
curl -sI http://127.0.0.1:8788/drain-cleaning.md   # text/markdown, x-robots-tag: noindex
curl -s  http://127.0.0.1:8788/llms.txt

Outside this package

  • robots.txt: add a content signal under User-agent: *:

    User-agent: *
    Content-Signal: search=yes, ai-input=yes, ai-train=yes
    Allow: /
  • Cloudflare AI Crawl Control: on each zone, leave "Block AI bots" off and the managed robots.txt off. With them on, Cloudflare returns 403 to GPTBot, ClaudeBot and PerplexityBot and prepends its own robots.txt.

Develop

npm install
npm test
npm run typecheck
npm run build