Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update cli reference doc (#17551)

Copple364b9d5e1435
diff --git a/spec/cli_v1_commands.yaml b/spec/cli_v1_commands.yaml
index d65969c1698..2a2ef2dfd15 100644
--- a/spec/cli_v1_commands.yaml
+++ b/spec/cli_v1_commands.yaml
@@ -1,12 +1,12 @@
clispec: '001'
info:
id: cli
- version: 1.93.0
+ version: 1.100.1
title: Supabase CLI
language: sh
source: https://github.com/supabase/cli
bugs: https://github.com/supabase/cli/issues
- spec: https://github.com/supabase/supabase.tools/cli_spec/lib.yaml
+ spec: https://github.com/supabase/spec/cli_v1_commands.yaml
description: |
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
tags:
@@ -767,6 +767,43 @@ commands:
name: --project-ref <string>
description: Project ref of the Supabase project.
default_value: ''
+ - id: supabase-snippets
+ title: supabase snippets
+ summary: Manage Supabase SQL snippets
+ tags:
+ - management-api
+ links: []
+ subcommands:
+ - supabase-snippets-download
+ - supabase-snippets-list
+ flags: []
+ - id: supabase-snippets-list
+ title: supabase snippets list
+ summary: List all SQL snippets
+ description: List all SQL snippets of the linked project.
+ tags: []
+ links: []
+ usage: supabase snippets list
+ subcommands: []
+ flags: []
+ - id: supabase-snippets-download
+ title: supabase snippets download
+ summary: Download contents of a SQL snippet
+ description: Download contents of the specified SQL snippet.
+ tags: []
+ links: []
+ usage: supabase snippets download <snippet-id>
+ subcommands: []
+ flags: []
+ - id: supabase-services
+ title: supabase services
+ summary: Show versions of all Supabase services
+ tags:
+ - management-api
+ links: []
+ usage: supabase services
+ subcommands: []
+ flags: []
- id: supabase-secrets
title: supabase secrets
summary: Manage Supabase secrets
@@ -1140,10 +1177,23 @@ commands:
usage: supabase migration up [flags]
subcommands: []
flags:
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Applies migrations to the database specified by the connection string (must be percent-encoded).
+ default_value: ''
- id: include-all
name: --include-all
description: Include all migrations not found on remote history table.
default_value: 'false'
+ - id: linked
+ name: --linked
+ description: Applies pending migrations to the linked project.
+ default_value: 'false'
+ - id: local
+ name: --local
+ description: Applies pending migrations to the local database.
+ default_value: 'true'
- id: supabase-migration-squash
title: supabase migration squash
summary: Squash migrations to a single file
@@ -1154,12 +1204,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Squashes migrations of the database specified by the connection string (must be percent-encoded).
default_value: ''
- id: linked
name: --linked
- description: Update migration history of the linked project.
+ description: Squashes the migration history of the linked project.
default_value: 'false'
+ - id: local
+ name: --local
+ description: Squashes the migration history of the local database.
+ default_value: 'true'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
@@ -1227,8 +1282,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Repairs migrations of the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Repairs the migration history of the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Repairs the migration history of the local database.
+ default_value: 'false'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
@@ -1310,8 +1374,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Lists migrations of the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Lists migrations applied to the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Lists migrations applied to the local database.
+ default_value: 'false'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
@@ -1453,8 +1526,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-unused-indexes
title: supabase inspect db unused-indexes
summary: Show indexes with low usage
@@ -1474,8 +1556,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-total-table-sizes
title: supabase inspect db total-table-sizes
summary: Show total table sizes, including table index sizes
@@ -1497,8 +1588,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-total-index-size
title: supabase inspect db total-index-size
summary: Show total size of all indexes
@@ -1518,8 +1618,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-table-sizes
title: supabase inspect db table-sizes
summary: |
@@ -1545,8 +1654,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-table-record-counts
title: supabase inspect db table-record-counts
summary: Show estimated number of rows per table
@@ -1570,8 +1688,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-table-index-sizes
title: supabase inspect db table-index-sizes
summary: Show index sizes of individual tables
@@ -1595,8 +1722,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-seq-scans
title: supabase inspect db seq-scans
summary: Show number of sequential scans recorded against all tables
@@ -1622,8 +1758,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-role-connections
title: supabase inspect db role-connections
summary: Show number of active connections for all database roles
@@ -1667,8 +1812,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-replication-slots
title: supabase inspect db replication-slots
summary: Show information about replication slots on the database
@@ -1692,8 +1846,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-outliers
title: supabase inspect db outliers
summary: |
@@ -1721,8 +1884,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-long-running-queries
title: supabase inspect db long-running-queries
summary: |
@@ -1745,8 +1917,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-locks
title: supabase inspect db locks
summary: |
@@ -1769,8 +1950,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-index-usage
title: supabase inspect db index-usage
summary: Show information about the efficiency of indexes
@@ -1782,8 +1972,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-index-sizes
title: supabase inspect db index-sizes
summary: Show index sizes of individual indexes
@@ -1808,8 +2007,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-calls
title: supabase inspect db calls
summary: |
@@ -1836,8 +2044,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-cache-hit
title: supabase inspect db cache-hit
summary: Show cache hit rates for tables and indices
@@ -1862,8 +2079,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-blocking
title: supabase inspect db blocking
summary: |
@@ -1884,8 +2110,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-inspect-db-bloat
title: supabase inspect db bloat
summary: |
@@ -1911,8 +2146,17 @@ commands:
flags:
- id: db-url
name: --db-url <string>
- description: connect using the specified database url
+ description: |
+ Inspect the database specified by the connection string (must be percent-encoded).
default_value: ''
+ - id: linked
+ name: --linked
+ description: Inspect the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Inspect the local database.
+ default_value: 'false'
- id: supabase-init
title: supabase init
summary: Initialize a local project
@@ -2269,11 +2513,7 @@ commands:
links: []
usage: supabase db start
subcommands: []
- flags:
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
+ flags: []
- id: supabase-db-reset
title: supabase db reset
summary: Resets the local database to current migrations
@@ -2301,18 +2541,23 @@ commands:
usage: supabase db reset [flags]
subcommands: []
flags:
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Resets the database specified by the connection string (must be percent-encoded).
+ default_value: ''
- id: linked
name: --linked
description: Resets the linked project to current migrations.
default_value: 'false'
+ - id: local
+ name: --local
+ description: Resets the local database to current migrations.
+ default_value: 'true'
- id: version
name: --version <string>
description: Reset up to the specified version.
default_value: ''
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
- id: supabase-db-push
title: supabase db push
summary: Push new migrations to the remote database
@@ -2352,6 +2597,11 @@ commands:
usage: supabase db push [flags]
subcommands: []
flags:
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Pushes to the database specified by the connection string (must be percent-encoded).
+ default_value: ''
- id: dry-run
name: --dry-run
description: |
@@ -2369,14 +2619,18 @@ commands:
name: --include-seed
description: Include seed data from supabase/seed.sql.
default_value: 'false'
+ - id: linked
+ name: --linked
+ description: Pushes to the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Pushes to the local database.
+ default_value: 'false'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
default_value: ''
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
- id: supabase-db-pull
title: supabase db pull
summary: Pull schema from the remote database
@@ -2394,6 +2648,19 @@ commands:
usage: supabase db pull [flags]
subcommands: []
flags:
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Pulls from the database specified by the connection string (must be percent-encoded).
+ default_value: ''
+ - id: linked
+ name: --linked
+ description: Pulls from the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Pulls from the local database.
+ default_value: 'false'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
@@ -2402,10 +2669,6 @@ commands:
name: -s, --schema <strings>
description: List of schema to include.
default_value: all
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
- id: supabase-db-lint
title: supabase db lint
summary: Checks local database for typing error
@@ -2448,6 +2711,11 @@ commands:
usage: supabase db lint [flags]
subcommands: []
flags:
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Lints the database specified by the connection string (must be percent-encoded).
+ default_value: ''
- id: level
name: --level <[ warning | error ]>
description: Error level to emit.
@@ -2463,14 +2731,14 @@ commands:
name: --linked
description: Lints the linked project for schema errors.
default_value: 'false'
+ - id: local
+ name: --local
+ description: Lints the local database for schema errors.
+ default_value: 'true'
- id: schema
name: -s, --schema <strings>
description: List of schema to include.
default_value: all
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
- id: supabase-db-dump
title: supabase db dump
summary: Dumps data or schemas from the remote database
@@ -2511,9 +2779,14 @@ commands:
name: --data-only
description: Dumps only data records.
default_value: 'false'
+ - id: db-url
+ name: --db-url <string>
+ description: |
+ Dumps from the database specified by the connection string (must be percent-encoded).
+ default_value: ''
- id: dry-run
name: --dry-run
- description: Print the pg_dump script that would be executed.
+ description: Prints the pg_dump script that would be executed.
default_value: 'false'
- id: file
name: -f, --file <string>
@@ -2523,6 +2796,14 @@ commands:
name: --keep-comments
description: Keeps commented lines from pg_dump output.
default_value: 'false'
+ - id: linked
+ name: --linked
+ description: Dumps from the linked project.
+ default_value: 'true'
+ - id: local
+ name: --local
+ description: Dumps from the local database.
+ default_value: 'false'
- id: password
name: -p, --password <string>
description: Password to your remote Postgres database.
@@ -2539,10 +2820,6 @@ commands:
name: --use-copy
description: Uses copy statements in place of inserts.
default_value: 'false'
- - id: db-url
- name: --db-url <string>
- description: connect using the specified database url
- default_value: ''
- id: supabase-db-diff
title: supabase db diff
summary: Diffs the local database for schema changes
@@ -2602,7 +2879,7 @@ commands:
- id: db-url
name: --db-url <string>
description: |
- Diffs local migration files against the database specified by the connection string (must be percent-encoded).
+ Diffs against the database specified by the connection string (must be percent-encoded).
default_value: ''
- id: file
name: -f, --file <string>
diff --git a/spec/common-cli-sections.json b/spec/common-cli-sections.json
index c7edb36d212..ab342fefa6a 100644
--- a/spec/common-cli-sections.json
+++ b/spec/common-cli-sections.json
@@ -363,6 +363,18 @@
}
]
},
+ {
+ "type": "category",
+ "title": "Services",
+ "items": [
+ {
+ "id": "supabase-services",
+ "title": "Show versions of all Supabase services",
+ "slug": "supabase-services",
+ "type": "cli-command"
+ }
+ ]
+ },
{
"type": "category",
"title": "Branches",
@@ -735,6 +747,30 @@
}
]
},
+ {
+ "type": "category",
+ "title": "SQL Snippets",
+ "items": [
+ {
+ "id": "supabase-snippets",
+ "title": "Manage Supabase SQL snippets",
+ "slug": "supabase-snippets",
+ "type": "cli-command"
+ },
+ {
+ "id": "supabase-snippets-list",
+ "title": "List all SQL snippets",
+ "slug": "supabase-snippets-list",
+ "type": "cli-command"
+ },
+ {
+ "id": "supabase-snippets-download",
+ "title": "Download SQL snippet content",
+ "slug": "supabase-snippets-download",
+ "type": "cli-command"
+ }
+ ]
+ },
{
"type": "category",
"title": "Autocompletion Scripts",