lacspace-fake

Deterministic fake data → JSON, CSV or SQL inserts.

terminal
npx lacspace-fake
What it does

Everything, in one command

lacspace-fake turns a tiny schema into realistic test data — names, emails, phones, addresses, prices, timestamps, UUIDs and 60+ more generators — and prints it in whatever shape your workflow needs, including escaped SQL inserts that seed a database in one command. Every value is drawn from a seeded mulberry32 PRNG, so a fixed seed produces byte-identical output on every machine, ideal for reproducible fixtures and CI. It runs fully offline with no API key, no account and no telemetry, and it speaks a Nepal locale out of the box.

Features

What's inside

Schema-driven rows

Inline --fields string or a JSON schema file with nested objects and arrays.

Deterministic --seed

Same seed, byte-identical output, forever.

Four outputs

JSON, NDJSON, CSV (header row) and safe SQL INSERTs.

Injection-safe SQL

String values are quote-escaped and identifiers quoted.

60+ generators

person, internet, address, company, commerce, text, datetime, ids.

Nepal locale

Nepali names, districts/provinces, NPR, +977 phones, PAN/VAT.

Zero-dep & offline

Nothing to audit, nothing phones home, no key.

How to use

Copy, paste, done

Real commands and snippets — from a one-liner to the typed library.

Five users as JSON
terminal
npx lacspace-fake --fields "id:autoincrement,name:fullName,email:email,age:int(18..65)" -n 5

Fields evaluate in order; email derives from the name.

Seed a table with SQL
terminal
npx lacspace-fake --fields "id:autoincrement,name:fullName,role:oneOf(admin|user)" -n 100 -f sql --table users

Escaped INSERT INTO … VALUES ready to pipe into a DB.

JSON schema → CSV file
terminal
npx lacspace-fake --schema users.json -n 50 -f csv -o users.csv

Nested objects/arrays supported.

Nepal locale
terminal
npx lacspace-fake --fields "name:fullName,phone:phone,district:city" --locale ne -n 10

Romanized Nepali names + +977 mobiles.

Reproducible fixture
terminal
npx lacspace-fake email -n 5 --seed 42

Same seed always yields the same five emails.

Discover generators
terminal
npx lacspace-fake list

Every generator with a sample value.

Good for

What people build with it

Seed dev/test databases in one command

Reproducible unit/integration test fixtures

Demo and staging data

Prototype a UI before a real backend exists

Start now

Run lacspace-fake today

Free, open-source, no API keys. It's a CLI and a typed library.

terminal
npx lacspace-fake