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

api-geno

v0.0.27

Published

TypeScript OpenAPI-based API client generator with zod validation and neverthrow results.

Readme

Api-Geno

TypeScript OpenAPI client generator with runtime Zod validation, neverthrow results, and configurable Axios/Fetch adapters.

✨ Key Features

  • Command-line generator: api-geno generate creates a typed client from an OpenAPI JSON file.
  • Axios + Fetch adapters: Choose axios or fetch with the --http-adapter option.
  • Optional Zod validation: Runtime schemas are generated by default, and can be disabled with --no-zod.
  • Functional error handling: Generated requests return neverthrow Result values instead of raw exceptions.
  • Config-driven generation: Supports api-geno.config.json alongside CLI flags.
  • Flexible output structure: --flat, --split-services, and --emit-only-shapes allow tailored output.
  • Formatting support: --format runs biome or falls back to prettier when available.
  • Smart regeneration: Keeps a hash file to skip generation when inputs/options are unchanged, with --force to override.
  • Auxiliary features: --report generates coverage reporting, --skip-generated-outputs prints generated files to console, and --watch rebuilds on change.

🧭 CLI Usage

bun run build
bun run ./dist/cli.js generate \
  --input api.json \
  --output generated \
  --http-adapter fetch \
  --format \
  --report

Supported flags

  • -i, --input <file>: OpenAPI JSON file
  • -o, --output <dir>: Output directory
  • --http-adapter <adapter>: axios or fetch (default: axios)
  • --error-style <style>: class, shape, or both (default: both)
  • --emit-only-shapes: Emit only type shapes
  • --skip-generated-outputs: Print files instead of writing them
  • --force: Force regeneration
  • --output-format <fmt>: Output format (ts only)
  • --flat: Generate files in a single directory
  • --no-zod: Disable Zod schema generation
  • --split-services / --no-split-services: Control service file splitting
  • --format: Format generated code after generation
  • --report: Emit a schema coverage report
  • -w, --watch: Watch input/config changes and regenerate

💡 Example config file

Create an api-geno.config.json to reuse common generation options:

{
  "input": "api.json",
  "output": "generated",
  "httpAdapter": "fetch",
  "format": true,
  "report": true
}

📦 Package scripts

| Script | What it does | |--------|-------------| | bun run build | Compile the generator | | bun run gen | Build and generate using api.json | | bun run check | Type-check only | | bun run lint | Run Biome lint | | bun run lint:fix | Autofix lint issues | | bun run format | Format all files | | bun run format:check | Check formatting (CI) | | bun run test | Run tests | | bun run verify | Lint + typecheck + test + build (full local CI) | | bun run release | Create a single bundled CLI binary in release/api-geno |

🧪 Run tests

bun install
bun test

🔧 Build + generate

bun run build
bun run ./dist/cli.js generate -i api.json -o ./generated --force

🤝 Contributing

bun install          # also sets up git hooks via lefthook
bun run verify       # run full check before pushing

Pre-commit hooks run lint and check automatically. Pre-push runs the full verify pipeline.

Use changesets for versioning:

bun run changeset    # describe your change

Note: api-geno is published as a CLI binary via dist/cli.js and also supports api-geno once installed globally or linked.