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

@licensekit/sdk

v1.0.0

Published

TypeScript SDK for the LicenseKit licensing API

Readme

@licensekit/sdk

First-party TypeScript SDK for licensekit.dev.

It ships typed Management, Runtime, and System clients for the LicenseKit licensing API, including reporting and frozen export operations, plus scope metadata and Ed25519 runtime-signature verification helpers for activation, validation, metering, and offline-aware license flows.

Links:

  • npm package: https://www.npmjs.com/package/@licensekit/sdk
  • agent quickstart: https://licensekit.dev/docs/agent-quickstart
  • API contract notes: https://licensekit.dev/docs/api-contract
  • OpenAPI spec: https://licensekit.dev/openapi.yaml
  • LLM reference: https://licensekit.dev/llms.txt

Primary hosted base URL used in examples:

  • https://api.licensekit.dev

Local and self-hosted deployments remain first-class. Override baseUrl with your own origin, for example http://localhost:8080.

Install

npm install @licensekit/sdk

Quick Start

import {
  ManagementClient,
  PublicKeyStore,
  RuntimeClient,
  SystemClient,
  verifyRuntimeResult
} from "@licensekit/sdk";

const baseUrl = "https://api.licensekit.dev";

const system = new SystemClient({ baseUrl });
const health = await system.health();
console.log(health.data.status);

const management = new ManagementClient({
  baseUrl,
  token: process.env.LICENSEKIT_MANAGEMENT_TOKEN!
});

const product = await management.createProduct({
  body: {
    name: "Example App",
    code: "example-app"
  }
});

const runtime = new RuntimeClient({
  baseUrl,
  licenseKey: process.env.LICENSEKIT_LICENSE_KEY!
});

const result = await runtime.validateLicense({
  body: {
    fingerprint: "host-123"
  }
});

const publicKeys = await system.listPublicKeys();
const keyStore = new PublicKeyStore(publicKeys.data);
const verification = await verifyRuntimeResult(result, keyStore);

console.log(product.data.id, verification.ok);

Client Surfaces

  • ManagementClient Uses Authorization: Bearer <token> for /api/v1/... management operations, including /api/v1/activities and /api/v1/reports/....
  • RuntimeClient Uses Authorization: License <license-key> for /api/v1/license/... runtime operations.
  • SystemClient Unauthenticated access to /health, /healthz, /readyz, /metrics, and /api/v1/system/public-keys.

Hosted docs and probes should prefer system.health() because GET /health is the Cloud Run-safe liveness path behind api.licensekit.dev. system.healthz() remains available for local and self-hosted compatibility.

Scope Metadata

Management least-privilege scopes are exported from the package and derived directly from the OpenAPI x-required-scopes metadata.

import { getRequiredScopes, hasRequiredScopes } from "@licensekit/sdk";

const scopes = getRequiredScopes("createProduct");
const allowed = hasRequiredScopes("createProduct", ["product:write"]);

Raw Response Access

Every client exposes a raw companion for callers that need HTTP status or headers.

import { SystemClient } from "@licensekit/sdk";

const system = new SystemClient({ baseUrl: "https://api.licensekit.dev" });
const ready = await system.raw.readyz();

console.log(ready.status, ready.data.data.status);

This is particularly useful for readiness checks, because GET /readyz may legitimately return 503 with a structured JSON body instead of an error envelope.

management.downloadReportExport() returns a Uint8Array so JSON, CSV, and PDF exports can all be handled without guessing the response shape up front. Inspect the Content-Type header from management.raw.downloadReportExport() when you need to branch on format.

Examples

Task-oriented examples live in examples/:

  • 01-create-scoped-api-key.ts
  • 02-create-product-and-policy.ts
  • 03-create-customer-and-license.ts
  • 04-runtime-validate-and-verify.ts
  • 05-renew-license.ts
  • 06-reset-device.ts

All examples default to https://api.licensekit.dev and can be redirected with LICENSEKIT_BASE_URL.

Development

Install dependencies:

npm install

Regenerate the SDK from the current OpenAPI:

npm run generate

Typecheck, test, and build:

npm run typecheck
npm test
npm run build

The generated transport and method wrappers are recreated from ../../api/openapi.yaml.