@opendsr/seedfaker
v0.2.0-alpha.6
Published
Deterministic synthetic data generator — 200+ fields, 68 locales, native Rust binding
Maintainers
Readme
seedfaker
Node.js binding for seedfaker — deterministic synthetic data with 200+ fields, 68 locales, same seed = same output.
CLI · Node.js · Python · Browser/WASM · Go · PHP · Ruby · MCP
npm install @opendsr/seedfakerPre-1.0 notice: The API may change between minor versions until 1.0.0 is released. Pin your version and check CHANGELOG.md before upgrading.
ESM
import { SeedFaker } from "@opendsr/seedfaker";
const f = new SeedFaker({ seed: "ci", locale: "en" });
f.field("name"); // "Zoe Kumar"
f.field("phone", { e164: true }); // "+14155551234"
f.field("email", { omit: 30 }); // "" for 30% of calls
// Weighted locales: 70% English, 20% German, 10% French
const mixed = new SeedFaker({ seed: "ci", locale: "en=7,de=2,fr=1" });
// Single correlated record
f.record(["name", "email", "phone"], { ctx: "strict" });
// → { name: "Zoe Kumar", email: "zoe.kumar@...", phone: "+1..." }
// Batch
f.records(["name", "email", "phone"], { n: 5, ctx: "strict" });
// Validate without generating
f.validate(["name", "email:e164"]); // throws if invalid
// Corruption
f.records(["name", "email", "ssn"], { n: 100, corrupt: "high" });
// Determinism check
const a = new SeedFaker({ seed: "test" });
const b = new SeedFaker({ seed: "test" });
assert.strictEqual(a.field("name"), b.field("name"));
// Fingerprint — detect algorithm changes after upgrade
SeedFaker.fingerprint(); // "sf0-..."
// All field names
SeedFaker.fields();CommonJS
const { SeedFaker } = require("@opendsr/seedfaker");
const f = new SeedFaker({ seed: "ci", locale: "en" });
f.field("name");CLI
npm (global install):
npm install -g @opendsr/seedfaker-clinpx (no install):
npx @opendsr/seedfaker-cli name email phone -n 10 --seed demoHomebrew:
brew install opendsr-std/tap/seedfakerCargo:
cargo install seedfakerDocumentation
- Quick start
- Field reference (200+ fields)
- Library API
- Guides — library usage, seed databases, mock APIs, anonymize data, NER training
- Full documentation
Disclaimer
This software generates synthetic data that may resemble real-world identifiers, credentials, or personal information. All output is artificial. See LICENSE for the full legal disclaimer.
