What problem does it solve?
This skill generates TypeScript types directly from your Supabase database schema, eliminating manual type definitions and keeping client code in sync with the database.
Core Features & Use Cases
- Automated type generation: Produces a Database type with Tables, Row, Insert, and Update shapes for quick, type-safe queries.
- Seamless integration: Works with standard Next.js/TypeScript projects and common tooling; regenerates after schema changes.
- Use Case: Use generated types to ensure compile-time correctness when querying or mutating data with the Supabase client.
Quick Start
Use the Supabase CLI to generate types from your schema:
npx supabase gen types typescript --project-id YOUR_PROJECT_ID > lib/database.types.ts
Or for a local schema:
npx supabase gen types typescript --local > lib/database.types.ts