Seedfast

Seedfast

Seed Your Database

Before you begin#

Make sure you have:

  • PostgreSQL installed and accessible from your terminal
  • A database with at least one table (Seedfast reads your schema to generate data)
  • An internet connection (data is generated server-side)

If you haven't installed the CLI yet, see the Installation guide — it covers Homebrew, npm, and account setup.

Step 1: Connect your database#

Point Seedfast at the database you want to seed:

macOS / Linux:

seedfast connect

Windows:

npx seedfast connect

You'll be prompted for your connection string (e.g., postgresql://user:password@localhost:5432/mydb). Seedfast reads your schema — tables, columns, foreign keys, constraints — and uses it to plan realistic data generation.

Seedfast connects directly to your database and writes data straight into your tables. No intermediate exports, no files to manage. Your credentials stay local and are never sent to external services.

Step 2: Run your first seed#

There are two ways to seed — interactive and inline.

Interactive mode#

macOS / Linux:

seedfast seed

Windows:

npx seedfast seed

Seedfast automatically generates a seeding scope based on your schema — no input required. It shows you the plan before writing anything. Approve it as-is, or describe what you'd change and Seedfast replans.

This is the default mode for day-to-day use when you're working in a terminal.

Inline scope#

macOS / Linux:

seedfast seed --scope "seed only the users, orders, and products tables"

Windows:

npx seedfast seed --scope "seed only the users, orders, and products tables"

Pass --scope to skip the prompt entirely. Seedfast takes your description directly, builds a plan, and starts seeding — no interaction required. Useful for scripts, Makefiles, and CI/CD pipelines.

You can also use --scope to exclude tables:

macOS / Linux:

seedfast seed --scope "seed all tables except audit_logs and system_configs"

Windows:

npx seedfast seed --scope "seed all tables except audit_logs and system_configs"

The process typically completes in under two minutes depending on schema size.

For a detailed explanation of how scoping works, see Scoping.

What you get#

Seedfast generates data that fits your domain — not random placeholders. Names, emails, statuses, timestamps, and domain-specific values are inferred from your schema structure. The data reflects what your product is actually for.

For more on how this works, see Data Realism and How It Works.

Troubleshooting#

"Connection refused" or timeout errors: Verify your PostgreSQL instance is running and reachable. Test with psql first to confirm connectivity.

Seeding takes longer than expected: Large schemas with many interconnected tables require more planning time. Narrow the scope to the tables you actually need for your current task.