lacspace-fake
Deterministic fake data → JSON/CSV/SQL, now relational.
npx lacspace-fakeEverything, 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.
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.
Linked tables with FKs
Generate users then orders where userId: ref(users.id) — every foreign key is guaranteed to exist.
Template fields
Compose values like full:template({{firstName}} {{lastName}}) from earlier fields or generators.
Unique constraints
unique(uuid) guarantees no duplicate values across rows.
CREATE TABLE DDL
--ddl emits schema with column types inferred from the data.
Spanish & French locales
Realistic names, addresses and phones in es/fr (plus en/ne).
15+ new generators
ULID, hex/rgb/hsl colour, semver, MIME type, file paths, timezone, IBAN/BIC, masked credit card.
Copy, paste, done
Real commands and snippets — from a one-liner to the typed library.
npx lacspace-fake --fields "id:autoincrement,name:fullName,email:email,age:int(18..65)" -n 5Fields evaluate in order; email derives from the name.
npx lacspace-fake --fields "id:autoincrement,name:fullName,role:oneOf(admin|user)" -n 100 -f sql --table usersEscaped INSERT INTO … VALUES ready to pipe into a DB.
npx lacspace-fake --schema users.json -n 50 -f csv -o users.csvNested objects/arrays supported.
npx lacspace-fake --fields "name:fullName,phone:phone,district:city" --locale ne -n 10Romanized Nepali names + +977 mobiles.
npx lacspace-fake email -n 5 --seed 42Same seed always yields the same five emails.
npx lacspace-fake listEvery generator with a sample value.
npx lacspace-fake --relations shop.json -f sql --ddlForeign keys resolve to real parent ids; CREATE TABLE types inferred.
npx lacspace-fake --fields "id:unique(uuid),first:firstName,handle:template({{first}}-{{int(1..99)}})" -n 5No duplicate ids; handle interpolates the row's own fields.
npx lacspace-fake --fields "name:fullName,phone:phone" --locale fr -n 5French names and +33 mobiles, deterministic under --seed.
npx lacspace-fake ulid -n 5 --seed 42Also iban, semver, hexColor, mimeType, filePath, timezone.
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
Run lacspace-fake today
Free, open-source, no API keys. It's a CLI and a typed library.
npx lacspace-fake