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

@demokit-ai/cli

v0.2.0

Published

CLI for DemoKit - Generate demo fixtures from API specs

Readme

@demokit-ai/cli

Tests Coverage

CLI for DemoKit - Generate demo fixtures from OpenAPI specs and other sources.

Installation

npm install -g @demokit-ai/cli

# Or use with npx
npx @demokit-ai/cli generate

Features

  • OpenAPI Import - Generate fixtures from OpenAPI/Swagger specs
  • Fixture Generation - Create realistic demo data with relationships
  • Multiple Outputs - Export to TypeScript, JSON, SQL, or CSV
  • Schema Validation - Validate generated data against schemas
  • Interactive Mode - Guided fixture generation
  • Full TypeScript support

Usage

Generate Fixtures from OpenAPI

# From a local file
demokit generate --input ./openapi.yaml --output ./fixtures

# From a URL
demokit generate --input https://api.example.com/openapi.json --output ./fixtures

# With options
demokit generate \
  --input ./openapi.yaml \
  --output ./fixtures \
  --format typescript \
  --count 10 \
  --seed 42

Initialize a DemoKit Project

demokit init

# With options
demokit init --template nextjs --output ./demo

Validate Fixtures

demokit validate --fixtures ./fixtures --schema ./openapi.yaml

Interactive Mode

demokit generate --interactive

Commands

demokit generate

Generate demo fixtures from a schema.

Options:

  • -i, --input <path> - Input OpenAPI spec (file path or URL)
  • -o, --output <dir> - Output directory for fixtures
  • -f, --format <type> - Output format: typescript, json, sql, csv (default: typescript)
  • -c, --count <n> - Number of records per model (default: 5)
  • -s, --seed <n> - Random seed for reproducible output
  • --interactive - Interactive mode with prompts
  • --dry-run - Preview without writing files

demokit init

Initialize a new DemoKit project.

Options:

  • -t, --template <name> - Project template: nextjs, remix, vite, express
  • -o, --output <dir> - Output directory
  • --skip-install - Skip npm install

demokit validate

Validate fixtures against a schema.

Options:

  • -f, --fixtures <path> - Path to fixtures
  • -s, --schema <path> - Path to schema (OpenAPI spec)
  • --strict - Fail on warnings

demokit info

Display information about DemoKit installation.

Configuration

Create a demokit.config.js or demokit.config.ts file:

import { defineConfig } from '@demokit-ai/cli'

export default defineConfig({
  input: './openapi.yaml',
  output: './src/fixtures',
  format: 'typescript',
  count: {
    User: 10,
    Order: 25,
    Product: 50,
  },
  seed: 42,
  scenarios: {
    default: {},
    enterprise: {
      User: { plan: 'enterprise' },
    },
  },
})

Then run:

demokit generate

Examples

Generate TypeScript Fixtures

demokit generate -i ./api.yaml -o ./src/demo -f typescript

Output:

// src/demo/fixtures.ts
export const DEMO_USER = [
  { id: '1', name: 'Demo User', email: '[email protected]' },
  // ...
] as const

export const DEMO_ORDER = [
  { id: '1', userId: '1', total: 99.99, status: 'pending' },
  // ...
] as const

export const DEMO_DATA = {
  User: DEMO_USER,
  Order: DEMO_ORDER,
} as const

Generate SQL Seed Data

demokit generate -i ./api.yaml -o ./seeds -f sql

Output:

-- seeds/demo.sql
INSERT INTO user (id, name, email) VALUES ('1', 'Demo User', '[email protected]');
INSERT INTO "order" (id, user_id, total, status) VALUES ('1', '1', 99.99, 'pending');

License

MIT