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

quickaction-api-generator

v0.1.0

Published

API client generator for QuickAction projects.

Readme

QuickAction API Generator

   ___            _          _         _             _     _
  / _ \   _   _  (_)   ___  | | __    / \      ___  | |_  (_)   ___    _ __
 | | | | | | | | | |  / __| | |/ /   / _ \    / __| | __| | |  / _ \  | '_ \
 | |_| | | |_| | | | | (__  |   <   / ___ \  | (__  | |_  | | | (_) | | | | |
  \__\_\  \__,_| |_|  \___| |_|\_\ /_/   \_\  \___|  \__| |_|  \___/  |_| |_|

Beautiful, minimal, and opinionated CLI to generate an OpenAPI-based
TypeScript client tailored for QuickAction projects.

https://github.com/TRICOLORS-STUDDIO/quickaction-api-generator

A tiny, friendly generator that scaffolds redocly.yaml, installs suggested dependencies, generates TypeScript types from an OpenAPI document, and emits an openapi-fetch client in src/services.


Features

  • ✅ Generate redocly.yaml to point at your OpenAPI JSON
  • ✅ Run openapi-typescript to produce src/types/api-quickaction.d.ts
  • ✅ Create a ready-to-use openapi-fetch client in src/services/api-quickaction.ts
  • ⚙️ Detects package manager and installs recommended packages (optional)
  • 🎨 Interactive, friendly CLI with colorful output

Quick Start

Prerequisites

  • Node.js >= 18
  • Git (optional)

Install from source (development)

# clone
git clone https://github.com/quickaction/api-generator.git
cd api-generator

# install dev deps
npm install

# build the CLI
npm run build

# run the CLI locally
node ./bin/cli.js --help

Install globally (optional)

# from the project root (requires npm publish or local link)
npm install -g .
# then use `quickaction-api` from anywhere
quickaction-api --help

Usage

Run the CLI to scaffold a QuickAction API client in your current project folder.

# Interactive (recommended)
node ./bin/cli.js

# Provide OpenAPI URL and skip prompts
node ./bin/cli.js --url https://api.quickaction.app/api-public-docs.json --yes

# Only generate types (if you already have redocly.yaml)
node ./bin/cli.js --skip-install

# Show version
node ./bin/cli.js --version

Options

  • -u, --url <url>: OpenAPI JSON URL to generate types from
  • -b, --base-url <url>: API base URL used by the generated client
  • --skip-install: Skip installing recommended dependencies
  • -f, --force: Overwrite existing files
  • -y, --yes: Skip prompts and accept defaults
  • -s, --silent: Minimal output

Examples

# Typical non-interactive setup
node ./bin/cli.js --url https://api.example.com/openapi.json --yes

# Force overwrite and install deps using your package manager
node ./bin/cli.js --force

What it creates

  • redocly.yaml — points the Redocly CLI (and openapi-typescript) at your OpenAPI JSON
  • src/types/api-quickaction.d.ts — generated TypeScript types (via openapi-typescript)
  • src/services/api-quickaction.ts — a small openapi-fetch client wrapper
  • Adds an npm script: quickaction:api which runs openapi-typescript

If files already exist the CLI prompts before overwriting unless --force is used.


Development notes

  • Build system: tsup (see tsup.config.ts)
  • Entry points: src/index.ts and src/cli/index.ts
  • Type system: TypeScript (see tsconfig.json)

If you change messages or CLI behavior, run:

npm run build

Troubleshooting

  • If you see SyntaxError: Unexpected token when running node ./bin/cli.js, ensure your project's package.json is UTF-8 without a BOM. If it contains a BOM (U+FEFF) some Node JSON parsers can fail. To fix:
# remove BOM (POSIX)
awk 'NR==1{sub(/\xEF\xBB\xBF/,"")}{print}' package.json > package.json.fixed && mv package.json.fixed package.json
  • If dependencies fail to install, re-run using your package manager explicitly (e.g., pnpm, yarn, or npm).

Contributing

We welcome contributions!

  • Fork the repo
  • Create a feature branch
  • Run npm install and npm run build
  • Add tests where applicable and open a PR

Please keep changes small and focused. Use Prettier for formatting.


License & Support

This project is licensed under the MIT License.

If you need help, open an issue at https://github.com/TRICOLORS-STUDDIO/quickaction-api-generator/issues


Made with ❤️ by the QuickAction team — happy coding!