| name | mock-data |
| description | Generate realistic mock data from TypeScript types |
Mock Data Generator
Give it your types, get realistic fake data. Perfect for tests and development.
Quick Start
npx ai-mock-data ./src/types/User.ts
What It Does
- Reads TypeScript interfaces
- Generates realistic fake data
- Understands field names (email, phone, etc.)
- Creates arrays with varied data
Usage Examples
npx ai-mock-data ./src/types/Order.ts
npx ai-mock-data ./types/User.ts --count 50
npx ai-mock-data ./types/Product.ts --out ./fixtures/products.json
npx ai-mock-data ./types/index.ts --type Customer
Output Example
[
{
"id": "usr_8x7k2m",
"email": "sarah.chen@gmail.com",
"name": "Sarah Chen",
"createdAt": "2024-01-15T09:23:00Z"
}
]
Smart Field Detection
email → realistic emails
phone → formatted phone numbers
address → real-looking addresses
price → appropriate currency values
Requirements
Node.js 18+. OPENAI_API_KEY required.
License
MIT. Free forever.
Built by LXGIC Studios