Documentation
Ghost Bakery turns a short YAML recipe into realistic fake data for testing, demos, and load simulation. Describe the shape of one record; the engine produces as many records as you ask for, in the format you choose.
DDRR recipe
A recipe is a YAML document with an output section and a list of fields. Each field has a type; the engine produces one value per record.
recipe.yaml
version: "1"
output:
language: en # en, pt, es, fr, de, it, …
format: csv # csv, json, tsv, xlsx, pdf, xml, yaml, sql
quantity: 100
options: { header: true }
fields:
- { name: id, type: autoint, start: 1 }
- { name: name, type: person }
- { name: email, type: email }
- { name: cpf, type: identifier, kind: cpf }
- { name: created_at, type: date }
The output section
| Key | Meaning |
language | Locale for themed data (names, words, addresses). en, pt, es, fr, de, it, … |
format | Output encoding — see Output formats below. |
quantity | Number of records to generate. |
options | Format-specific switches, e.g. { header: true } for CSV/TSV. |
Common field options
Every field takes a name and a type. Depending on the type, these extra keys apply:
| Option | Applies to | Meaning |
min / max | numeric, date types | Inclusive bounds for the generated value. |
precision | decimal | Number of decimal places. |
start | autoint | First value of the auto-incrementing sequence. |
values | enum | The set of allowed values to pick from. |
weights | enum | Optional per-value probability weights. |
kind | identifier | Which identifier to emit — see the Identifiers table. |
format | color | hex, rgb, rgba, hsl, cmyk. |
country | postcode, phone | Locale of the generated identifier. |
nullable | any | Emit an empty value for a fraction of records. |
Field types
Numbers & dates
| Type | Produces |
autoint | Auto-incrementing integer (row number). |
integer | Random integer within min/max. |
decimal | Random floating-point number with precision. |
boolean | true or false. |
date | Calendar date, optionally bounded or in the past/future. |
datetime | Date and time. |
datetimePart | A single part — year, month, day, hour, minute, second, nanosecond. |
timezoneOffset | UTC offset in hours. |
age | Human age (0–100). |
Text
| Type | Produces |
text | Lorem-ipsum words, sentences, paragraphs, quotes, or phrases. |
enum | A value chosen from your values list (optionally weighted). |
template | A string built from a template with {placeholders}. |
regexp | A value matching a regular expression. |
pattern | A value built from a token pattern (e.g. license plates, SKUs). |
Identifiers
| Type | Produces |
uuid / uuidv4 | Random UUID v4. |
ulid | Lexicographically sortable ULID. |
mongodbObjectId | 24-character MongoDB ObjectId. |
slug | URL-safe slug of random words. |
semver | Semantic version, e.g. 2.14.7. |
isbn / isbn10 / isbn13 | Book ISBN with valid check digit. |
issn | Serial ISSN. |
identifier | National / tax ID selected by kind: cpf, cnpj (Brazil), ssn, ein (US), uuid, slug. All carry valid check digits. |
Internet & network
| Type | Produces |
email | Email address (optional domain). |
username | Account handle. |
phone | Phone number (optional country). |
url / httpUrl | Web URL. |
domainName / hostname / fqdn | Domain and host names. |
ipv4 / ipv6 / ip | IP address. |
cidr | CIDR network block. |
mac | MAC hardware address. |
port | TCP/UDP port (1–65535). |
Web & HTTP
| Type | Produces |
httpStatus | HTTP status code. |
httpMethod | GET, POST, PUT, … |
httpVersion | HTTP/1.1, HTTP/2, … |
userAgent | Browser user-agent string. |
logLevel | DEBUG, INFO, WARN, ERROR, TRACE. |
jwt | Fake (unsigned) JWT token. |
Geography & locale
| Type | Produces |
latitude / longitude | Geographic coordinate. |
countryCode | ISO country code, e.g. BR, US. |
currencyCode | ISO currency code, e.g. BRL, USD. |
postcode | Postal code (optional country). |
Encoding, security & binary
| Type | Produces |
password | Random password. |
hash | Hex/hash digest string. |
base64 | Base64-encoded random bytes. |
binary | Raw random bytes. |
creditCard | Test credit-card number (Luhn-valid, non-real). |
color | Color in hex, rgb, rgba, hsl, or cmyk. |
Structured & composite
| Type | Produces |
person | A person bundle: first name, last name, full name, age, email. |
contact | A contact bundle: email, phone, street, city, country, postcode. |
json | A nested JSON object assembled from sub-fields. |
csvjsontsvxlsxpdfxmlyamlsql
Credits
Credit usage depends only on volume — every field costs the same, no matter its type:
cost = (number of fields × number of records) + 10% processing
The 10% overhead is rounded up. You always see the exact estimate before a generation runs. See pricing for free-tier limits.
API
The same engine is available over HTTP with a JWT or API key. The OpenAPI 3.1 spec and interactive docs are served by the API service at /openapi.json and /docs.