The Supabase CLI provides tools to develop your project locally and deploy to the Supabase Platform.
The CLI is still under development, but it contains all the functionality for working with your Supabase projects and the Supabase Platform.
Supabase CLI supports global flags for every command.
Flags
--debug
Optional
no type
output debug logs to stderr
--experimental
Optional
no type
enable experimental features
-h, --help
Optional
no type
help for supabase
--workdir <string>
Optional
no type
path to a Supabase project directory
$ supabase init
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.
supabase init
$ supabase login
Connect the Supabase CLI to your Supabase account by logging in with your personal access token.
Your access token is stored securely in native credentials storage. 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.
supabase login
$ supabase link
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.
Flags
-p, --password <string>
Optional
no type
Password to your remote Postgres database.
--project-ref <string>
REQUIRED
no type
Project ref of the Supabase project.
supabase link --project-ref ********************
$ supabase start
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.
Flags
-x, --exclude <strings>
Optional
no type
Names of containers to not start. [gotrue, realtime, storage-api, imgproxy, kong, inbucket, postgrest, pgadmin-schema-diff, migra, postgres-meta, studio, deno-relay]
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.
Flags
--include-raw-output
Optional
no type
Include raw output (useful for debugging).
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase domains activate
$ supabase domains create
Create a custom hostname for your Supabase project.
Expects your custom hostname to have a CNAME record to your Supabase project's subdomain.
Flags
--custom-hostname <string>
Optional
no type
The custom hostname to use for your Supabase project.
--include-raw-output
Optional
no type
Include raw output (useful for debugging).
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase domains create [flags]
$ supabase domains get
Retrieve the custom hostname config for your project, as stored in the Supabase platform.
Flags
--include-raw-output
Optional
no type
Include raw output (useful for debugging).
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase domains get
$ supabase domains reverify
Re-verify the custom hostname config for your project
Flags
--include-raw-output
Optional
no type
Include raw output (useful for debugging).
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase domains reverify
$ supabase domains delete
Deletes the custom hostname config for your project
Flags
--include-raw-output
Optional
no type
Include raw output (useful for debugging).
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase domains delete
$ supabase vanity-subdomains
Manage vanity subdomains for Supabase projects.
Usage of vanity subdomains and custom domains is mutually exclusive.
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.
Flags
--desired-subdomain <string>
Optional
no type
The desired vanity subdomain to use for your Supabase project.
--experimental
REQUIRED
no type
enable experimental features
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase vanity-subdomains activate [flags]
$ supabase vanity-subdomains get
Get the current vanity subdomain
Flags
--experimental
REQUIRED
no type
enable experimental features
--project-ref <string>
Optional
no type
Project ref of the Supabase project.
supabase vanity-subdomains get
$ supabase vanity-subdomains check-availability
Checks if a desired subdomain is available for use
Flags
--desired-subdomain <string>
Optional
no type
The desired vanity subdomain to use for your Supabase project.