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

datagen-cli

v1.0.3

Published

Generate realistic fake data from a simple JSON/JSON5 spec

Readme

datagen – Beautiful Fake Data Generator CLI

Generate realistic fake data from a simple JSON/JSON5 spec — instantly preview it in a gorgeous dark-themed HTML viewer with search, sorting, pagination and live filtering.

Perfect for:

  • Mock APIs
  • Testing spreadsheets
  • Demo dashboards
  • Data science prototypes
  • Learning SQL/jq

Screenshots

JSON + Live Filter

JSON Preview

CSV Preview

CSV Preview

Features

| Feature | CSV Mode | JSON Mode | |-------------------------------|-------------------------------------------|---------------------------------------------| | Beautiful dark Tailwind UI | Yes | Yes | | Search | Global, instant | Live JS filter (Monaco Editor) | | Column sorting | Yes (numeric + text, arrows) | – | | Pagination | Yes | – | | Download CSV button | Yes (real file download) | – | | Live Monaco Editor | – | Yes | | Live JavaScript filtering | – | Yes (data.filter(...)) | | Supports comments in spec | Yes (.json5) | Yes | | Auto-opens preview in browser | Yes | Yes |

Installation

npm install -g datagen-cli
# or use directly
npx datagen-cli -s spec.json5 -n 1000 -f csv

Quick Start

# 1. Create a spec (supports comments!)
cat > employees.json5 << 'EOF'
{
  id: { type: "increment", start: 1001 },
   uuid: "{{string.uuid}}",
  name: "{{person.fullName}}",
  email: "{{internet.email}}",
  department: { options: ["Engineering", "Sales", "HR", "Marketing"] },
  salary: { min: 45000, max: 180000 },
  isActive: "{{datatype.boolean}}",
  joined: "{{date.past}}"
}
EOF

# 2. Generate!
datagen -s employees.json5 -n 500 -f csv
# → opens beautiful interactive table + Download CSV button

datagen -s employees.json5 -n 200 -f json
# → opens Monaco Editor + live JS filter playground

Spec Format (.json or .json5)

{
  // Auto-incrementing ID
  id: { type: "increment", start: 1 },

  // Faker template
  name: "{{person.fullName}}",
  email: "{{internet.email}}",

  // Random choice
  role: { options: ["Admin", "User", "Guest"] },

  // Number range
  score: { min: 0, max: 100 },

  // Static value
  country: "India",
  uuid : "{{string.uuid}}",
}

Another spec file

{
  // Auto-incrementing ID starting at 1001
  id: { type: "increment", start: 1001 },

  // Full name using Faker
  name: "{{person.fullName}}",

  // Email and phone
  email: "{{internet.email}}",
  phone: "{{phone.number}}",

  // Location
  city: "{{location.city}}",

  // Pick from list
  department: { options: ["Engineering", "Sales", "HR", "Marketing", "Finance"] },

  // Salary range
  salary: { min: 40000, max: 150000 },

  // Random boolean
  isActive: "{{datatype.boolean}}"
}

All Faker.js fields are supported: https://fakerjs.dev

Options

datagen -s <spec> -n <count> -f <csv|json> [options]

  -s, --spec     Path to spec file (.json or .json5)   [required]
  -n, --number   Number of records                     [required]
  -f, --format   Output format: csv or json            [required]
  -o, --output   Save raw data to file (optional)
  --help         Show help

Examples

# 10,000 rows CSV with download button
datagen -s users.json5 -n 10000 -f csv -o users.csv

# JSON with live filtering
datagen -s products.json5 -n 300 -f json

# One-liner (no file)
echo '{"name":"{{person.fullName}}","age":{{number.int 18 80}}}' | datagen --spec - -n 50 -f json

License

MIT © 2025 Mohan Chinnappan


Made with love for developers who hate boring data.