© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
janosch.hrm

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:
supabase start
supabase gen types typescript --local > lib/database.types.ts
supabase start
supabase gen types typescript --local > lib/database.types.ts


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.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Database. TypeScript no static types when fetching...
SupabaseSSupabase / help-and-questions
14mo ago
How can I download the types for by Database for TypeScript?
SupabaseSSupabase / help-and-questions
2mo ago
Error when generating types
SupabaseSSupabase / help-and-questions
4y ago
Generating a database diagram
SupabaseSSupabase / help-and-questions
3y ago