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

@imagineers-cards/sdk

v0.1.1

Published

TypeScript SDK for Cards — create and manage projects, chain cards, and work items with a cards_pat token

Readme

@imagineers-cards/sdk

The TypeScript SDK for Cards. Create and manage projects, chain cards, and work items from any product — Cards becomes a database you write to with a single API key.

Install

npm install @imagineers-cards/sdk

Authenticate

The SDK uses the same token the cards CLI stores at login. Mint one at imagineers.cards/cli-token — it starts with cards_pat_. Keep it secret; it grants full read/write to your account.

import { CardsClient } from '@imagineers-cards/sdk';

const cards = new CardsClient({ apiKey: process.env.CARDS_API_KEY! });

Projects

await cards.projects.create({ slug: 'my-app', name: 'My App' });
await cards.projects.list();
await cards.projects.get('my-app');
await cards.projects.update('my-app', { name: 'Renamed' });
await cards.projects.delete('my-app');

A project with subprojects cannot be deleted until its children are removed or reparented — the API returns a 409 and the SDK throws a CardsApiError.

Chain cards

The chain is the project's append-only log of decisions, observations, invariants, questions, and artifacts.

const card = await cards.chain.create('my-app', {
  title: 'We chose Postgres over SQLite for the write throughput',
  kind: 'decision',
  body: 'Alternatives considered…',
});

await cards.chain.list('my-app', { kind: 'decision', limit: 20 });
await cards.chain.get('my-app', card.slug);
await cards.chain.update('my-app', card.slug, { status: 'published' });
await cards.chain.delete('my-app', card.slug);

Work items

Work items are the ephemeral do-and-toss layer parallel to the chain.

const item = await cards.work.create('my-app', {
  title: 'Ship the import flow',
  labels: ['feature'],
});

await cards.work.list('my-app', { status: 'todo' });
await cards.work.update('my-app', item.id, { status: 'done' });
await cards.work.delete('my-app', item.id);

Errors

Every non-2xx response throws a CardsApiError carrying the HTTP status and the request that failed.

import { CardsApiError } from '@imagineers-cards/sdk';

try {
  await cards.projects.create({ slug: 'taken' });
} catch (error) {
  if (error instanceof CardsApiError && error.status === 409) {
    // slug already exists
  }
}

Configuration

| Option | Default | Notes | | --------- | --------------------------------------------- | -------------------------------------- | | apiKey | (required) | A cards_pat_ token. | | baseUrl | https://cards-api.krishnanandb.workers.dev | Point at a local or staging Worker. | | fetch | globalThis.fetch | Inject a custom fetch for old runtimes.|

Runtime support

Dependency-free and runtime-agnostic. Runs on Node 18+, the browser, and Cloudflare Workers — anywhere the global fetch exists.

Publishing

One-time: copy .env.example to .env and paste your npm token (NPM_TOKEN=npm_…). .env is gitignored — the token never gets committed.

./publish.sh            # build and publish the current version to npm
./publish.sh --dry-run  # build and preview the tarball; upload nothing

npm rejects re-publishing an existing version — bump version in package.json first. To release both SDKs together, use the repo-root ./publish.sh.