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

@enlistdev/sdk

v0.6.0

Published

Official TypeScript SDK for Enlist — waitlist infrastructure as an API.

Readme

@enlistdev/sdk

Typed SDK for Enlist — waitlist infrastructure.

Create waitlists, add signups, track delivery. Fully typed, idempotent requests, built-in error handling. Drop-in for the REST API.

npm install @enlistdev/sdk

Quickstart

import { Enlist } from '@enlistdev/sdk';

const enlist = new Enlist({ apiKey: process.env.ENLIST_API_KEY! });

const waitlist = await enlist.waitlists.create({ name: 'my-launch' });

const signup = await enlist.waitlists.addSignup(waitlist.id, {
  email: '[email protected]',
  utm_source: 'quest100k',
  // Someone else's code, if this person arrived via a share link.
  referral_code: 'k3f9x2mqbr',
  metadata: { name: 'Ada Lovelace', company: 'Acme', plan: 'pro' },
});

console.log(`You're #${signup.position} of ${signup.total}`);
console.log(`Share: https://yoursite.com/?ref=${signup.referral_code}`);

const stats = await enlist.waitlists.getStats(waitlist.id);

Your API key is a server-side secret. Call the SDK from a route handler or server action, never from browser code.

API

| Method | Returns | | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | | waitlists.create({ name }) | Waitlist | | waitlists.list() | Page<WaitlistWithCount> | | waitlists.get(id) | Waitlist | | waitlists.update(id, { name }) | Waitlist — renames; nothing else moves | | waitlists.delete(id) | void — deletes the waitlist AND all its signups | | waitlists.addSignup(id, { email, utm_source?, referrer?, referral_code?, metadata?, fields? }) | SignupResult{ id, position, total, referral_code } | | waitlists.listSignups(id, { limit?, offset? }) | Page<Signup> | | waitlists.exportSignups(id) | string — full CSV of all signups | | waitlists.removeSignup(id, signupId) | void | | waitlists.getSignupPosition(id, { email }) | SignupPosition{ id, email, position, total, created_at } | | waitlists.getStats(id, { from?, to? }) | WaitlistStats | | waitlists.fields.list(waitlistId) | Page<FieldDefinition> | | waitlists.fields.create(waitlistId, { key, label, type, required?, position? }) | FieldDefinition | | waitlists.fields.update(waitlistId, key, { label?, required?, position? }) | FieldDefinition | | waitlists.fields.delete(waitlistId, key) | void |

waitlists.delete(id) is permanent and takes every signup with it. Call waitlists.exportSignups(id) first if you want the addresses — nothing else does.

Every request and response shape is fully typed; import them from the package root (import type { Signup } from '@enlistdev/sdk').

Referrals

Every signup gets a referral_code — ten lowercase Crockford base32 characters, stable for life. Put it behind ?ref= and pass whatever comes back as referral_code on the next signup: the referrer's referral_count goes up, and the new Signup carries referred_by. An unknown, malformed, wrong-waitlist, or self-referral code is dropped silently rather than raised, so a broken share link never costs you a signup. Positions are never touched — what a referral earns is yours to define.

Errors

Non-2xx responses throw a EnlistError with status, a stable code, and retryAfter on rate limits.

import { EnlistError } from '@enlistdev/sdk';

try {
  await enlist.waitlists.addSignup(id, { email });
} catch (error) {
  if (error instanceof EnlistError && error.code === 'rate_limited') {
    // back off for error.retryAfter seconds
  }
}

Common codes: unauthorized, not_found, invalid_request, rate_limited, quota_exceeded (402 — upgrade required, do not retry).

Options

new Enlist({
  apiKey: '...',
  baseUrl: 'http://localhost:3000', // self-hosted or local dev
  timeoutMs: 15_000,
  fetch: myFetch, // injectable, for tests
});

Not using the SDK?

The API is plain REST. See the vanilla fetch() example in the API reference — no dependency required. The OpenAPI 3.1 spec describes every endpoint if you would rather generate a client.

Docs

MIT