---
id: usage
slug: /usage
title: Usage
toc_max_heading_level: 3
---
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
### Stop all local Supabase containers {#supabase-stop}
```sh
supabase stop [flags]
```
**Options**
```sh
-h, --help help for stop
```
### Show status of local Supabase containers {#supabase-status}
```sh
supabase status [flags]
```
**Options**
```sh
-h, --help help for status
```
### Start containers for Supabase local development {#supabase-start}
```sh
supabase start [flags]
```
**Options**
```sh
-h, --help help for start
```
## Manage Supabase secrets {#supabase-secrets}
**Available Commands**
-
supabase secrets list
-
supabase secrets set
-
supabase secrets unset
**Options**
```sh
-h, --help help for secrets
```
### Unset a secret(s) on Supabase {#supabase-secrets-unset}
Unset a secret(s) from the linked Supabase project.
```sh
supabase secrets unset ... [flags]
```
**Options**
```sh
-h, --help help for unset
```
### Set a secret(s) on Supabase {#supabase-secrets-set}
Set a secret(s) to the linked Supabase project.
```sh
supabase secrets set [flags] ...
```
**Options**
```sh
--env-file string Read secrets from a .env file.
-h, --help help for set
```
### List all secrets on Supabase {#supabase-secrets-list}
List all secrets in the linked project.
```sh
supabase secrets list [flags]
```
**Options**
```sh
-h, --help help for list
```
## Manage Supabase projects {#supabase-projects}
**Available Commands**
-
supabase projects create
-
supabase projects list
**Options**
```sh
-h, --help help for projects
```
### List all Supabase projects {#supabase-projects-list}
List all Supabase projects the logged-in user can access.
```sh
supabase projects list [flags]
```
**Options**
```sh
-h, --help help for list
```
### Create a project on Supabase {#supabase-projects-create}
```sh
supabase projects create [flags]
```
**Options**
```sh
--db-password string Database password of the project.
-h, --help help for create
-i, --interactive Enables interactive mode.
--org-id string Organization ID to create the project in.
--plan string Select a plan that suits your needs. (default "free")
--region string Select a region close to you for the best performance.
```
## Manage Supabase organizations {#supabase-orgs}
**Available Commands**
-
supabase orgs list
**Options**
```sh
-h, --help help for orgs
```
### List all organizations {#supabase-orgs-list}
List all organizations the logged-in user belongs.
```sh
supabase orgs list [flags]
```
**Options**
```sh
-h, --help help for list
```
## Manage database migration scripts {#supabase-migration}
**Available Commands**
-
supabase migration list
-
supabase migration new
**Options**
```sh
-h, --help help for migration
```
### Create an empty migration script {#supabase-migration-new}
```sh
supabase migration new [flags]
```
**Options**
```sh
-h, --help help for new
```
### List local and remote migrations {#supabase-migration-list}
```sh
supabase migration list [flags]
```
**Options**
```sh
-h, --help help for list
-p, --password string Password to your remote Postgres database.
```
### Authenticate using an access token {#supabase-login}
```sh
supabase login [flags]
```
**Options**
```sh
-h, --help help for login
```
### Link to a Supabase project {#supabase-link}
```sh
supabase link [flags]
```
**Options**
```sh
-h, --help help for link
-p, --password string Password to your remote Postgres database.
--project-ref string Project ref of the Supabase project.
```
### Initialize a local project {#supabase-init}
```sh
supabase init [flags]
```
**Options**
```sh
-h, --help help for init
```
## Run code generation tools {#supabase-gen}
**Available Commands**
-
supabase gen types
**Options**
```sh
-h, --help help for gen
```
## Generate types from Postgres schema {#supabase-gen-types}
**Available Commands**
-
supabase gen types typescript
**Options**
```sh
-h, --help help for types
```
### Generate types for TypeScript {#supabase-gen-types-typescript}
Generate types for TypeScript. Must specify either --local or --db-url
```sh
supabase gen types typescript [flags]
```
**Options**
```sh
--db-url string Generate types from a database url.
-h, --help help for typescript
--local Generate types from the local dev database.
```
## Manage Supabase Edge functions {#supabase-functions}
**Available Commands**
-
supabase functions delete
-
supabase functions deploy
-
supabase functions new
-
supabase functions serve
**Options**
```sh
-h, --help help for functions
```
### Serve a Function locally {#supabase-functions-serve}
```sh
supabase functions serve [flags]
```
**Options**
```sh
--env-file string Path to an env file to be populated to the Function environment.
-h, --help help for serve
--no-verify-jwt Disable JWT verification for the Function.
```
### Create a new Function locally {#supabase-functions-new}
```sh
supabase functions new [flags]
```
**Options**
```sh
-h, --help help for new
```
### Deploy a Function to Supabase {#supabase-functions-deploy}
Deploy a Function to the linked Supabase project.
```sh
supabase functions deploy [flags]
```
**Options**
```sh
-h, --help help for deploy
--no-verify-jwt Disable JWT verification for the Function.
--project-ref string Project ref of the Supabase project.
```
### Delete a Function from Supabase {#supabase-functions-delete}
Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
```sh
supabase functions delete [flags]
```
**Options**
```sh
-h, --help help for delete
--project-ref string Project ref of the Supabase project.
```
## Manage local Postgres databases {#supabase-db}
**Available Commands**
-
supabase db branch
-
supabase db diff
-
supabase db push
-
supabase db remote
-
supabase db reset
**Options**
```sh
-h, --help help for db
```
### Resets the local database to current migrations {#supabase-db-reset}
```sh
supabase db reset [flags]
```
**Options**
```sh
-h, --help help for reset
```
## Manage remote databases {#supabase-db-remote}
**Available Commands**
-
supabase db remote changes
-
supabase db remote commit
**Options**
```sh
-h, --help help for remote
-p, --password string Password to your remote Postgres database.
```
### Commit remote changes as a new migration {#supabase-db-remote-commit}
```sh
supabase db remote commit [flags]
```
**Options**
```sh
-h, --help help for commit
```
### Show changes on the remote database {#supabase-db-remote-changes}
Show changes on the remote database since last migration.
```sh
supabase db remote changes [flags]
```
**Options**
```sh
-h, --help help for changes
```
### Push new migrations to the remote database {#supabase-db-push}
```sh
supabase db push [flags]
```
**Options**
```sh
--dry-run Print the migrations that would be applied, but don't actually apply them.
-h, --help help for push
-p, --password string Password to your remote Postgres database.
```
### Diffs the local database for schema changes {#supabase-db-diff}
```sh
supabase db diff [flags]
```
**Options**
```sh
-f, --file string Saves schema diff to a file.
-h, --help help for diff
-s, --schema strings List of schema to include. (default [public])
--use-migra Use migra to generate schema diff.
```
## Manage local database branches {#supabase-db-branch}
Manage local database branches. Each branch is associated with a separate local database. Forking remote databases is NOT supported.
**Available Commands**
-
supabase db branch create
-
supabase db branch delete
-
supabase db branch list
-
supabase db branch switch
**Options**
```sh
-h, --help help for branch
```
### Switch the active branch {#supabase-db-branch-switch}
```sh
supabase db branch switch [flags]
```
**Options**
```sh
-h, --help help for switch
```
### List branches {#supabase-db-branch-list}
```sh
supabase db branch list [flags]
```
**Options**
```sh
-h, --help help for list
```
### Delete a branch {#supabase-db-branch-delete}
```sh
supabase db branch delete [flags]
```
**Options**
```sh
-h, --help help for delete
```
### Create a branch {#supabase-db-branch-create}
```sh
supabase db branch create [flags]
```
**Options**
```sh
-h, --help help for create
```