Canonical: https://weaveos.com/reference/supabase/generate-typescript-database-types

1. [Software capabilities](https://weaveos.com/reference)
2. /[Supabase](https://weaveos.com/reference/supabase)
3. /Generate TypeScript types from a Supabase schema

[![](https://weaveos.com/reference/logos/supabase.svg)Supabase](https://weaveos.com/reference/supabase)

# Generate TypeScript types from a Supabase schema

Generate types from your database schema in the Supabase dashboard or with the CLI. Use them with supabase-js for typed queries and inserts.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1Interface: Supabase project dashboard → Generate TypeScript types](https://weaveos.com/reference/supabase/generate-typescript-database-types#method-1)
2. [2CLI: supabase gen types typescript --remote](https://weaveos.com/reference/supabase/generate-typescript-database-types#method-2)

Interface

### Supabase project dashboard → Generate TypeScript types

Generate and download TypeScript definitions for the selected project schema.

[Read source: Supabase generating TypeScript types](https://supabase.com/docs/guides/api/rest/generating-types)

- Requirements

  Dashboard access to the Supabase project and its schema documentation.

- Limitations

  The output reflects the project schema at generation time. Regenerate it after relevant schema changes.

CLI

### supabase gen types typescript --remote

Write generated definitions from a remote project schema to a TypeScript file.

[Read source: Supabase CLI type generation workflow](https://supabase.com/docs/guides/local-development/cli-workflows#generating-types)

- Requirements

  The Supabase CLI, an initialized project, CLI login with a personal access token, and a project reference or linked project.

- Limitations

  Generation queries the selected schema. Set --schema to include the schemas your application uses, then regenerate after schema changes.

Example shell

Copy

```
npx supabase gen types typescript --remote="$PROJECT_REF" --schema public > database.types.ts
```

## More from Supabase

[View all 1 Supabase tasks](https://weaveos.com/reference/supabase)
