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

@hey-api/openapi-ts

v0.94.5

Published

🌀 OpenAPI to TypeScript codegen. Production-ready SDKs, Zod schemas, TanStack Query hooks, and 20+ plugins. Used by Vercel, OpenCode, and PayPal.

Readme

About

The OpenAPI to TypeScript code generator used by Vercel, OpenCode, and PayPal.

Generate production-ready SDKs, Zod schemas, TanStack Query hooks, or choose from 20+ other plugins.

Part of the Hey API ecosystem.

Features

  • production-ready code that compiles
  • runs in any Node.js 20+ environment
  • accepts any OpenAPI specification
  • core plugins for SDKs, types, and schemas
  • HTTP clients for Fetch API, Angular, Axios, Next.js, Nuxt, and more
  • 20+ plugins to reduce third-party boilerplate
  • highly customizable via plugins
  • sync with Hey API Registry for spec management

Contributing

Want to see your code in products used by millions?

Start with our Contributing guide and release your first feature.

Sponsors

Hey API is sponsor-funded. If you rely on Hey API in production, consider becoming a sponsor to accelerate the roadmap.

Quick Start

The fastest way to use @hey-api/openapi-ts is via npx

npx @hey-api/openapi-ts -i hey-api/backend -o src/client

Congratulations on creating your first client! 🎉 You can learn more about the generated files on the Output page.

Installation

You can download @hey-api/openapi-ts from npm using your favorite package manager.

npm

npm install @hey-api/openapi-ts -D -E

pnpm

pnpm add @hey-api/openapi-ts -D -E

yarn

yarn add @hey-api/openapi-ts -D -E

bun

bun add @hey-api/openapi-ts -D -E

Versioning

This package is in initial development. Please pin an exact version so you can safely upgrade when you're ready.

We publish migration notes for every breaking release. You might not be impacted by a breaking change if you don't use the affected features.

Usage

CLI

Most people run @hey-api/openapi-ts via CLI. To do that, add a script to your package.json file which will make openapi-ts executable through script.

"scripts": {
  "openapi-ts": "openapi-ts"
}

The above script can be executed by running npm run openapi-ts or equivalent command in other package managers. Next, we will create a configuration file and move our options from Quick Start to it.

Node.js

You can also generate output programmatically by calling createClient() in a JavaScript/TypeScript file.

script.ts

import { createClient } from '@hey-api/openapi-ts';

createClient({
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: 'src/client',
});

Configuration

@hey-api/openapi-ts supports loading configuration from any file inside your project root folder supported by jiti loader. Below are the most common file formats.

openapi-ts.config.ts

import { defineConfig } from '@hey-api/openapi-ts';

export default defineConfig({
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: 'src/client',
});

openapi-ts.config.cjs

/** @type {import('@hey-api/openapi-ts').UserConfig} */
module.exports = {
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: 'src/client',
};

openapi-ts.config.mjs

/** @type {import('@hey-api/openapi-ts').UserConfig} */
export default {
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: 'src/client',
};

Alternatively, you can use openapi-ts.config.js and configure the export statement depending on your project setup.

Input

You must set the input so we can load your OpenAPI specification. It can be a path or URL, object containing a path or URL, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.

If you use an HTTPS URL with a self-signed certificate in development, you will need to set NODE_TLS_REJECT_UNAUTHORIZED=0 in your environment.

Output

You must set the output so we know where to generate your files. It can be a path to the destination folder or an object containing the destination folder path and optional settings.

You should treat the output folder as a dependency. Do not directly modify its contents as your changes might be erased when you run @hey-api/openapi-ts again.

Parser

We parse your input before making it available to plugins. While configuring the parser is optional, it's the perfect place to modify or validate your input if needed.

Plugins

Plugins are responsible for generating artifacts from your input. By default, Hey API will generate TypeScript interfaces and SDK from your OpenAPI specification. You can add, remove, or customize any of the plugins. In fact, we highly encourage you to do so!

Client

Clients are responsible for sending the actual HTTP requests. We default to Fetch client if you're generating SDKs, but you can choose a different option from the available clients.

Available Clients

Proposed Clients (Vote to Prioritize)

The following clients are roadmap proposals and are not started yet. You can help us prioritize them by voting on GitHub.

Don't see your client? Build your own or let us know your interest by opening an issue.

Available Plugins

These plugins help reduce boilerplate associated with third-party dependencies. Hey API natively supports the most popular packages. Please open an issue on GitHub if you'd like us to support your favorite package.

Proposed Plugins (Vote to Prioritize)

The following plugins are roadmap proposals and are not started yet. You can help us prioritize them by voting on GitHub.

Don't see your plugin? Build your own or let us know your interest by opening an issue.

Migrating

You can learn more on the Migrating page.

License

Released under the MIT License.