Generating TypeScript types for remote database
I want to generate types for the cloud database tables I have hosted with Supabase. In the docs, I saw this script:
The question is: How do I get this to use the types for tables in my remote database? When I ran the commands as seen above, it generated types for a new local database.
I haven't found a way to specificy which db I want to generate the types for in the Supabase docs.
2 Replies
Hi :vmathi: By default it checks your local database (
--local
). Check out the CLI command: https://supabase.com/docs/reference/cli/usage#supabase-gen-types-typescript
@janosch.hrmUsage | Supabase
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
Oh that makes a lot of sense, don't know why I didn't find that myself 🤦🏻♂️
Thank you so much!