Skip to main content

Generate fake data from the command line — names, emails, addresses, JSON, CSV, and custom templates.

Project description

mockgen-cli

Generate fake data from the command line — names, emails, addresses, JSON, CSV, and custom templates.

Install

pip install mockgen-cli

Quick Start

# Single values
mockgen one email -n 5
mockgen one name --locale de_DE

# Records (table, CSV, JSON)
mockgen record name email city -n 10
mockgen record name email phone --csv -n 100 > users.csv
mockgen record id:uuid name email --json

# Templates
mockgen template "Hello {{name}}, your code is {{uuid}}" -n 5
mockgen template "INSERT INTO users VALUES ('{{name}}', '{{email}}');" -n 50

# From schema file
echo '{"id":"uuid","name":"name","email":"email"}' > schema.json
mockgen schema schema.json -n 20

# List available types
mockgen types

Commands

Command Description
one Generate values of a single type
record Generate multi-field records
template Generate from template strings
schema Generate from JSON schema file
types List all available field types

Output Formats

  • Table (default) — aligned columns
  • --json — JSON array
  • --jsonl — JSON Lines (one object per line)
  • --csv — CSV with headers
  • --tsv — TSV with headers

48 Built-in Types

name, email, phone, address, city, state, zip, country, company, job, url, domain, ip, uuid, username, password, text, sentence, date, datetime, boolean, int, float, credit_card, latitude, longitude, and more.

Plus any Faker method works directly (e.g., license_plate, ean13).

For AI Agents

See SKILL.md for agent-optimized documentation.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mockgen_cli-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mockgen_cli-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file mockgen_cli-0.1.0.tar.gz.

File metadata

  • Download URL: mockgen_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mockgen_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b07b24c68127d73cc79de822d61b98d5e89423a1afa3cfde75aa39555e7f9f2c
MD5 e191e2f32b6fab412213b6a4730654a5
BLAKE2b-256 f101ae211ec1df01b7293ee3686fbcdd6c96241a6f9a821723a8ce7eb16925fc

See more details on using hashes here.

File details

Details for the file mockgen_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mockgen_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mockgen_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9eea9f41a90cf1f502531b48e6729b1dbab92ba2b57fe80f83394ec0af0bbdc
MD5 7a63b8de0d263477f3bd8d95a12e4939
BLAKE2b-256 de7f636c9e31256512d4410b5f6e9e4a66e7bf65cce1e0422c6b19f9257b446b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page