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

@runlight/sdk

v0.6.2

Published

Privacy friendly web analytics that lives inside your app. Mount a route, add a script tag, read your stats at /runlight.

Readme

@runlight/sdk

Runlight is privacy friendly web analytics that runs inside your own app. It counts visitors without cookies and without storing anyone’s IP address. The numbers stay in your database, and the dashboard is served from your domain at /runlight.

It works with Next.js, Nuxt, SvelteKit, Astro, Remix, Express, NestJS, Fastify, Koa, Hono, and anything else that handles a web Request, on Node 22 or later, Bun, Deno, or Cloudflare Workers.

Get started

Install the library with a database driver. This one uses SQLite.

npm install @runlight/sdk better-sqlite3

Create one instance for your app, here in lib/runlight.ts.

import { runlight } from "@runlight/sdk";
import { sqlite } from "@runlight/sdk/sqlite";

export const rl = runlight({
  store: sqlite({ path: "./data/runlight.db" }),
  site: { name: "example.com", hostnames: ["example.com"], timezone: "Europe/London" },
});

Mount its routes. In the Next.js App Router that is one catch-all route at app/runlight/[[...path]]/route.ts.

import { rl } from "@/lib/runlight";

export const { GET, POST, PUT, PATCH, DELETE, OPTIONS } = rl.routes();

Add the script to every page, just before </head>.

<script defer src="/runlight/s.js"></script>

Set RUNLIGHT_TOKEN to a long random string and open /runlight/?token= followed by that string once to sign in.

The documentation covers every framework and every database, Postgres, MySQL, Turso, and Cloudflare D1 among them. It also covers goals, short links, email reports, and the API.

License

Runlight is MIT licensed.

Create things with the dashboard assistant

Ask the assistant to create a goal, a funnel, an email report, or a share link in natural language. Standalone installations with accounts also support member invitations. The assistant asks for missing details and prepares one draft at a time for the site on screen. Review the exact fields in the chat and click its creation button to save. A text reply such as "yes" does not execute an action. Sending another message cancels the previous pending draft so you can revise it.

The model only prepares drafts. An invitation or an email report is drafted only to an email address you typed in the chat: page titles, referrers, and event properties are written by your visitors and reach the model as data, so an address that came from them is never used. Confirmation calls the existing authenticated APIs, with the same permissions and validation as the settings forms. Viewers cannot create things, and only owners and admins can invite people. Invitations made this way are for the site on screen only, as a member or a viewer, and anyone holding a share link can read its site's shared dashboard.

Email reports use the existing weekly or monthly schedule and require a working mail service and scheduler. The assistant cannot install event tracking code, choose a custom delivery time, edit existing objects, or delete them. If a creation request fails after it was sent, check Settings before trying again to avoid duplicates. The MCP tools remain read-only.