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

@agenthoney/analytics

v0.15.0

Published

Analytics for the agentic web: see every AI agent reading your site, and serve them a clean markdown twin from the same middleware.

Readme

@agenthoney/analytics

Analytics for the agentic web — and the other half nobody ships: serving those agents a clean markdown twin from the same middleware.

One app.use. It observes every request at the server boundary, so it counts the clients that never run JavaScript, and it can serve a markdown representation of a page to anything that asks for one.

import { agenthoney } from "@agenthoney/analytics/express";

app.use(agenthoney());

Nothing loads in a visitor's browser. No client script, no cookies.

Installing with a coding agent

Point it at https://agenthoney.ai/install.md — the same guide this package serves from your own middleware. It is written for an agent rather than a person: imperative, naming the failure modes, and telling the agent to stop rather than guess at a credential.

The three properties worth knowing before you install

It never blocks and never fails your responses. record() is synchronous and returns void, every adapter entry point wears one safe() wrapper, and nothing awaits the network on the request path. The serve path fails open to content: any throw, timeout or manifest miss falls through to your own handler with the response unchanged. Each adapter has a test asserting byte-identical output with and without the middleware — including with a collector injected to throw on every call.

The response is inspected, never consumed. res is a single-read stream, and monkey-patching write/end to observe a body adds latency, adds memory, and can corrupt what you send. This reads what is already in the headers.

⚠️ The markdown twin is gated on Accept, never on identity. A crawler sending Accept: */* receives exactly what a browser receives. Serving different content by User-Agent is cloaking, it forces Vary: User-Agent (which disables shared caching), and a User-Agent is a claim rather than proof.

⚠️ Look at your routes before you go live

The path is sent as it arrives. The query string is dropped before anything parses it and the Referer is reduced to an origin — but plenty of sites put secrets in the path: /reveal/<token>, /join/<code>, /confirm/<ticket>.

app.use(agenthoney({
  routeTemplate: (path) => path
    .replace(/\/\d+(?=\/|$)/g, "/:id")
    .replace(/^\/(reveal|join|confirm)\/[^/]+/, "/$1/:token"),
  redactPatterns: [/^tok_[A-Za-z0-9]{16,}$/],
  isInternal: (req) => req.path.startsWith("/_health"),
}));

A default backstop redacts segments that look like credentials, and records that it did. It cannot catch a short token and it does not know which of your ids are sensitive. Only your routes do. redactHighEntropyPaths: false turns the backstop off; your own redactPatterns always apply. Never redact by length alone: /^[A-Za-z0-9_-]{20,}$/ matches every readable slug, and those are the pages agents read.

⚠️ The key is a server credential

AGENTHONEY_SERVER_KEY writes events for one site — the site it was minted for, which the server resolves from the credential itself. It must never reach a browser. Every export declares "browser": null, and the package refuses to start if it finds the key under NEXT_PUBLIC_, VITE_, PUBLIC_ or REACT_APP_ — those prefixes inline a value into client JavaScript, which publishes the key to everyone who loads the page.

Zero runtime dependencies

Deliberately, and enforced: a build gate fails if dependencies is non-empty or a bare import survives into dist/. It holds a credential and runs inside other people's request paths; its supply chain is its own.

Documentation

Licence

MIT. See LICENSE.