
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@mockilo/mocktail-cli
Advanced tools
**Craft your data cocktail — realistic mock data, shaken not stirred.**
Note: .env file was sanitized in this package release. Use .env.example to set DATABASE_URL before running anything that needs a DB.
Mocktail‑CLI — The schema‑aware mock data generator for developers. Generate realistic, relation‑aware mock data from your Prisma schema directly from the command line.
Mocktail-CLI is a Prisma-aware CLI tool for generating realistic mock data based on your database schema. It supports nested relations, circular relation handling, deterministic seeds, schema auto-detection, and multiple output formats. Perfect for building, testing, and prototyping without waiting on backend data.
--depth.--seed and --seed-value.mocktail-cli.config.js.# global install
npm i -g mocktail-cli
# or run on demand
npx mocktail-cli generate --help
npx mocktail-cli generate \
--schema ./prisma/schema.prisma \
--models User,Post \
--count 50 \
--out ./mocks/data.json \
--format json \
--seed
--depth 2 — set how deep nested relations go.--out — output to a file or stdout.--preset blog — generate domain-specific data.# Generate 20 Users
mocktail-cli generate --models User --count 20
# Generate Users and Posts with specific counts
mocktail-cli generate --models User,Post --count 10,30 --out ./mocks
# Generate SQL inserts instead of JSON
mocktail-cli generate --format sql --out ./seeds
# Use a preset for ecommerce data
mocktail-cli generate --preset ecommerce --count 100
#Full option list
Option Alias Description
-c, --count <number> Number of records per model (default: 5)
-o, --out <directory> Output directory
-f, --format <type> Output format: json, sql, ts, csv (default: json)
-s, --schema <path> Prisma schema path (default: ./prisma/schema.prisma, auto-detect enabled)
-m, --models <models> Comma-separated list of models (optional)
--mock-config <path> Path to mocktail-cli.config.js
-d, --depth <number> Nested relation depth (default: 1)
--seed Insert generated data into DB
--seed-value <number> Seed value for reproducible data generation
--preset <type> Relation preset: blog, ecommerce, social
--force-logo Force show the logo animation even if shown before
-h, --help Display help with usage and examples
Define a mocktail-cli.config.js or mocktail-cli.config.json to customize generation.
module.exports = {
defaults: { locale: 'en', seedConsistency: true },
models: {
User: { count: 20, faker: { name: 'fullName', email: 'email' } },
Post: { count: 50, relations: { author: { connectBy: 'User' } } }
}
}
mocktail-cli generate --count 50mocktail-cli generate --seed --seed-value 42mocktail-cli generate --preset social --count 100 --seed
How Mocktail-CLI compares with other schema-aware mock data tools:
| Feature / Tool | Mocktail-CLI | Prisma-Seed | Prisma-Generator-Fake | Mockoon / MirageJS | faker-js |
|---|---|---|---|---|---|
| Prisma schema aware (reads schema) | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | ❌ No |
| Auto-detect Prisma schema | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
| Handles relations (deep / circular-safe) | ✅ Deep + safe | ⚠️ Limited | ⚠️ Limited | ❌ Manual | ❌ No |
| Deterministic seeds | ✅ --seed-value | ⚠️ Partial | ⚠️ Partial | ❌ No | ✅* |
| Output formats | ✅ JSON / SQL / CSV / TS | ❌ Mostly JSON | ❌ Mostly JSON | ✅ JSON / API | ⚠️ Code-driven only |
| CLI-first workflow | ✅ Yes | ⚠️ Partial | ⚠️ Plugin-only | ✅ Yes (server) | ❌ No |
| Relation presets (blog / ecommerce / social) | ✅ Built-in | ❌ No | ❌ No | ❌ No | ❌ No |
| DB seeding | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
| Extensible config | ✅ mocktail-cli.config.js | ⚠️ Partial | ⚠️ Partial | ⚠️ Partial | ⚠️ Manual only |
* faker-js supports faker.seed(...) for deterministic values, but it is not schema-aware and doesn’t handle relations automatically.
❤️ Mocktail-CLI uses @faker-js/faker internally for realistic field data — every record feels lifelike.
Takeaway:
We welcome PRs, bug reports, and feature ideas.
License Update: From v1.1.1-beta.0, Mocktail-CLI is licensed under BSL-1.1. Older versions (<=1.1.0-beta.3) remain MIT.
Order up! Your personal code barista is here. Serving fresh, Prisma-aware mock data, shaken not stirred.
FAQs
**Craft your data cocktail — realistic mock data, shaken not stirred.**
The npm package @mockilo/mocktail-cli receives a total of 8 weekly downloads. As such, @mockilo/mocktail-cli popularity was classified as not popular.
We found that @mockilo/mocktail-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.