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

@ai-foundry/openapi-tools

v0.1.3

Published

A CLI tool to work with OpenAPI specifications, including generation, validation, and more.

Readme

openapi-tools

openapi-tools is a small toolbox for slicing, validating and generating code from OpenAPI specifications. It ships as a command line utility so you can keep your API definitions tidy and reusable.

Features

  • Filter paths – create a minimal spec containing only the operations you care about.
  • Generate Zod schemas – produce TypeScript models ready for runtime validation.
  • Generate Python TypedDicts – build strongly typed models for Python projects.

Installation

Use npx for one-off runs or install globally:

npm install -g @ai-foundry/openapi-tools

The examples below use the OpenAPI Pet Store specification. More scenarios are available in the examples directory.

Quick Start

npx @ai-foundry/openapi-tools filter --input openapi.yaml --output filtered.yaml --select-paths "/pet/{petId}"

Using Docker

docker run --rm -v $(pwd)/local-schemas:/app/schemas adrianhdezm/openapi-tools filter --input ./schemas/openapi.yaml --output ./schemas/filtered.yaml --select-paths "/pet/{petId}"

Command Reference

Usage: openapi-tools [options] [command]

OpenAPI Tools CLI

Options:
  -V, --version                   output the version number
  -h, --help                      display help for command

Commands:
  filter [options]                Filter OpenAPI spec by comma-separated list of path names
  generate-zod [options]          Generate Zod schemas from an OpenAPI spec
  generate-python-dict [options]  Generate Python TypedDicts from an OpenAPI spec
  help [command]                  display help for command

Filter Command

Usage: openapi-tools filter [options]

Filter OpenAPI spec by comma-separated list of path names

Options:
  --input <input>         Input OpenAPI (YAML or JSON) file or URL
  --output <output>       Output filtered YAML file
  --select-paths <paths>  Comma-separated list of path names, e.g.,
                          "/v1/chat/completions,/v1/models"
  -h, --help              display help for command

Generate Zod Command

Usage: openapi-tools generate-zod [options]

Generate Zod schemas from an OpenAPI spec

The output will be a single TypeScript file with all schemas.

Options:
  --input <input>             Input OpenAPI file (YAML or JSON) or URL
  --output <output>           Output file for schemas
  -p, --select-paths <paths>  Comma-separated list of path prefixes
  -h, --help                  display help for command

Generate Python TypedDict Command

Usage: openapi-tools generate-python-dict [options]

Generate Python TypedDicts from an OpenAPI spec

Options:
  --input <input>             Input OpenAPI file (YAML or JSON) or URL
  --output <output>           Output file for schemas
  -p, --select-paths <paths>  Comma-separated list of path prefixes
  -h, --help                  display help for command

Contributing

  1. Clone this repository and run npm install.
  2. Make your changes and add tests if applicable.
  3. Open a pull request – we welcome improvements and new features!

License

This project is licensed under the MIT License. See the LICENSE file for details.