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

@sdk-it/cli

v0.46.1

Published

Generate type-safe client SDKs from OpenAPI specifications.

Readme

@sdk-it/cli

Generate type-safe client SDKs from OpenAPI specifications.

Run the CLI

Use the latest CLI without installing it globally:

npx @sdk-it/cli@latest --help

To pin the CLI in a project:

npm install --save-dev @sdk-it/cli

Generate a TypeScript SDK

Inside an existing TypeScript project, install the generated client's runtime dependencies:

npm install zod fast-content-type-parse

Generate the client:

npx @sdk-it/cli@latest generate typescript \
  --spec ./openapi.json \
  --output ./src/generated/api \
  --name MyApi \
  --mode minimal

Use it:

import { MyApi } from './src/generated/api/index.ts';

const client = new MyApi({
  baseUrl: 'https://api.example.com',
});

const users = await client.request('GET /users', {});
console.log(users);

request returns the unwrapped response data. Invalid inputs and non-successful HTTP responses throw typed errors exported by the generated SDK.

TypeScript options

npx @sdk-it/cli@latest generate typescript [options]

| Option | Description | Default | | -------------------------- | ------------------------------------------------------------ | --------- | | --spec, -s | Local path or remote URL to an OpenAPI JSON or YAML document | Required | | --output, -o | Output directory | Required | | --name, -n | Generated client class name | Client | | --mode, -m | minimal source files or a full standalone project | minimal | | --useTsExtension [value] | Include .ts in generated imports | true | | --formatter <command> | Command used to format the generated source directory | | | --no-default-formatter | Skip the default Prettier formatter | | | --readme false | Skip the generated API README | | | --pagination <config> | Configure pagination, such as false or guess=false | true | | --no-install | Skip dependency installation in full mode | | | --verbose, -v | Show generator and installation output | false |

minimal mode writes client source files directly to --output. full mode writes source files under <output>/src, adds package.json and tsconfig.json, and installs its runtime dependencies unless --no-install is passed.

For a custom formatter, include the generated path explicitly:

npx @sdk-it/cli@latest generate typescript \
  --spec ./openapi.json \
  --output ./src/generated/api \
  --formatter "prettier ./src/generated/api --write"

Remote specification example

npx @sdk-it/cli@latest generate typescript \
  --spec https://raw.githubusercontent.com/MaximilianKoestler/hcloud-openapi/refs/heads/main/openapi/hcloud.json \
  --output ./src/generated/hetzner \
  --name Hetzner \
  --mode minimal
import { Hetzner } from './src/generated/hetzner/index.ts';

const hetzner = new Hetzner({
  token: process.env.HETZNER_API_TOKEN,
});

const result = await hetzner.request('GET /servers', {});
console.log(result.servers);

Other generators

The same generate command also exposes the Dart, Python, API reference, and README generators:

npx @sdk-it/cli@latest generate --help