generate_typescript_types
Generate TypeScript types from a Supabase database schema using the Supabase CLI, saving the output file to a specified absolute path. Requires DATABASE_URL and Supabase CLI installed. Supports path formatting for win32, darwin, and linux platforms.
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. |