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

openax-cli

v1.0.8

Published

A powerful OpenAPI 3.x specification filtering tool

Readme

OpenAx 🚀

npm version CI MIT License Release

A powerful command-line tool for filtering OpenAPI 3.x specifications. Extract specific paths, operations, and tags from large API specs while automatically resolving and including only the referenced components.

✨ Features

  • 🔍 Smart Filtering: Filter by paths, HTTP operations, and tags
  • 🧩 Dependency Resolution: Automatically includes referenced components
  • 📁 Multiple Sources: Load from files, URLs, or raw data
  • Validation: Built-in OpenAPI 3.x validation
  • 🛠️ CLI & Library: Use as a command-line tool or Go library
  • 📤 Multiple Formats: Output to JSON or YAML
  • 🚀 High Performance: Efficient filtering with proper reference resolution

🚀 Quick Start

Installation

# Install globally via npm
npm install -g openax-cli

# Or use directly with npx (no installation required)
npx openax-cli --help

Alternative Installation

  • Binary downloads: GitHub Releases
  • For Go developers: go install github.com/imtanmoy/openax@latest

CLI Usage

# Validate an OpenAPI spec
openax --validate-only -i api.yaml

# Filter by tags
openax -i api.yaml --tags "users,orders" --format json

# Filter by operations and paths
openax -i api.yaml --operations "get,post" --paths "/api/v1"

# Save filtered result
openax -i api.yaml --tags "public" -o public-api.yaml

Examples

# Validate an OpenAPI spec
openax --validate-only -i api.yaml

# Filter by tags and save as JSON
openax -i api.yaml --tags "users,orders" --format json -o filtered.json

# Filter by operations and paths
openax -i api.yaml --operations "get,post" --paths "/api/v1" 

# Filter public APIs only
openax -i api.yaml --tags "public" -o public-api.yaml

# Use with remote URLs
openax -i https://api.example.com/openapi.yaml --tags "v1"

📖 Documentation

CLI Reference

openax [options]

Flags:
  -i, --input string         Input OpenAPI spec file or URL (required)
  -o, --output string        Output file (stdout if not specified)
  -f, --format string        Output format: json or yaml (default: yaml)
  -p, --paths strings        Filter by paths (e.g., /users, /orders)
      --operations strings   Filter by operations (e.g., get, post, put, delete)
  -t, --tags strings         Filter by tags
      --validate-only        Only validate the spec without filtering
  -h, --help                 Show help
  -v, --version             Show version

🎯 Common Use Cases

  • API Documentation: Create focused docs from large specifications
  • Client Generation: Generate clients for specific service areas
  • Testing: Create minimal specs for testing specific functionality
  • Micro-services: Extract service-specific APIs from monolithic specs
  • Public APIs: Filter internal specs to expose only public endpoints
  • Versioning: Create version-specific API specifications

🔧 Advanced Usage

Working with Large APIs

# Pre-validate large specs before filtering
openax --validate-only -i large-api.yaml

# Use specific filters for better performance
openax -i large-api.yaml --paths "/api/v1/users" --format json

# Combine multiple filters
openax -i api.yaml --tags "public" --operations "get,post" --paths "/api"

Integration with CI/CD

# Validate API specs in CI
openax --validate-only -i api.yaml || exit 1

# Generate client-specific specs
openax -i api.yaml --tags "mobile" -o mobile-api.yaml
openax -i api.yaml --tags "web" -o web-api.yaml

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🔗 Links

📄 License

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


For Go developers: This tool is also available as a Go library. See the Go documentation for library usage examples.