Prisma CLI & ConfigurationCLI Command Reference

prisma seed

$ prisma seed

Seeds the service with data.

This command expects that the seed property in prisma.yml is specified.

Usage

prisma seed [flags]

Flags

-e, --env-file ENV-FILE    Path to .env file to inject env vars
-r, --reset                Reset the service before seeding

Examples

If you specified the seed property in your prisma.yml, you can run the prisma seed command. For example:

JavaScript
TypeScript
Go
seed:
  run: node ./data/seed.js
Copy
All sample projects in the [`prisma-examples`](https://www.github.com/prisma/prisma1-examples) repository are based on this seeding mechanism.

Seed service with initial data

prisma seed

Seed service with initial data after deleting all of the service's data first

prisma seed --reset