generate_typescript_types
Generate TypeScript types from a Supabase database schema and save the file to a specified path. Requires DATABASE_URL configuration and Supabase CLI installation to streamline type generation for development projects.
Instructions
Generates TypeScript types from the database schema using the Supabase CLI (supabase gen types
) and downloads the file to the specified absolute path. The tool returns the current platform (win32, darwin, linux) to help with path formatting. Requires DATABASE_URL configuration and Supabase CLI installed.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
included_schemas | No | Database schemas to include in type generation. | |
output_filename | No | Filename to save the generated types to in the workspace root. | database.types.ts |
output_path | Yes | Absolute path where to download the generated TypeScript file. Examples: Windows: "C:\\path\\to\\project\\database.types.ts", macOS/Linux: "/path/to/project/database.types.ts". This parameter is required. |