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

@armature-tech/ai-traffic

v0.1.1

Published

Server and edge request analytics for AI crawler traffic.

Readme

@armature-tech/ai-traffic

This package records AI crawler requests on your server or edge. Browser analytics cannot do this because many crawlers do not run page JavaScript.

Install with an AI agent

Copy this prompt into your coding agent:

Install Armature AI Traffic in this project. Use @armature-tech/ai-traffic and follow https://docs.armature.tech/ai-traffic/agent-install. Complete the code, secret, DNS, deployment, and production test. Ask me only for values or access that you cannot get. Do not expose the write key or add client-side tracking.

Next.js 16 quickstart

Install the package:

npm install @armature-tech/ai-traffic

Save the key that Armature generated:

ARMATURE_AI_TRAFFIC_API_KEY=ait_us_...

Add proxy.ts beside your app or pages directory:

import { createVercelAiTraffic, trackVercelRequest } from "@armature-tech/ai-traffic/vercel";
import { NextResponse, type NextFetchEvent, type NextRequest } from "next/server";

const traffic = createVercelAiTraffic();

export function proxy(request: NextRequest, event: NextFetchEvent) {
  void trackVercelRequest(traffic, request, event);
  return NextResponse.next();
}

export const config = {
  matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
};

The matcher keeps robots.txt, llms.txt, Markdown, and sitemaps visible to the adapter.

The tracking call does not change the page response. event.waitUntil() keeps delivery alive after the response.

Before you deploy

AI Traffic is in private beta. Ask Armature to create the site and write key. Add the DNS TXT record that Armature gives you. Then tell Armature to verify the host. example.com and docs.example.com are separate hosts. Wildcards are not supported.

Keep the TXT record. The check job runs each hour. A host becomes due 24 hours after its last check. One missing answer does not stop ingestion. Armature needs at least three negative checks and 48 hours before it returns the host to pending. A DNS timeout does not change the host state.

A new owner can verify the same host when DNS has the new proof. The valid proof transfers the host at once.

Use a US key with app.armature.tech. Use an EU key with eu.armature.tech. The package selects the correct endpoint from the key.

Hosted sites such as Mintlify, GitBook, and ReadMe cannot install this package. You need a programmable proxy in front of that site. See hosted sites.

More guides

Public API

createAiTraffic(config) returns track(), flush(), and pending().

track() does not throw synchronously. Delivery errors do not reject the customer request. Use onError to send SDK errors to your logs.

The queue holds at most 1,000 events. A short window combines concurrent requests into batches of up to 20. It drops the oldest event on overflow.

Use waitUntil or schedule when the runtime has a background lifecycle. Use delivery: "await" or call flush() before a serverless Node function ends. Without a scheduler, the package reports one warning and uses a best-effort timer for long-running Node servers.

The package retries network and server failures. It does not retry 429. Use onError to read the server code and retry delay.

Use captureOtherBots: true to send every generic bot candidate. The default samples generic bot candidates at 1%. Known AI crawlers are always sent.

This package has no runtime dependencies. It supports Node.js 20 or later, Vercel edge runtimes, and Cloudflare Workers.