Skip to content

Quick Start

This guide walks you through your first steps with seedcli.

  1. Initialize your project with seedcli init
  2. Configure your database connection in seedcli.yaml
  3. List tables to see what’s available
  4. Preview data to see what will be generated
  5. Seed tables with fake data
Terminal window
seedcli init

This creates:

  • seedcli.yaml - Configuration file
  • .logseed/ - Directory for log files

Edit seedcli.yaml:

database:
adapter: postgres
host: localhost
port: 5432
name: myapp
user: postgres
password: your_password
ssl_mode: disable
database:
adapter: sqlite
path: ./myapp.db
database:
adapter: postgres
url: "postgresql://user:pass@localhost:5432/myapp?sslmode=disable"
Terminal window
seedcli list

Example output:

📋 Tables in database
┌─────────────┬─────────┬──────────────┐
│ Table │ Columns │ Dependencies │
├─────────────┼─────────┼──────────────┤
│ users │ 6 │ 0 │
│ products │ 5 │ 0 │
│ orders │ 4 │ 2 │
│ order_items │ 3 │ 2 │
└─────────────┴─────────┴──────────────┘

Before inserting data, preview what will be generated:

Terminal window
seedcli preview -t users -n 3

Example output:

📋 Preview: users (3 rows)
┌─────┬──────────────┬─────────────────────────────┬────────────┐
│ id │ username │ email │ created_at │
├─────┼──────────────┼─────────────────────────────┼────────────┤
│ 1 │ johndoe42 │ john.doe@example.com │ 2025-03-15 │
│ 2 │ janesmit │ jane.smith@company.org │ 2025-06-22 │
│ 3 │ mikebrown │ mike.brown@startup.io │ 2025-09-01 │
└─────┴──────────────┴─────────────────────────────┴────────────┘
Terminal window
seedcli seed -t users -n 50
Terminal window
seedcli seed -t users -t products -t orders -n 100
Terminal window
seedcli seed --all -n 100

Example output:

📊 Seeding Results
──────────────────────────────────────────────────────
✅ users: 100 rows (0.45s)
✅ products: 100 rows (0.32s)
✅ orders: 100 rows (0.28s)
✅ order_items: 100 rows (0.21s)
✓ Seeding completed successfully!

Use the --seed flag for deterministic data:

Terminal window
seedcli seed --all -n 100 --seed 42

Running this multiple times generates identical data.

Test without inserting:

Terminal window
seedcli seed --all --dry-run

Continue seeding even if some tables fail:

Terminal window
seedcli seed --all --skip-errors