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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@createiq/swagger-ts

v1.1.1

Published

Create a client library from Swagger/OpenAPI definitions

Downloads

82

Readme

@createiq/swagger-ts

Pipeline Status Test Coverage npm


Take a swagger.yml file and generate a TypeScript client library using @hey-api/openapi-ts, so that types can be distributed automatically.

Usage

Example:

npx @createiq/swagger-ts \
    --generate-npm-library @createiq/client \
    swagger.json

All options:

   ____                      _       _          __                                            _
  / __ \  ___ _ __ ___  __ _| |_ ___(_) __ _   / /____      ____ _  __ _  __ _  ___ _ __     | |_ ___
 / / _` |/ __| '__/ _ \/ _` | __/ _ \ |/ _` | / / __\ \ /\ / / _` |/ _` |/ _` |/ _ \ '__|____| __/ __|
| | (_| | (__| | |  __/ (_| | ||  __/ | (_| |/ /\__ \\ V  V / (_| | (_| | (_| |  __/ | |_____| |_\__ \
 \ \__,_|\___|_|  \___|\__,_|\__\___|_|\__, /_/ |___/ \_/\_/ \__,_|\__, |\__, |\___|_|        \__|___/
  \____/                                  |_|                      |___/ |___/
Version: 1.0.0
Usage: swagger-ts [options] <input>

Create a client library from Swagger/OpenAPI definitions

Arguments:
  input                             OpenAPI/Swagger specification file

Options:
  -V, --version                     output the version number
  --output-basedir <directory>      output base directory (default: current working directory)
  --hash                            generate a hash of the output (useful for inclusion in npm library to check whether it needs to be updated)
  --generate-npm-library <package>  generate an npm library with the license information
  --publish-npm-library             publish the generated npm library
  --publish-npm-library-dry-run     publish the generated npm library (dry run) (env: PUBLISH_NPM_LIBRARY_DRY_RUN)
  -h, --help                        display help for command

Using a configuration file

You can also specify options using a swagger-ts.config.(js|cjs|mjs|ts} file, which should have a single default object export. If you're using a ts file, you can use the SwaggerTsConfig type to verify your config matches the type.

Configuration keys:

  • file: (type: string) a reference to the OpenAPI specification file
  • outputBasedir: (type: string, default current working directory) the directory to output files in
  • hash: (type: boolean) whether to generate a sha256 hash of the input
  • npmLibrary.name: (type: string) the package name of the npm library to output if this is set
  • npmLibrary.publish: (type: boolean or 'dry-run') whether to publish the npm library

Contributing

The library uses Biome for linting and formatting, and Vitest for unit tests and benchmarking. It's worth ensuring that you have appropriate plugins for your development environment, particularly for Biome to avoid having to fix formatting issues late.

Releasing

Merge requests to the main branch should be reviewed by the team as normal but will not release a new version of the library to npm. This happens when merge requests are made to the prod branch, this should be an MR directly from main to prod and MUST include a bump to the version in package.json satisfying semver.