DocsRecipes

Existing Postgres

Pipe seedkit's generated data into a database you already have — local, staging, your CI service container, anywhere.


You don't have to use seedkit's ephemeral databases to use seedkit's data. Point seedkit seed at any Postgres URL and it inserts there.

Local Postgres

npx seedkit-cli seed \
  --url postgres://localhost:5432/dev \
  --schema schema.sql

Staging or shared dev DB

npx seedkit-cli seed \
  --url $STAGING_DATABASE_URL \
  --schema schema.sql \
  --seed staging-fixture --from-cache --reset

--reset truncates first. Don't run this against production — it's destructive.

Without --reset

Skip --reset to append generated rows to whatever's already there. Useful for "I have some real data and want to bulk it up with synthetic for load testing." FK references will resolve to the union of existing + new rows.

Docker / Compose

If your dev DB runs in Docker:

docker compose up -d postgres
npx seedkit-cli seed --url postgres://postgres:postgres@localhost:5432/app --schema schema.sql

Same pattern. seedkit doesn't care that it's containerized.

See also