mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
1223 lines
40 KiB
YAML
1223 lines
40 KiB
YAML
clispec: '001'
|
|
info:
|
|
id: cli
|
|
version: 1.34.5
|
|
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
|
|
description: |
|
|
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
|
|
tags:
|
|
- id: local-dev
|
|
title: Local Development
|
|
- id: management-api
|
|
title: Management APIs
|
|
- id: other-commands
|
|
title: Additional Commands
|
|
flags:
|
|
- id: debug
|
|
name: --debug
|
|
description: output debug logs to stderr
|
|
default_value: 'false'
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
default_value: 'false'
|
|
- id: help
|
|
name: -h, --help
|
|
description: help for supabase
|
|
default_value: 'false'
|
|
- id: workdir
|
|
name: --workdir <string>
|
|
description: path to a Supabase project directory
|
|
default_value: ''
|
|
commands:
|
|
- id: supabase-vanity-subdomains
|
|
title: supabase vanity-subdomains
|
|
summary: Manage vanity subdomains for Supabase projects
|
|
description: |-
|
|
Manage vanity subdomains for Supabase projects.
|
|
|
|
Usage of vanity subdomains and custom domains is mutually exclusive.
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-vanity-subdomains-activate
|
|
- supabase-vanity-subdomains-check-availability
|
|
- supabase-vanity-subdomains-delete
|
|
- supabase-vanity-subdomains-get
|
|
flags: []
|
|
- id: supabase-vanity-subdomains-get
|
|
title: supabase vanity-subdomains get
|
|
summary: Get the current vanity subdomain
|
|
tags: []
|
|
links: []
|
|
usage: supabase vanity-subdomains get
|
|
subcommands: []
|
|
flags:
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-vanity-subdomains-delete
|
|
title: supabase vanity-subdomains delete
|
|
summary: Deletes a project's vanity subdomain
|
|
description: |
|
|
Deletes the vanity subdomain for a project, and reverts to using the project ref for routing.
|
|
tags: []
|
|
links: []
|
|
usage: supabase vanity-subdomains delete
|
|
subcommands: []
|
|
flags:
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-vanity-subdomains-check-availability
|
|
title: supabase vanity-subdomains check-availability
|
|
summary: Checks if a desired subdomain is available for use
|
|
tags: []
|
|
links: []
|
|
usage: supabase vanity-subdomains check-availability [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: desired-subdomain
|
|
name: --desired-subdomain <string>
|
|
description: |
|
|
The desired vanity subdomain to use for your Supabase project.
|
|
default_value: ''
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-vanity-subdomains-activate
|
|
title: supabase vanity-subdomains activate
|
|
summary: Activate a vanity subdomain
|
|
description: |
|
|
Activate a vanity subdomain for your Supabase project.
|
|
|
|
This reconfigures your Supabase project to respond to requests on your vanity subdomain.
|
|
After the vanity subdomain is activated, your project's auth services will no longer function on the {project-ref}.{supabase-domain} hostname.
|
|
tags: []
|
|
links: []
|
|
usage: supabase vanity-subdomains activate [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: desired-subdomain
|
|
name: --desired-subdomain <string>
|
|
description: |
|
|
The desired vanity subdomain to use for your Supabase project.
|
|
default_value: ''
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-test
|
|
title: supabase test
|
|
summary: Run tests on local Supabase containers
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
subcommands:
|
|
- supabase-test-db
|
|
flags: []
|
|
- id: supabase-test-db
|
|
title: supabase test db
|
|
summary: Tests local database with pgTAP
|
|
tags: []
|
|
links: []
|
|
usage: supabase test db
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-stop
|
|
title: supabase stop
|
|
summary: Stop all local Supabase containers
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase stop
|
|
response: |
|
|
Stopped supabase local development setup.
|
|
- id: with-backup
|
|
name: Backup local database before stopping
|
|
code: supabase stop --backup
|
|
response: |
|
|
Database exported to supabase/.branches/main
|
|
Stopped supabase local development setup.
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase stop [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: backup
|
|
name: --backup
|
|
description: Backs up the current database before stopping.
|
|
default_value: 'false'
|
|
- id: supabase-status
|
|
title: supabase status
|
|
summary: Show status of local Supabase containers
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase status
|
|
response: |
|
|
supabase local development setup is running.
|
|
|
|
API URL: http://localhost:54321
|
|
DB URL: postgresql://postgres:postgres@localhost:54322/postgres
|
|
Studio URL: http://localhost:54323
|
|
Inbucket URL: http://localhost:54324
|
|
JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
|
|
anon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
|
|
service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
|
|
- id: output-env
|
|
name: Format status as environment variables
|
|
code: supabase status -o env
|
|
response: |
|
|
ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
|
|
API_URL="http://localhost:54321"
|
|
DB_URL="postgresql://postgres:postgres@localhost:54322/postgres"
|
|
INBUCKET_URL="http://localhost:54324"
|
|
JWT_SECRET="super-secret-jwt-token-with-at-least-32-characters-long"
|
|
SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU"
|
|
STUDIO_URL="http://localhost:54323"
|
|
- id: output-custom-name
|
|
name: Customize the names of exported variables
|
|
code: supabase status -o env --override-name auth.anon_key=SUPABASE_ANON_KEY --override-name auth.service_role_key=SUPABASE_SERVICE_KEY
|
|
response: |
|
|
Stopped services: [supabase_inbucket_cli supabase_rest_cli supabase_studio_cli]
|
|
SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
|
|
DB_URL="postgresql://postgres:postgres@localhost:54322/postgres"
|
|
JWT_SECRET="super-secret-jwt-token-with-at-least-32-characters-long"
|
|
SUPABASE_SERVICE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU"
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase status [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: output
|
|
name: -o, --output <[ env | json | pretty | toml | yaml ]>
|
|
description: Output format of status variables.
|
|
default_value: pretty
|
|
accepted_values:
|
|
- id: env
|
|
name: env
|
|
type: '[ env | json | pretty | toml | yaml ]'
|
|
- id: json
|
|
name: json
|
|
type: '[ env | json | pretty | toml | yaml ]'
|
|
- id: pretty
|
|
name: pretty
|
|
type: '[ env | json | pretty | toml | yaml ]'
|
|
- id: toml
|
|
name: toml
|
|
type: '[ env | json | pretty | toml | yaml ]'
|
|
- id: yaml
|
|
name: yaml
|
|
type: '[ env | json | pretty | toml | yaml ]'
|
|
- id: override-name
|
|
name: --override-name <strings>
|
|
description: Override specific variable names.
|
|
default_value: '[]'
|
|
- id: supabase-start
|
|
title: supabase start
|
|
summary: Start containers for Supabase local development
|
|
description: |2
|
|
|
|
Starts the Supabase local development stack.
|
|
|
|
Requires `supabase/config.toml` to be created in your current working directory by running `supabase init`.
|
|
|
|
All service containers are started by default. You can exclude those not needed by passing in `-x` flag.
|
|
|
|
Health checks are automatically added to verify the started containers. Use `--ignore-health-check` flag to ignore these errors.
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase start
|
|
response: |
|
|
Applying migration 20220810154536_employee.sql...
|
|
Seeding data supabase/seed.sql...
|
|
Started supabase local development setup.
|
|
- id: without-studio
|
|
name: Start containers without studio
|
|
code: supabase start -x studio
|
|
response: |
|
|
Excluding container: supabase/studio:20221214-4eecc99
|
|
Seeding data supabase/seed.sql...
|
|
Started supabase local development setup.
|
|
- id: ignore-health-check
|
|
name: Ignore service health checks
|
|
code: supabase start --ignore-health-check
|
|
response: |
|
|
Seeding data supabase/seed.sql...
|
|
service not healthy: [supabase_storage_cli]
|
|
Started supabase local development setup.
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase start [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: exclude
|
|
name: -x, --exclude <strings>
|
|
description: |
|
|
Names of containers to not start. [gotrue, realtime, storage-api, imgproxy, kong, inbucket, postgrest, pgadmin-schema-diff, migra, postgres-meta, studio, deno-relay]
|
|
default_value: '[]'
|
|
- id: ignore-health-check
|
|
name: --ignore-health-check
|
|
description: Ignore unhealthy services and exit 0
|
|
default_value: 'false'
|
|
- id: supabase-secrets
|
|
title: supabase secrets
|
|
summary: Manage Supabase secrets
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-secrets-list
|
|
- supabase-secrets-set
|
|
- supabase-secrets-unset
|
|
flags: []
|
|
- id: supabase-secrets-unset
|
|
title: supabase secrets unset
|
|
summary: Unset a secret(s) on Supabase
|
|
description: Unset a secret(s) from the linked Supabase project.
|
|
tags: []
|
|
links: []
|
|
usage: supabase secrets unset <NAME> ...
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-secrets-set
|
|
title: supabase secrets set
|
|
summary: Set a secret(s) on Supabase
|
|
description: Set a secret(s) to the linked Supabase project.
|
|
tags: []
|
|
links: []
|
|
usage: supabase secrets set [flags] <NAME=VALUE> ...
|
|
subcommands: []
|
|
flags:
|
|
- id: env-file
|
|
name: --env-file <string>
|
|
description: Read secrets from a .env file.
|
|
default_value: ''
|
|
- id: supabase-secrets-list
|
|
title: supabase secrets list
|
|
summary: List all secrets on Supabase
|
|
description: List all secrets in the linked project.
|
|
tags: []
|
|
links: []
|
|
usage: supabase secrets list
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-projects
|
|
title: supabase projects
|
|
summary: Manage Supabase projects
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-projects-create
|
|
- supabase-projects-list
|
|
flags: []
|
|
- id: supabase-projects-list
|
|
title: supabase projects list
|
|
summary: List all Supabase projects
|
|
description: List all Supabase projects the logged-in user can access.
|
|
tags: []
|
|
links: []
|
|
usage: supabase projects list
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-projects-create
|
|
title: supabase projects create
|
|
summary: Create a project on Supabase
|
|
tags: []
|
|
links: []
|
|
usage: supabase projects create <project name> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: db-password
|
|
name: --db-password <string>
|
|
description: Database password of the project.
|
|
default_value: ''
|
|
- id: interactive
|
|
name: -i, --interactive
|
|
description: Enables interactive mode.
|
|
default_value: 'false'
|
|
- id: org-id
|
|
name: --org-id <string>
|
|
description: Organization ID to create the project in.
|
|
default_value: ''
|
|
- id: plan
|
|
name: --plan <[ free | pro ]>
|
|
description: Select a plan that suits your needs.
|
|
default_value: free
|
|
accepted_values:
|
|
- id: free
|
|
name: free
|
|
type: '[ free | pro ]'
|
|
- id: pro
|
|
name: pro
|
|
type: '[ free | pro ]'
|
|
- id: region
|
|
name: --region <string>
|
|
description: Select a region close to you for the best performance.
|
|
default_value: ''
|
|
accepted_values:
|
|
- id: ap-northeast-1
|
|
name: ap-northeast-1
|
|
type: string
|
|
- id: ap-northeast-2
|
|
name: ap-northeast-2
|
|
type: string
|
|
- id: ap-south-1
|
|
name: ap-south-1
|
|
type: string
|
|
- id: ap-southeast-1
|
|
name: ap-southeast-1
|
|
type: string
|
|
- id: ap-southeast-2
|
|
name: ap-southeast-2
|
|
type: string
|
|
- id: ca-central-1
|
|
name: ca-central-1
|
|
type: string
|
|
- id: eu-central-1
|
|
name: eu-central-1
|
|
type: string
|
|
- id: eu-west-1
|
|
name: eu-west-1
|
|
type: string
|
|
- id: eu-west-2
|
|
name: eu-west-2
|
|
type: string
|
|
- id: eu-west-3
|
|
name: eu-west-3
|
|
type: string
|
|
- id: sa-east-1
|
|
name: sa-east-1
|
|
type: string
|
|
- id: us-east-1
|
|
name: us-east-1
|
|
type: string
|
|
- id: us-west-1
|
|
name: us-west-1
|
|
type: string
|
|
- id: supabase-orgs
|
|
title: supabase orgs
|
|
summary: Manage Supabase organizations
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-orgs-list
|
|
flags: []
|
|
- id: supabase-orgs-list
|
|
title: supabase orgs list
|
|
summary: List all organizations
|
|
description: List all organizations the logged-in user belongs.
|
|
tags: []
|
|
links: []
|
|
usage: supabase orgs list
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-network-restrictions
|
|
title: supabase network-restrictions
|
|
summary: Manage network restrictions
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-network-restrictions-get
|
|
- supabase-network-restrictions-update
|
|
flags: []
|
|
- id: supabase-network-restrictions-update
|
|
title: supabase network-restrictions update
|
|
summary: Update network restrictions
|
|
tags: []
|
|
links: []
|
|
usage: supabase network-restrictions update [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: bypass-cidr-checks
|
|
name: --bypass-cidr-checks
|
|
description: Bypass some of the CIDR validation checks.
|
|
default_value: 'false'
|
|
- id: db-allow-cidr
|
|
name: --db-allow-cidr <strings>
|
|
description: CIDR to allow DB connections from.
|
|
default_value: '[]'
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-network-restrictions-get
|
|
title: supabase network-restrictions get
|
|
summary: Get the current network restrictions
|
|
tags: []
|
|
links: []
|
|
usage: supabase network-restrictions get
|
|
subcommands: []
|
|
flags:
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-network-bans
|
|
title: supabase network-bans
|
|
summary: Manage network bans
|
|
description: |-
|
|
Network bans are IPs that get temporarily blocked if their traffic pattern looks abusive (e.g. multiple failed auth attempts).
|
|
|
|
The subcommands help you view the current bans, and unblock IPs if desired.
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-network-bans-get
|
|
- supabase-network-bans-remove
|
|
flags: []
|
|
- id: supabase-network-bans-remove
|
|
title: supabase network-bans remove
|
|
summary: Remove a network ban
|
|
tags: []
|
|
links: []
|
|
usage: supabase network-bans remove [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: db-unban-ip
|
|
name: --db-unban-ip <strings>
|
|
description: IP to allow DB connections from.
|
|
default_value: '[]'
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-network-bans-get
|
|
title: supabase network-bans get
|
|
summary: Get the current network bans
|
|
tags: []
|
|
links: []
|
|
usage: supabase network-bans get
|
|
subcommands: []
|
|
flags:
|
|
- id: experimental
|
|
name: --experimental
|
|
description: enable experimental features
|
|
required: true
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-migration
|
|
title: supabase migration
|
|
summary: Manage database migration scripts
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
subcommands:
|
|
- supabase-migration-list
|
|
- supabase-migration-new
|
|
- supabase-migration-repair
|
|
flags: []
|
|
- id: supabase-migration-repair
|
|
title: supabase migration repair
|
|
summary: Repairs the migration history table
|
|
tags: []
|
|
links: []
|
|
usage: supabase migration repair <version> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: status
|
|
name: --status <[ applied | reverted ]>
|
|
description: Version status to update.
|
|
required: true
|
|
default_value: ''
|
|
accepted_values:
|
|
- id: applied
|
|
name: applied
|
|
type: '[ applied | reverted ]'
|
|
- id: reverted
|
|
name: reverted
|
|
type: '[ applied | reverted ]'
|
|
- id: supabase-migration-new
|
|
title: supabase migration new
|
|
summary: Create an empty migration script
|
|
tags: []
|
|
links: []
|
|
usage: supabase migration new <migration name>
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-migration-list
|
|
title: supabase migration list
|
|
summary: List local and remote migrations
|
|
tags: []
|
|
links: []
|
|
usage: supabase migration list [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: supabase-login
|
|
title: supabase login
|
|
summary: Authenticate using an access token
|
|
description: |2
|
|
|
|
Connect the Supabase CLI to your Supabase account by logging in with your [personal access token](https://app.supabase.com/account/tokens).
|
|
|
|
Your access token is stored securely in [native credentials storage](https://github.com/zalando/go-keyring#dependencies). If native credentials storage is unavailable, it will be written to a plain text file at `~/.supabase/access-token`.
|
|
|
|
> If this behavior is not desired, such as in a CI environment, you may skip login by specifying the `SUPABASE_ACCESS_TOKEN` environment variable in other commands.
|
|
|
|
The Supabase CLI uses the stored token to access Management APIs for projects, functions, secrets, etc.
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase login
|
|
response: |
|
|
You can generate an access token from https://app.supabase.com/account/tokens
|
|
Enter your access token: sbp_****************************************
|
|
Finished supabase login.
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase login
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-link
|
|
title: supabase link
|
|
summary: Link to a Supabase project
|
|
description: |2
|
|
|
|
Link your local development project to a hosted Supabase project.
|
|
|
|
PostgREST configurations are fetched from the Supabase platform and validated against your local configuration file.
|
|
|
|
Optionally, database settings can be validated if you provide a password. Your database password is saved in native credentials storage if available.
|
|
|
|
Some commands like `db dump`, `db push`, and `db remote commit` require your project to be linked first.
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase link --project-ref ********************
|
|
response: |
|
|
Enter your database password: ********
|
|
Finished supabase link.
|
|
- id: without-password
|
|
name: Link without database password
|
|
code: supabase link --project-ref ******************** <<< ""
|
|
response: |
|
|
Enter your database password:
|
|
Finished supabase link.
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase link [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
required: true
|
|
default_value: ''
|
|
- id: supabase-init
|
|
title: supabase init
|
|
summary: Initialize a local project
|
|
description: |2
|
|
|
|
Initialize configurations for Supabase local development.
|
|
|
|
A `supabase/config.toml` file is created in your current working directory. This configuration is specific to each local project.
|
|
|
|
> You may override the directory path by specifying the `SUPABASE_WORKDIR` environment variable.
|
|
|
|
In addition to `config.toml`, the `supabase` directory may also contain other Supabase objects, such as `migrations`, `functions`, `tests`, etc.
|
|
examples:
|
|
- id: basic-usage
|
|
name: Basic usage
|
|
code: supabase init
|
|
response: Finished supabase init.
|
|
- id: from-workdir
|
|
name: Initialize from an existing directory
|
|
code: supabase init --workdir .
|
|
response: Finished supabase init.
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
usage: supabase init
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-gen
|
|
title: supabase gen
|
|
summary: Run code generation tools
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
subcommands:
|
|
- supabase-gen-types
|
|
flags: []
|
|
- id: supabase-gen-types
|
|
title: supabase gen types
|
|
summary: Generate types from Postgres schema
|
|
tags: []
|
|
links: []
|
|
subcommands:
|
|
- supabase-gen-types-typescript
|
|
flags: []
|
|
- id: supabase-gen-types-typescript
|
|
title: supabase gen types typescript
|
|
summary: Generate types for TypeScript
|
|
description: |
|
|
Generate types for TypeScript. Must specify one of --local, --linked, --project-id, or --db-url
|
|
tags: []
|
|
links: []
|
|
usage: supabase gen types typescript [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: db-url
|
|
name: --db-url <string>
|
|
description: Generate types from a database url.
|
|
default_value: ''
|
|
- id: linked
|
|
name: --linked
|
|
description: Generate types from the linked project.
|
|
default_value: 'false'
|
|
- id: local
|
|
name: --local
|
|
description: Generate types from the local dev database.
|
|
default_value: 'false'
|
|
- id: project-id
|
|
name: --project-id <string>
|
|
description: Generate types from a project ID.
|
|
default_value: ''
|
|
- id: schema
|
|
name: --schema <stringArray>
|
|
description: Schemas to generate types for.
|
|
default_value: '[]'
|
|
- id: supabase-functions
|
|
title: supabase functions
|
|
summary: Manage Supabase Edge functions
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-functions-delete
|
|
- supabase-functions-deploy
|
|
- supabase-functions-download
|
|
- supabase-functions-new
|
|
- supabase-functions-serve
|
|
flags: []
|
|
- id: supabase-functions-serve
|
|
title: supabase functions serve
|
|
summary: Serve a Function locally
|
|
tags: []
|
|
links: []
|
|
usage: supabase functions serve <Function name> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: env-file
|
|
name: --env-file <string>
|
|
description: |
|
|
Path to an env file to be populated to the Function environment.
|
|
default_value: ''
|
|
- id: import-map
|
|
name: --import-map <string>
|
|
description: Path to import map file.
|
|
default_value: ''
|
|
- id: no-verify-jwt
|
|
name: --no-verify-jwt
|
|
description: Disable JWT verification for the Function.
|
|
default_value: 'false'
|
|
- id: supabase-functions-new
|
|
title: supabase functions new
|
|
summary: Create a new Function locally
|
|
tags: []
|
|
links: []
|
|
usage: supabase functions new <Function name>
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-functions-download
|
|
title: supabase functions download
|
|
summary: Download a Function from Supabase
|
|
description: |
|
|
Download the source code for a Function from the linked Supabase project.
|
|
tags: []
|
|
links: []
|
|
usage: supabase functions download <Function name> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-functions-deploy
|
|
title: supabase functions deploy
|
|
summary: Deploy a Function to Supabase
|
|
description: Deploy a Function to the linked Supabase project.
|
|
tags: []
|
|
links: []
|
|
usage: supabase functions deploy <Function name> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: import-map
|
|
name: --import-map <string>
|
|
description: Path to import map file.
|
|
default_value: ''
|
|
- id: legacy-bundle
|
|
name: --legacy-bundle
|
|
description: Use legacy bundling mechanism.
|
|
default_value: 'false'
|
|
- id: no-verify-jwt
|
|
name: --no-verify-jwt
|
|
description: Disable JWT verification for the Function.
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-functions-delete
|
|
title: supabase functions delete
|
|
summary: Delete a Function from Supabase
|
|
description: |
|
|
Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
|
|
tags: []
|
|
links: []
|
|
usage: supabase functions delete <Function name> [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-domains
|
|
title: supabase domains
|
|
summary: Manage custom domain names for Supabase projects
|
|
description: |
|
|
Manage custom domain names for Supabase projects.
|
|
|
|
Use of custom domains and vanity subdomains is mutually exclusive.
|
|
tags:
|
|
- management-api
|
|
links: []
|
|
subcommands:
|
|
- supabase-domains-activate
|
|
- supabase-domains-create
|
|
- supabase-domains-delete
|
|
- supabase-domains-get
|
|
- supabase-domains-reverify
|
|
flags: []
|
|
- id: supabase-domains-reverify
|
|
title: supabase domains reverify
|
|
summary: Re-verify the custom hostname config for your project
|
|
tags: []
|
|
links: []
|
|
usage: supabase domains reverify
|
|
subcommands: []
|
|
flags:
|
|
- id: include-raw-output
|
|
name: --include-raw-output
|
|
description: Include raw output (useful for debugging).
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-domains-get
|
|
title: supabase domains get
|
|
summary: Get the current custom hostname config
|
|
description: |
|
|
Retrieve the custom hostname config for your project, as stored in the Supabase platform.
|
|
tags: []
|
|
links: []
|
|
usage: supabase domains get
|
|
subcommands: []
|
|
flags:
|
|
- id: include-raw-output
|
|
name: --include-raw-output
|
|
description: Include raw output (useful for debugging).
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-domains-delete
|
|
title: supabase domains delete
|
|
summary: Deletes the custom hostname config for your project
|
|
tags: []
|
|
links: []
|
|
usage: supabase domains delete
|
|
subcommands: []
|
|
flags:
|
|
- id: include-raw-output
|
|
name: --include-raw-output
|
|
description: Include raw output (useful for debugging).
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-domains-create
|
|
title: supabase domains create
|
|
summary: Create a custom hostname
|
|
description: |-
|
|
Create a custom hostname for your Supabase project.
|
|
|
|
Expects your custom hostname to have a CNAME record to your Supabase project's subdomain.
|
|
tags: []
|
|
links: []
|
|
usage: supabase domains create [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: custom-hostname
|
|
name: --custom-hostname <string>
|
|
description: The custom hostname to use for your Supabase project.
|
|
default_value: ''
|
|
- id: include-raw-output
|
|
name: --include-raw-output
|
|
description: Include raw output (useful for debugging).
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-domains-activate
|
|
title: supabase domains activate
|
|
summary: Activate the custom hostname for a project
|
|
description: |-
|
|
Activates the custom hostname configuration for a project.
|
|
|
|
This reconfigures your Supabase project to respond to requests on your custom hostname.
|
|
After the custom hostname is activated, your project's auth services will no longer function on the Supabase-provisioned subdomain.
|
|
tags: []
|
|
links: []
|
|
usage: supabase domains activate
|
|
subcommands: []
|
|
flags:
|
|
- id: include-raw-output
|
|
name: --include-raw-output
|
|
description: Include raw output (useful for debugging).
|
|
default_value: 'false'
|
|
- id: project-ref
|
|
name: --project-ref <string>
|
|
description: Project ref of the Supabase project.
|
|
default_value: ''
|
|
- id: supabase-db
|
|
title: supabase db
|
|
summary: Manage local Postgres databases
|
|
tags:
|
|
- local-dev
|
|
links: []
|
|
subcommands:
|
|
- supabase-db-diff
|
|
- supabase-db-dump
|
|
- supabase-db-lint
|
|
- supabase-db-push
|
|
- supabase-db-remote
|
|
- supabase-db-reset
|
|
- supabase-db-start
|
|
flags: []
|
|
- id: supabase-db-start
|
|
title: supabase db start
|
|
summary: Starts local Postgres database
|
|
tags: []
|
|
links: []
|
|
usage: supabase db start
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-db-reset
|
|
title: supabase db reset
|
|
summary: Resets the local database to current migrations
|
|
tags: []
|
|
links: []
|
|
usage: supabase db reset
|
|
subcommands: []
|
|
flags: []
|
|
- id: supabase-db-remote
|
|
title: supabase db remote
|
|
summary: Manage remote databases
|
|
tags: []
|
|
links: []
|
|
subcommands:
|
|
- supabase-db-remote-commit
|
|
flags: []
|
|
- id: supabase-db-remote-commit
|
|
title: supabase db remote commit
|
|
summary: Commit remote changes as a new migration
|
|
tags: []
|
|
links: []
|
|
usage: supabase db remote commit
|
|
subcommands: []
|
|
flags:
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: schema
|
|
name: -s, --schema <strings>
|
|
description: List of schema to include.
|
|
default_value: all
|
|
- id: supabase-db-push
|
|
title: supabase db push
|
|
summary: Push new migrations to the remote database
|
|
tags: []
|
|
links: []
|
|
usage: supabase db push [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: dry-run
|
|
name: --dry-run
|
|
description: |
|
|
Print the migrations that would be applied, but don't actually apply them.
|
|
default_value: 'false'
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: supabase-db-lint
|
|
title: supabase db lint
|
|
summary: Checks local database for typing error
|
|
tags: []
|
|
links: []
|
|
usage: supabase db lint [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: level
|
|
name: --level <[ warning | error ]>
|
|
description: Error level to emit.
|
|
default_value: warning
|
|
accepted_values:
|
|
- id: warning
|
|
name: warning
|
|
type: '[ warning | error ]'
|
|
- id: error
|
|
name: error
|
|
type: '[ warning | error ]'
|
|
- id: schema
|
|
name: -s, --schema <strings>
|
|
description: List of schema to include.
|
|
default_value: all
|
|
- id: supabase-db-dump
|
|
title: supabase db dump
|
|
summary: Dumps schemas from the remote database
|
|
tags: []
|
|
links: []
|
|
usage: supabase db dump [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: file
|
|
name: -f, --file <string>
|
|
description: File path to save the dumped schema.
|
|
default_value: ''
|
|
- id: password
|
|
name: -p, --password <string>
|
|
description: Password to your remote Postgres database.
|
|
default_value: ''
|
|
- id: supabase-db-diff
|
|
title: supabase db diff
|
|
summary: Diffs the local database for schema changes
|
|
tags: []
|
|
links: []
|
|
usage: supabase db diff [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: file
|
|
name: -f, --file <string>
|
|
description: Saves schema diff to a new migration file.
|
|
default_value: ''
|
|
- id: linked
|
|
name: --linked
|
|
description: Diffs local schema against linked project.
|
|
default_value: 'false'
|
|
- id: schema
|
|
name: -s, --schema <strings>
|
|
description: List of schema to include.
|
|
default_value: all
|
|
- id: use-migra
|
|
name: --use-migra
|
|
description: Use migra to generate schema diff.
|
|
default_value: 'true'
|
|
- id: use-pgadmin
|
|
name: --use-pgadmin
|
|
description: Use pgAdmin to generate schema diff.
|
|
default_value: 'false'
|
|
- id: supabase-completion
|
|
title: supabase completion
|
|
summary: Generate the autocompletion script for the specified shell
|
|
description: |
|
|
Generate the autocompletion script for supabase for the specified shell.
|
|
See each sub-command's help for details on how to use the generated script.
|
|
tags:
|
|
- other-commands
|
|
links: []
|
|
subcommands:
|
|
- supabase-completion-bash
|
|
- supabase-completion-fish
|
|
- supabase-completion-powershell
|
|
- supabase-completion-zsh
|
|
flags: []
|
|
- id: supabase-completion-zsh
|
|
title: supabase completion zsh
|
|
summary: Generate the autocompletion script for zsh
|
|
description: |
|
|
Generate the autocompletion script for the zsh shell.
|
|
|
|
If shell completion is not already enabled in your environment you will need
|
|
to enable it. You can execute the following once:
|
|
|
|
echo "autoload -U compinit; compinit" >> ~/.zshrc
|
|
|
|
To load completions in your current shell session:
|
|
|
|
source <(supabase completion zsh); compdef _supabase supabase
|
|
|
|
To load completions for every new session, execute once:
|
|
|
|
#### Linux:
|
|
|
|
supabase completion zsh > "${fpath[1]}/_supabase"
|
|
|
|
#### macOS:
|
|
|
|
supabase completion zsh > $(brew --prefix)/share/zsh/site-functions/_supabase
|
|
|
|
You will need to start a new shell for this setup to take effect.
|
|
tags: []
|
|
links: []
|
|
usage: supabase completion zsh [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: no-descriptions
|
|
name: --no-descriptions
|
|
description: disable completion descriptions
|
|
default_value: 'false'
|
|
- id: supabase-completion-powershell
|
|
title: supabase completion powershell
|
|
summary: Generate the autocompletion script for powershell
|
|
description: |
|
|
Generate the autocompletion script for powershell.
|
|
|
|
To load completions in your current shell session:
|
|
|
|
supabase completion powershell | Out-String | Invoke-Expression
|
|
|
|
To load completions for every new session, add the output of the above command
|
|
to your powershell profile.
|
|
tags: []
|
|
links: []
|
|
usage: supabase completion powershell [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: no-descriptions
|
|
name: --no-descriptions
|
|
description: disable completion descriptions
|
|
default_value: 'false'
|
|
- id: supabase-completion-fish
|
|
title: supabase completion fish
|
|
summary: Generate the autocompletion script for fish
|
|
description: |
|
|
Generate the autocompletion script for the fish shell.
|
|
|
|
To load completions in your current shell session:
|
|
|
|
supabase completion fish | source
|
|
|
|
To load completions for every new session, execute once:
|
|
|
|
supabase completion fish > ~/.config/fish/completions/supabase.fish
|
|
|
|
You will need to start a new shell for this setup to take effect.
|
|
tags: []
|
|
links: []
|
|
usage: supabase completion fish [flags]
|
|
subcommands: []
|
|
flags:
|
|
- id: no-descriptions
|
|
name: --no-descriptions
|
|
description: disable completion descriptions
|
|
default_value: 'false'
|
|
- id: supabase-completion-bash
|
|
title: supabase completion bash
|
|
summary: Generate the autocompletion script for bash
|
|
description: |
|
|
Generate the autocompletion script for the bash shell.
|
|
|
|
This script depends on the 'bash-completion' package.
|
|
If it is not installed already, you can install it via your OS's package manager.
|
|
|
|
To load completions in your current shell session:
|
|
|
|
source <(supabase completion bash)
|
|
|
|
To load completions for every new session, execute once:
|
|
|
|
#### Linux:
|
|
|
|
supabase completion bash > /etc/bash_completion.d/supabase
|
|
|
|
#### macOS:
|
|
|
|
supabase completion bash > $(brew --prefix)/etc/bash_completion.d/supabase
|
|
|
|
You will need to start a new shell for this setup to take effect.
|
|
tags: []
|
|
links: []
|
|
usage: supabase completion bash
|
|
subcommands: []
|
|
flags:
|
|
- id: no-descriptions
|
|
name: --no-descriptions
|
|
description: disable completion descriptions
|
|
default_value: 'false'
|