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

@pc-core/sdk

v0.1.8

Published

Typed TypeScript client for the ProductClient API — ship releases, roll back, triage feedback, open incidents, and run the conversion and ranking commands from code.

Readme

@pc-core/sdk

Typed TypeScript client for the ProductClient API. Ship releases, roll back, triage feedback, open incidents, and run the conversion and ranking commands from code — the same calls the pc CLI and the MCP server make.

The API is the contract. The SDK, the CLI, and MCP are three doors into it, so nothing here does work the API cannot do.

Install

npm install @pc-core/sdk

Works on Node 18+ and Bun. Zero dependencies.

Usage

import { createPcClient } from '@pc-core/sdk';

const pc = createPcClient({ token: process.env.PC_TOKEN! });

// Ship a release to the public page.
await pc.ship({
  slug: 'acme',
  title: 'Faster sync',
  version: '1.4.0',
  body: 'Sync is now 3× faster on large workspaces.',
  commit_sha: process.env.GITHUB_SHA,
  repo: 'acme/acme'
});

// See what is live and what is waiting.
const { latest_published, drafts } = await pc.diff('acme');

pc({ token }) is shorthand for createPcClient({ token }).

Getting a token

Run the device flow and keep the token in CI:

const token = await pc.login({
  onCode: ({ userCode, verificationUrl }) => {
    console.log(`Approve ${userCode} at ${verificationUrl}`);
  }
});

Or grab one once from the CLI (pc login) and store it as PC_TOKEN.

Commands

Auth and workspace — whoami, products, deviceStart, devicePoll, login, tokens, logout

The page — ship, diff, releases, rollback, inspect, snippet, cta

Feedback — feedback, inbox, reply, triage

Incidents — status, incidentOpen, incidentUpdate, incidentClose

Product agent — agentContext, setOffer, leads

Conversion and ranking — waitlist, funnel, widget, badge, llms, validateSchema, og, alt, cite, index, directories, announce

Escape hatch — rpc(fn, args) calls any allowlisted pc_api_* function directly, using the same names the CLI passes.

Launch and distribution — launch, coming, roadmap

The page test — ab

The agent's questions and drafts — agentTest, agentDraft

Directories, illustration and checkout — directory, illustrate, checkout, featured

Not built yet — cite and index return { configured: false, requires } rather than pretending to work: both need Search Console OAuth for the workspace, which nothing has connected yet.

What these report honestly

A few of these commands are worth reading the return value of rather than ignoring, because the field that matters is the one that says what did not happen:

  • ab records no traffic itself — the product page does that. A leader comes back only once both variants have 30 views and the gap clears 2 points; otherwise can_decide is false and reason is 'COLLECTING'.
  • agentDraft returns sent: 0. There is no send path and no flag that reaches one.
  • directory returns prepared (ledger rows written) and delivered: 0. These directories have no anonymous submission API.
  • illustrate returns renderer: 'svg' and model: null. It renders a real SVG from the release's own fields; no model was involved.
  • featured returns paid: false. It creates the checkout; only the verified Whop webhook marks the rail live.

Errors

Every failure throws a PcError with the HTTP status and the API's stable code:

import { PcError } from '@pc-core/sdk';

try {
  await pc.ship({ slug, title });
} catch (error) {
  if (error instanceof PcError && error.status === 401) {
    // token expired or revoked
  }
}

License

MIT