Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
2,411
stars
5,036
commits
TypeScript
primary language
Sep 11, 2026
updated
Develop locally and deploy to the Supabase Platform from your terminal.
Supabase CLI brings the Supabase Platform to your terminal. Run the full local stack, manage database migrations, deploy Edge Functions, generate types, and automate project workflows.
# YOLO
curl -fsSL https://raw.githubusercontent.com/supabase/cli/main/install | bash
# npm
npm install -D supabase # or bun/pnpm/yarn add -D supabase
npm install -D supabase@beta # beta channel
# macOS and Linux
brew install supabase/tap/supabase # always up to date
brew install supabase # official formula, may be delayed
brew install supabase/tap/supabase-beta # beta channel
# Windows
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
scoop install supabase-beta # beta channel
# Linux packages
# Download .apk, .deb, .rpm, or .pkg.tar.zst from GitHub Releases.
Linux packages are available from Releases. Community-maintained packages are also available through pkgx and Nixpkgs.
Create a Supabase workspace and start the local stack:
supabase init
supabase start
supabase status
The local stack includes Postgres, Auth, Realtime, Storage, Edge Functions, and the Supabase APIs.
Start from a template:
supabase bootstrap
Connect your local workspace to a hosted Supabase project:
supabase login
supabase link
Create migrations, compare schemas, and apply changes locally or to your linked project:
supabase migration new create_profiles
supabase db diff
supabase db push
supabase db reset
Build, serve, and deploy functions from the same project workspace:
supabase functions new hello-world
supabase functions serve
supabase functions deploy hello-world
Generate TypeScript types from your local database or linked project:
supabase gen types --local
supabase gen types --linked
Use --help on any command to explore flags and examples:
supabase db --help
supabase functions deploy --help
This repository is a pnpm monorepo. The published package lives in apps/cli.
pnpm install
pnpm check:all
cd apps/cli
pnpm types:check
pnpm dev:next -- --help
pnpm run test:unit && pnpm run test:integration
Useful source entry points:
| Path | Purpose |
|---|---|
apps/cli | TypeScript/Bun CLI package |
apps/cli-go | Go CLI source used by the legacy shell |
packages/stack | Local Supabase stack runtime |
packages/config | Config schema and generated types |
packages/api | Typed Supabase Management API client |
After a fresh clone, install the reference repositories used for agent and developer inspection:
pnpm repos:install
We love focused pull requests with a clear problem, a small surface area, and tests that match the user-facing behavior.
Open an issue first and wait for a maintainer to add the open-for-contribution label before starting work — external pull requests that don't link a labeled, open issue are closed automatically. See CONTRIBUTING.md for the full workflow.
Before opening a PR, run repo-wide quality checks from the repository root,
then run the relevant package tests from each workspace you touched. For each
touched TypeScript workspace (or any workspace that declares it), also run its
pnpm types:check script. For example:
# From the repository root:
pnpm check:all
# From apps/cli (a touched TypeScript workspace):
cd apps/cli
pnpm types:check
pnpm run test:unit && pnpm run test:integration
# Repeat the relevant package tests for every touched workspace; run
# pnpm types:check there too when that workspace declares the script.
PR titles must use conventional commits, for example:
fix(cli): handle linked projects without cached service versions
Supabase CLI packages are released under the MIT license.
(top 30 of 172)
TypeScript
91.1%
Go
7.1%
PLpgSQL
1.2%
Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
2,411
stars
5,036
commits
TypeScript
primary language
Sep 11, 2026
updated
Develop locally and deploy to the Supabase Platform from your terminal.
Supabase CLI brings the Supabase Platform to your terminal. Run the full local stack, manage database migrations, deploy Edge Functions, generate types, and automate project workflows.
# YOLO
curl -fsSL https://raw.githubusercontent.com/supabase/cli/main/install | bash
# npm
npm install -D supabase # or bun/pnpm/yarn add -D supabase
npm install -D supabase@beta # beta channel
# macOS and Linux
brew install supabase/tap/supabase # always up to date
brew install supabase # official formula, may be delayed
brew install supabase/tap/supabase-beta # beta channel
# Windows
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
scoop install supabase-beta # beta channel
# Linux packages
# Download .apk, .deb, .rpm, or .pkg.tar.zst from GitHub Releases.
Linux packages are available from Releases. Community-maintained packages are also available through pkgx and Nixpkgs.
Create a Supabase workspace and start the local stack:
supabase init
supabase start
supabase status
The local stack includes Postgres, Auth, Realtime, Storage, Edge Functions, and the Supabase APIs.
Start from a template:
supabase bootstrap
Connect your local workspace to a hosted Supabase project:
supabase login
supabase link
Create migrations, compare schemas, and apply changes locally or to your linked project:
supabase migration new create_profiles
supabase db diff
supabase db push
supabase db reset
Build, serve, and deploy functions from the same project workspace:
supabase functions new hello-world
supabase functions serve
supabase functions deploy hello-world
Generate TypeScript types from your local database or linked project:
supabase gen types --local
supabase gen types --linked
Use --help on any command to explore flags and examples:
supabase db --help
supabase functions deploy --help
This repository is a pnpm monorepo. The published package lives in apps/cli.
pnpm install
pnpm check:all
cd apps/cli
pnpm types:check
pnpm dev:next -- --help
pnpm run test:unit && pnpm run test:integration
Useful source entry points:
| Path | Purpose |
|---|---|
apps/cli | TypeScript/Bun CLI package |
apps/cli-go | Go CLI source used by the legacy shell |
packages/stack | Local Supabase stack runtime |
packages/config | Config schema and generated types |
packages/api | Typed Supabase Management API client |
After a fresh clone, install the reference repositories used for agent and developer inspection:
pnpm repos:install
We love focused pull requests with a clear problem, a small surface area, and tests that match the user-facing behavior.
Open an issue first and wait for a maintainer to add the open-for-contribution label before starting work — external pull requests that don't link a labeled, open issue are closed automatically. See CONTRIBUTING.md for the full workflow.
Before opening a PR, run repo-wide quality checks from the repository root,
then run the relevant package tests from each workspace you touched. For each
touched TypeScript workspace (or any workspace that declares it), also run its
pnpm types:check script. For example:
# From the repository root:
pnpm check:all
# From apps/cli (a touched TypeScript workspace):
cd apps/cli
pnpm types:check
pnpm run test:unit && pnpm run test:integration
# Repeat the relevant package tests for every touched workspace; run
# pnpm types:check there too when that workspace declares the script.
PR titles must use conventional commits, for example:
fix(cli): handle linked projects without cached service versions
Supabase CLI packages are released under the MIT license.
(top 30 of 172)
TypeScript
91.1%
Go
7.1%
PLpgSQL
1.2%