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
- Run the full Supabase stack locally via Docker (Postgres, Auth, Storage, Realtime)
- Database migration management with diff, push, pull, and squash
- Generate TypeScript/Go/Swift/Python types from your database schema
- Deploy and serve Edge Functions (Deno-based serverless)
- Manage secrets, storage, branches, and project configuration
Install
brew: brew install supabase/tap/supabasenpm: npm install supabase --save-devnpx: npx supabase --helpscoop: scoop bucket add supabase https://github.com/supabase/scoop-bucket.git && scoop install supabase Commands
| Command | Syntax | Description |
|---|---|---|
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:
- Scaffold and manage database migrations for Supabase projects
- Generate typed client code from database schema for type-safe queries
- Deploy serverless Edge Functions as part of CI/CD pipelines
- Inspect database performance with bloat, locks, and outlier queries
- Manage project secrets and configuration across environments
Example workflow:
supabase db diff -f add_users_table && supabase db push && supabase gen types typescript --project-id <ref> > src/types/supabase.ts