Package Exports
- @1337plus/llmdatagen
- @1337plus/llmdatagen/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@1337plus/llmdatagen) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
LLM Data Generator
Universal data generator using Large Language Models. Generate structured JSON data with schemas or any text format (Markdown, CSV, emails, etc.) with LLM assistance.
Features
- 🎯 Schema-driven generation - Define your data structure using JSON Schema
- 📄 Text format support - Generate any text format (Markdown, CSV, emails, etc.)
- 🤖 LLM-powered - Uses OpenRouter API to access various LLM models
- 📝 Custom prompts - Fine-tune generation with field-specific prompts
- ✅ Validation - Built-in JSON Schema validation for structured data
- 🔄 Batch processing - Generate multiple items with progress tracking
- 🛠️ CLI interface - Easy-to-use command line tool
- 📦 Extensible - Add your own configurations and schemas
Installation
# Install globally
npm install -g @1337plus/llmdatagen
# Or use with npx without installation
npx @1337plus/llmdatagenAfter global installation, you can use the command:
llmdatagenFor alternative installation methods (from source, development setup, troubleshooting), see docs/installation.md.
Configuration
Set your OpenRouter API key:
export OPENROUTER_API_KEY=your-api-key-hereFor detailed configuration guide, see docs/configuration.md.
Output Formats
The generator supports two output formats:
JSON Format (default)
- ✅ Schema validation with JSON Schema
- ✅ Type-safe structured data
- ✅ Field-level generation control
- ✅ Perfect for APIs, databases, configurations
Text Format
- ✅ Any text-based format (Markdown, CSV, SQL, etc.)
- ✅ No schema constraints
- ✅ Template variables in prompts
- ✅ Perfect for content, documentation, scripts
Quick Start
# Generate data with interactive wizard
llmdatagenThis will:
- Display your account information
- Let you select a model from live list
- Guide you through configuration setup
- Start generating data
For detailed usage instructions, command-line options, and advanced features, see docs/usage.md.
Examples
JSON Format (Structured Data)
Generate validated, structured data with JSON schemas:
Quiz Questions
llmdatagen --config configs/examples/quiz.json- Multiple choice questions with 2-4 answers
- Difficulty levels and tags
- Schema validation
Product Catalog
llmdatagen --config configs/examples/products.json- E-commerce product listings
- SKU, pricing, inventory
- Structured metadata
Blog Article Metadata
llmdatagen --config configs/examples/articles.json- Article metadata and summaries
- Author, tags, featured flags
- Publication dates
News Digest (Web Search)
llmdatagen --config configs/examples/news-digest.json- Real-time news search and analysis
- Actual sources, URLs, dates
- Relevance scoring and sentiment
- Uses models with web search (Claude 4)
Text Format (Freeform Content)
Generate any text format without schema constraints:
Blog Posts (Markdown)
llmdatagen --config configs/examples/blog-posts.json- Full blog articles in Markdown
- Headings, formatting, structure
- 800+ words per article
Email Templates
llmdatagen --config configs/examples/emails.json- Professional email templates
- Business, sales, support styles
- Customizable tone and purpose
CSV Data
llmdatagen --config configs/examples/csv-data.json- Comma-separated data files
- Custom columns and headers
- Realistic data generation
News Digest (Markdown)
llmdatagen --config configs/examples/news-digest-markdown.json- Real-time web search for news
- Professional digest format
- Executive summaries & trend analysis
- Uses models with web search
Documentation
- Configuration Guide - Detailed guide on creating configurations
- Usage Guide - Command-line options and features
- Installation - Alternative installation methods
- Development - Technical details for developers
Contributing
- Fork the repository
- Create your feature branch
- Add tests for new features
- Submit a pull request
License
MIT License - see LICENSE file for details