Quick Start
This guide walks you through your first steps with seedcli.
Basic Workflow
Section titled “Basic Workflow”- Initialize your project with
seedcli init - Configure your database connection in
seedcli.yaml - List tables to see what’s available
- Preview data to see what will be generated
- Seed tables with fake data
Step 1: Initialize Your Project
Section titled “Step 1: Initialize Your Project”seedcli initThis creates:
seedcli.yaml- Configuration file.logseed/- Directory for log files
Step 2: Configure Your Database
Section titled “Step 2: Configure Your Database”Edit seedcli.yaml:
PostgreSQL
Section titled “PostgreSQL”database: adapter: postgres host: localhost port: 5432 name: myapp user: postgres password: your_password ssl_mode: disableSQLite
Section titled “SQLite”database: adapter: sqlite path: ./myapp.dbUsing Connection URL
Section titled “Using Connection URL”database: adapter: postgres url: "postgresql://user:pass@localhost:5432/myapp?sslmode=disable"Step 3: List Tables
Section titled “Step 3: List Tables”seedcli listExample output:
📋 Tables in database
┌─────────────┬─────────┬──────────────┐│ Table │ Columns │ Dependencies │├─────────────┼─────────┼──────────────┤│ users │ 6 │ 0 ││ products │ 5 │ 0 ││ orders │ 4 │ 2 ││ order_items │ 3 │ 2 │└─────────────┴─────────┴──────────────┘Step 4: Preview Generated Data
Section titled “Step 4: Preview Generated Data”Before inserting data, preview what will be generated:
seedcli preview -t users -n 3Example 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 │└─────┴──────────────┴─────────────────────────────┴────────────┘Step 5: Seed Your Database
Section titled “Step 5: Seed Your Database”Seed a single table
Section titled “Seed a single table”seedcli seed -t users -n 50Seed multiple tables
Section titled “Seed multiple tables”seedcli seed -t users -t products -t orders -n 100Seed all tables
Section titled “Seed all tables”seedcli seed --all -n 100Example 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!Useful Options
Section titled “Useful Options”Reproducible Data
Section titled “Reproducible Data”Use the --seed flag for deterministic data:
seedcli seed --all -n 100 --seed 42Running this multiple times generates identical data.
Dry Run
Section titled “Dry Run”Test without inserting:
seedcli seed --all --dry-runSkip Errors
Section titled “Skip Errors”Continue seeding even if some tables fail:
seedcli seed --all --skip-errorsNext Steps
Section titled “Next Steps”- Learn about Configuration options
- Explore CLI Commands in detail
- Understand the Architecture