supabase-typegen

Generate TypeScript types from Supabase database schemas via CLI.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/semicolon-devteam/semo --skill supabase-typegen
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: supabase-typegen
Source: https://github.com/semicolon-devteam/semo/tree/main/packages/eng/nextjs/skills/supabase-typegen
Command: npx skills add https://github.com/semicolon-devteam/semo --skill supabase-typegen

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill includes references (resource) components.

What problem does it solve?

Supabase CLIλ₯Ό μ‚¬μš©ν•΄ μ‹€μ œ DB μŠ€ν‚€λ§ˆμ™€ TypeScript νƒ€μž…μ„ μžλ™μœΌλ‘œ λ™κΈ°ν™”ν•©λ‹ˆλ‹€.

Core Features & Use Cases

  • νƒ€μž… 동기화 μžλ™ν™”: database.types.ts 파일 생성/μ—…λ°μ΄νŠΈ
  • 리포지토리/μ„œλΉ„μŠ€ 연계 확인: νƒ€μž… 일관성 점검 및 적용 κ°€μ΄λ“œ 제곡
  • 온-ν”„λ ˜/ν΄λΌμš°λ“œ 차이 처리: ν™˜κ²½λ³„ λ™μž‘ κ°€μ΄λ“œ 포함

Quick Start

Cloud ν™˜κ²½μ—μ„œ npx supabase gen types typescript --linkedλ₯Ό μ‹€ν–‰ν•˜μ—¬ νƒ€μž…μ„ μƒμ„±ν•˜κ³  λ³€κ²½ 내역을 ν™•μΈν•©λ‹ˆλ‹€.

Frequently Asked Questions about supabase-typegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep TypeScript types synchronized with my Supabase database schema?β–Ό

TypeScript type synchronization with Supabase uses the Supabase CLI to auto-generate types from your live database schema. Run `npx supabase gen types typescript --linked` to create or update your database.types.ts file whenever schema changes occur, ensuring type consistency across cloud and on-premise environments.

When should I regenerate TypeScript types from my Supabase schema?β–Ό

Regenerate types after adding tables or columns to your database schema, before implementing repository changes, or when deploying across environments. This automation prevents type mismatches and catches schema drift early by keeping your TypeScript definitions aligned with actual database structure.

Can I automate type generation across different Supabase environments?β–Ό

Yes, the Supabase CLI supports automated type generation for cloud environments through linked projects. On-premise Supabase instances require manual type definition steps, but the same CLI workflow applies once your environment is configured with proper credentials and database access.

How do I verify database schema changes before committing type updates?β–Ό

After running type generation, review diffs in your database.types.ts file to confirm schema changes are reflected correctly. The Skill provides recommended git commit steps and change verification guidance to ensure your TypeScript types accurately represent the updated database structure before merging.

What's the difference between linked and unlinked type generation in Supabase?β–Ό

Linked type generation connects your repository to a specific Supabase project, enabling automatic updates when schema changes. This approach maintains type consistency across team members and deployments by centralizing schema truth in your cloud project rather than managing types manually.