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

@hpprouter/sdk

v0.1.0

Published

TypeScript client SDK for HPP Router

Readme

@hpprouter/sdk

TypeScript client SDK for the HPP Router consumer API.

Installation

npm install @hpprouter/sdk
yarn add @hpprouter/sdk
pnpm add @hpprouter/sdk

Usage

import { HppRouter } from '@hpprouter/sdk';

const client = new HppRouter({
  apiKey: process.env.HPPROUTER_API_KEY!,
  baseURL: 'https://your-gateway.example.com'
});

const completion = await client.chat.send({
  model: 'hpprouter/auto',
  messages: [{ role: 'user', content: 'Hello!' }]
});

console.log(completion.data.choices);
console.log(completion.meta.resolvedModel);

Models

const models = await client.models.list();
console.log(models.data.data);

Usage and quota

const usage = await client.usage.get();
const quota = await client.quota.check();

console.log(usage.data.remaining);
console.log(quota.data.has_quota);

Image generation

const image = await client.images.generate({
  model: 'gpt-image-1',
  prompt: 'A serene mountain landscape at sunset',
  size: '1024x1024',
  quality: 'auto'
});

console.log(image.data.data);

Streaming

const { stream, meta } = await client.chat.stream({
  model: 'openai/gpt-5',
  messages: [{ role: 'user', content: 'Stream a short answer.' }]
});

for await (const event of stream) {
  console.log(event);
}

console.log(meta.resolvedModel);

Maintainer release commands

Run these commands from the repository root.

Build the SDK and generate OpenAPI-derived TypeScript types:

npm run build:sdk

Run the SDK unit tests:

npm run test:sdk

Preview the npm package contents without creating a tarball:

npm run pack:sdk:dry

Create the local npm tarball, for example hpprouter-sdk-0.1.0.tgz:

npm run pack:sdk

Publish the package to the public npm registry under the hpprouter organization:

npm run publish:sdk

Before publishing, make sure you are logged in to npm with an account that has publish access to the hpprouter organization:

npm login

Use npm run pack:sdk:dry before every publish to verify that only dist, README.md, and package.json are included in the package.