MockData — Mock Data Generator
Generate realistic random data for testing, development, and prototyping. Outputs names, emails, phone numbers, addresses, UUIDs, CSV files, and JSON records.
Commands
| Command |
Description |
name [count] |
Generate random full names (first + last, from 160+ name pool) |
email [count] |
Generate random email addresses (realistic patterns with varied domains) |
phone [count] |
Generate random US phone numbers (+1-XXX-XXX-XXXX format) |
address [count] |
Generate random US street addresses with city, state, ZIP |
uuid [count] |
Generate random UUID v4 values (from /dev/urandom) |
csv <rows> <cols> |
Generate CSV with auto-typed columns (id, name, email, phone, city, score) |
json [count] |
Generate JSON array of records with id, name, email, phone, age, city |
Examples
# Generate 5 random names
mockdata name 5
# Generate 10 email addresses
mockdata email 10
# Generate UUIDs
mockdata uuid 3
# Generate a CSV file with 100 rows and 4 columns
mockdata csv 100 4 > test-data.csv
# Generate JSON records
mockdata json 5 > users.json
# Combine for seeding
mockdata json 50 > seed.json
Data Sources
- Names: 80+ first names × 80+ last names (10,000+ combinations)
- Emails: Varied patterns —
first.last@, firstlast42@, flast@ across 10 domains
- Phones: Random US format with valid area code ranges
- Addresses: 20 street types × 20 cities × 20 states
- UUIDs: Generated from
/dev/urandom with proper v4 formatting
CSV Column Types
Columns cycle through these types based on position:
id (sequential)
name (random full name)
email (random email)
phone (random phone)
city (random city)
score (random 0-99)
Notes
- All output goes to stdout — pipe to a file to save
- JSON output is valid JSON (array of objects)
- No external dependencies — uses bash builtins and
/dev/urandom
1---2name: mockdata3description: Generate realistic fake data — names, emails, addresses — for testing and dev. Use when seeding databases, mocking API responses, creating sample records.4---5
6# MockData — Mock Data Generator
7
8Generate realistic random data for testing, development, and prototyping. Outputs names, emails, phone numbers, addresses, UUIDs, CSV files, and JSON records.
9
10## Commands
11
12| Command | Description |
13|---------|-------------|
14| `name [count]` | Generate random full names (first + last, from 160+ name pool) |
15| `email [count]` | Generate random email addresses (realistic patterns with varied domains) |
16| `phone [count]` | Generate random US phone numbers (+1-XXX-XXX-XXXX format) |
17| `address [count]` | Generate random US street addresses with city, state, ZIP |
18| `uuid [count]` | Generate random UUID v4 values (from /dev/urandom) |
19| `csv <rows> <cols>` | Generate CSV with auto-typed columns (id, name, email, phone, city, score) |
20| `json [count]` | Generate JSON array of records with id, name, email, phone, age, city |
21
22## Examples
23
24```bash
25# Generate 5 random names
26mockdata name 5
27
28# Generate 10 email addresses
29mockdata email 10
30
31# Generate UUIDs
32mockdata uuid 3
33
34# Generate a CSV file with 100 rows and 4 columns
35mockdata csv 100 4 > test-data.csv
36
37# Generate JSON records
38mockdata json 5 > users.json
39
40# Combine for seeding
41mockdata json 50 > seed.json
42```
43
44## Data Sources
45
46- **Names:** 80+ first names × 80+ last names (10,000+ combinations)
47- **Emails:** Varied patterns — `first.last@`, `firstlast42@`, `flast@` across 10 domains
48- **Phones:** Random US format with valid area code ranges
49- **Addresses:** 20 street types × 20 cities × 20 states
50- **UUIDs:** Generated from `/dev/urandom` with proper v4 formatting
51
52## CSV Column Types
53
54Columns cycle through these types based on position:
551. `id` (sequential)
562. `name` (random full name)
573. `email` (random email)
584. `phone` (random phone)
595. `city` (random city)
606. `score` (random 0-99)
61
62## Notes
63
64- All output goes to stdout — pipe to a file to save
65- JSON output is valid JSON (array of objects)
66- No external dependencies — uses bash builtins and `/dev/urandom`