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

sdkmaker

v0.3.5

Published

Generate TypeScript SDK from Swagger JSON

Readme

SDKMaker

sdkmaker is a command-line tool for generating TypeScript SDKs from Swagger (OpenAPI) JSON definitions. It simplifies the process of creating client-side APIs, making it easier to integrate with backend services.

Features

  • Generate a TypeScript SDK from a Swagger JSON file or URL.
  • Specify the package name for the generated SDK.
  • Supports configuration through a sdk.json file.
  • Flexible CLI for seamless integration into deployment pipelines.

Installation

Install globally via npm:

npm install -g sdkmaker

Usage

CLI Command

Generate SDK

Use the generate command to create an SDK:

sdkmaker generate -s <path_to_swagger_json> -o <output_directory>

Options

  • -s, --swagger: Path to the Swagger JSON file or URL (Required if not in config).
  • -o, --output: Directory where the SDK files will be generated (Required if not in config).
  • -p, --package-name: Name of the generated SDK package (Optional).
  • -c, --config: Path to a configuration file (default: ./sdk.json) (Optional).

Examples

1. Generate an SDK with CLI options

sdkmaker generate -s https://api.handycrew.net/docs-json - o /Users/chatis/projects/sdkmaker/sdk-maker-test/__sdk_ouitput -p @handy-crew-sdk/ts
  • Swagger JSON: ./swagger.json
  • Output Directory: ./sdk-output
  • Package Name: my-sdk

2. Use a configuration file

Create a sdk.json in the working directory:

{
  "swaggerPathOrContent": "./swagger.json",
  "outputDir": "./sdk-output",
  "packageName": "my-sdk-package"
}

Run the CLI:

sdkmaker generate

3. Override configuration with CLI options

sdkmaker generate -s ./new-swagger.json -o ./new-sdk-output

Configuration File

The sdk.json file can be used to specify default options. The CLI will automatically look for this file in the current directory unless overridden by the -c option.

Example sdk.json

{
  "swaggerPathOrContent": "./swagger.json",
  "outputDir": "./sdk-output",
  "packageName": "my-sdk-package"
}

Integration in Deployment Pipelines

You can integrate sdkmaker into your deployment scripts to automatically generate SDKs post-deployment.

Example with PM2:

Add the following to your ecosystem.config.js:

{"post-deploy": "sdkmaker generate -s ./swagger.json -o ./sdk-output"}

Troubleshooting

Common Issues

  1. Swagger JSON Not Found:

    • Ensure the file path or URL provided in -s is correct.
    • If using a configuration file, verify the swaggerPathOrContent field is accurate.
  2. Output Directory Not Specified:

    • Use the -o option or define outputDir in the configuration file.
  3. Configuration File Errors:

    • Ensure sdk.json is valid JSON and includes swaggerPathOrContent and outputDir.

License

This project is licensed under the MIT License.


Contribution

Contributions are welcome! If you find a bug or have a feature request, feel free to create an issue or submit a pull request.


Start generating your TypeScript SDKs with ease using sdkmaker! 🎉