Skip to content

Quick Start

The fastest way to get started is to point DBSprout at an existing database:

Terminal window
# Initialize from a PostgreSQL database
dbsprout init --db postgresql://user:pass@localhost/myapp
# Generate seed data (default: 100 rows per table)
dbsprout generate

This will:

  1. Introspect your schema (tables, columns, foreign keys, constraints)
  2. Analyze column names and types to pick appropriate generators
  3. Resolve FK dependencies via topological sort
  4. Generate realistic data that respects all constraints
  5. Output SQL INSERT statements to ./seed.sql

No database connection needed — use a DDL file, DBML, Prisma schema, or other supported format:

Terminal window
# From a SQL DDL file
dbsprout init --file schema.sql
# From a DBML file
dbsprout init --file schema.dbml
# From a Prisma schema
dbsprout init --file prisma/schema.prisma
Terminal window
# Generate 5000 rows per table
dbsprout generate --rows 5000
# Output as CSV files
dbsprout generate --output-format csv
# Output as JSON
dbsprout generate --output-format json
# Direct insertion into PostgreSQL (uses COPY for speed)
dbsprout generate --output-format direct --db postgresql://localhost/myapp
# Set a seed for deterministic output
dbsprout generate --seed 42

For higher-quality data, use the spec engine which leverages an AI model to understand your schema semantically:

Terminal window
# Uses the embedded model (offline, no API key needed)
dbsprout generate --engine spec
# Or use a cloud provider
dbsprout generate --engine spec --llm-provider openai