← Back to registry

Supabase CLI cloud

Develop, deploy, and manage Supabase projects locally

The Supabase CLI lets you run the entire Supabase stack locally, manage database migrations, deploy Edge Functions, generate typed client code, and push changes to hosted Supabase projects. It is the primary tool for local development and CI/CD workflows with Supabase.

Features

Install

brew: brew install supabase/tap/supabase
npm: npm install supabase --save-dev
npx: npx supabase --help
scoop: scoop bucket add supabase https://github.com/supabase/scoop-bucket.git && scoop install supabase

Commands

CommandSyntaxDescription
start supabase start Start the local Supabase development stack
db diff supabase db diff -f <migration-name> Generate a migration by diffing local schema changes
db push supabase db push Deploy local migrations to the remote database
gen types supabase gen types typescript --local Generate TypeScript types from the database schema
functions deploy supabase functions deploy <function-name> Deploy an Edge Function to your Supabase project

Links

Agent Usage Example

Use cases:

Example workflow:

supabase db diff -f add_users_table && supabase db push && supabase gen types typescript --project-id <ref> > src/types/supabase.ts