Supabase seeding
March 1, 2026 ยท View on GitHub
This file describes how supabase seeding works.
Snaplet
Snaplet is a tool used to seed mostly PostgresSQL databases. Read through their documentation to understand better how it works here: https://snaplet-seed.netlify.app/seed/getting-started/quick-start
To initialize snaplet:
npx @snaplet/seed init
To sync snaplet (essentially generate snaplet models and docs from seed.config.ts):
Note: every time the config file is changed, this command has to be ran.
bun run db:reset
Or if you need to run the commands separately:
npx supabase db reset
npx @snaplet/seed sync
npx tsx seed.ts > seed.sql
bun run format