added CLI example for generating types with self-hosted instance

Docs Update. Added a example for generating types with self-hosted
instance.

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
This commit is contained in:
Chris PraasandChris Chinchilla authored and GitHub committed 2026-02-26 12:20:29 +01:00
1 parent c159a2d964
commit e1b51dff81
1 file changed
+6
@@ -46,6 +46,12 @@ or in case of local development:
npx supabase gen types typescript --local > database.types.ts
```
or in case of a self-hosted instance (see [Accessing Postgres](/docs/guides/self-hosting/docker#accessing-postgres) for more information):
```bash
npx supabase gen types typescript --db-url postgres://postgres.[POOLER_TENANT_ID]:[POSTGRES_PASSWORD]@[your-domain-or-ip]:5432/postgres --schema public > database.types.ts
```
These types are generated from your database schema. Given a table `public.movies`, the generated types will look like:
```sql