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

@trillionclues/contour

v1.1.1

Published

Professional API mock server from OpenAPI specifications

Readme

Install

npm install -g @trillionclues/contour
# or
pnpm add -g @trillionclues/contour
# or
npx @trillionclues/contour start openapi.yaml

Requires Node.js >= 18

Usage

contour start ./api/openapi.yaml          # local file
contour start https://example-openapi.com/api.json  # remote URL
contour start curl -s http://127.0.0.1:3001/pet/findByStatus?status=pending | jq '.'   # Swagger UI page

Your mock API is running at http://localhost:3001 with realistic, type-safe responses.

Sample Remote URL

https://petstore.swagger.io/v2/swagger.json (JSON format)
https://petstore.swagger.io/v2/swagger.yaml (YAML format)

Options

contour start <spec> [options]

  -p, --port <number>       Port (default: 3001)
  --stateful                Persist POST/PUT/DELETE data in memory
  --deterministic           Reproducible data for E2E tests
  --delay <min-max>         Simulate latency, e.g. --delay 200-500
  --error-rate <percent>    Simulate failures, e.g. --error-rate 10
  --require-auth            Require Bearer token

Examples

contour start api.yaml --port 4000 --delay 100-300
contour start api.yaml --deterministic --stateful
contour start api.yaml --error-rate 15 --delay 500-2000

Features

  • Smart data generation — property-name heuristics produce real names, emails, addresses
  • Stateful mode — POST creates, GET retrieves, DELETE removes — full CRUD without a database
  • Request validation — validates POST/PUT/PATCH bodies against your schema, returns 400 with details
  • x-contour-* extensions — fine-tune per-endpoint behavior directly in your spec:
/users:
  get:
    x-contour-count: 20              # array size override
    x-contour-delay: 1000            # per-route latency (ms)
    x-contour-deterministic: true    # consistent data per endpoint
  • Spec cachingcontour cache list / contour cache clear
  • Offline support — cached specs work without network

Framework Integration

Next.js / React

{
  "scripts": {
    "dev": "concurrently \"contour start api.yaml\" \"next dev\"",
    "test:e2e": "contour start api.yaml --deterministic & playwright test"
  }
}

Vite

// vite.config.js
export default defineConfig({
  server: { proxy: { '/api': 'http://localhost:3001' } }
});

Contributing

Contributions are welcome! See CONTRIBUTING.md.

License

MIT © trillionclues