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

@codyswann/api-creator

v0.1.11

Published

Reverse-engineer any web API into a typed CLI by recording real browser traffic

Readme

api-creator

npm version

Reverse-engineer any web API into a typed CLI by recording real browser traffic.

Record a live browser session, auto-generate endpoints, set up auth, and call any API endpoint directly from your terminal.

Install

npm install -g @codyswann/api-creator
npx playwright install chromium

Quick start

# 1. Record browser traffic (press "q" + Enter to stop)
api-creator record --url https://example.com

# 2. Generate the CLI
api-creator generate --input ./recordings/<timestamp>.har --name example

# 3. Set up auth (opens a browser — log in, then press Enter)
api-creator example auth setup

# 4. Use it
api-creator example --help
api-creator example some-endpoint --option value

How it works

  1. Record — Playwright opens a browser, you browse around, and all API traffic is captured as a HAR file
  2. Generate — The HAR is parsed to extract endpoints, detect auth patterns, infer TypeScript types, and build a project manifest
  3. Auth — A browser opens, you log in, and cookies + headers are captured automatically
  4. Use — Every endpoint becomes a CLI subcommand with typed options

Generated projects are stored in ~/.api-creator/projects/<name>/ and registered as dynamic subcommands of api-creator.

Commands

api-creator record --url <url>          # Record browser traffic
api-creator generate --input <har>      # Generate CLI from HAR file
api-creator list                        # List all generated projects
api-creator export <name> -o <dir>      # Export TypeScript client for programmatic use
api-creator <name> --help               # Show all endpoints for a project
api-creator <name> auth setup           # Capture auth via browser
api-creator <name> auth status          # Check auth status
api-creator <name> auth clear           # Remove stored auth
api-creator <name> <endpoint> [opts]    # Call an API endpoint

Run api-creator --help or api-creator <command> --help for full options.

Auth

Auth credentials are stored at ~/.api-creator/<name>.auth and injected into every request. Supported auth types:

  • Cookies
  • Bearer tokens
  • API keys
  • Custom headers (e.g., x-airbnb-api-key)

When auth expires, re-run api-creator <name> auth setup.

You can also set up auth from a cURL command:

api-creator <name> auth setup --file curl.txt
pbpaste | api-creator <name> auth setup --stdin

GraphQL

GraphQL persisted queries are detected automatically. operationName and extensions are baked into the manifest. Only meaningful variable fields are exposed as CLI options.

api-creator airbnb mystitlequery --listing-id "abc123" --viewer-id "xyz789"

Contributing

See CONTRIBUTING.md.

License

MIT