Skip to content

Generators reference

Every unique/random/transform form — generated from packages/lang/src/spec-data.ts, the same manifest that generates the SPEC.md §7.3.1 quick reference. See Variables, generators & expressions for the unique vs. random guarantees.

collision-safe across tests/workers/retries and across runs — every value carries a run namespace taken from the run clock (--now pins it; --seed never moves it)

unique("Widget")

collision-safe across tests/workers/retries and across runs — every value carries a run namespace taken from the run clock (--now pins it; --seed never moves it)

unique email

collision-safe across tests/workers/retries and across runs — every value carries a run namespace taken from the run clock (--now pins it; --seed never moves it); 2^23 draws per run, refused rather than wrapped past a safe integer

unique number

# = digit, ? = letter; the run-wide counter is rendered into the placeholders through a permutation keyed by the pattern and the run namespace, so distinctness within a run is guaranteed and across runs is probabilistic (bounded by the pattern) — a pattern too narrow to encode the counter is refused rather than allowed to repeat

unique like "ORD-######"

v4-shaped; the trailing digits are the run-wide counter and the four bytes before them are the run namespace, so distinctness within and across runs is guaranteed, not probabilistic

unique uuid

random number A to B / random decimal A to B

Section titled “random number A to B / random decimal A to B”

seed-reproducible; a reversed range is refused — at check time when both bounds are literal, at run time otherwise

random number 1 to 100

random date in past / in future / between A and B

Section titled “random date in past / in future / between A and B”

seed- and run-clock-reproducible (--seed/--now); between refuses a reversed range, and a bound that is not a date

random date in past

seed-reproducible pick from an inline list

random of "red", "blue", "green"

seed-reproducible alnum string of length N; 0 is legal and yields "", a negative length is refused

random string 12

# = digit, ? = letter; seed-reproducible pattern fill

random like "SKU-####-??"

v4, collisions allowed (not collision-guaranteed like unique uuid)

random uuid

default length 12, min 4; satisfies a validation policy, not fake-identity realism

random password 16

pure deterministic value transform, not a fresh-value generator

base64 encode("{email}:{password}")

pure deterministic value transform, not a fresh-value generator

hex encode("{token}")

the length of a string or a list — what .length reads; binds tighter than arithmetic

let n = length of {items}

a list of strings and numbers as one string; binds loosest of all

let csv = {ids} joined with ","

pure deterministic value transform, not a fresh-value generator

url encode("{query}")