← Back to CLIs
Melvynx

supabase

Manage Supabase projects via CLI - projects, db, migrations, functions, storage, secrets. Use when user mentions 'supabase', 'supabase project', or wants to manage Supabase.

Install

$ npx api2cli install supabase

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

supabase

Setup

npm i -g supabase

Verify installation:

supabase --version

Always use --output json flag when calling commands programmatically (where supported).

Authentication

supabase login

Resources

Local Development

CommandDescription
supabase initInitialize a new Supabase project locally
supabase startStart local Supabase stack (Postgres, Auth, Storage, etc.)
supabase stopStop local Supabase stack
supabase statusShow status of local Supabase services

Projects

CommandDescription
supabase projects listList all remote projects
supabase link --project-ref <ref>Link local project to remote

Database

CommandDescription
supabase db pushPush local migrations to remote database
supabase db pullPull remote schema changes into local migrations
supabase db resetReset local database to current migrations
supabase db diff --schema publicDiff local database against migrations
supabase db lintLint database for common issues

Migrations

CommandDescription
supabase migration new <name>Create a new migration file
supabase migration listList all migrations and their status
supabase migration repair --status applied <version>Repair migration history

Edge Functions

CommandDescription
supabase functions new <name>Create a new edge function
supabase functions serveServe functions locally
supabase functions deploy <name>Deploy a function to remote
supabase functions delete <name>Delete a remote function
supabase functions listList all deployed functions

Type Generation

CommandDescription
supabase gen types typescriptGenerate TypeScript types from database schema
supabase gen types typescript --localGenerate types from local database
supabase gen types typescript --project-id <ref>Generate types from remote project

Secrets

CommandDescription
supabase secrets listList all secrets
supabase secrets set KEY=valueSet a secret
supabase secrets unset KEYRemove a secret

Storage

CommandDescription
supabase storage lsList storage buckets
supabase storage ls s3://<bucket>List objects in a bucket
supabase storage cp <local> s3://<bucket>/<path>Upload a file
supabase storage rm s3://<bucket>/<path>Remove a file

Global Flags

FlagDescription
--output jsonOutput result as JSON
--project-ref <ref>Specify remote project reference
--debugEnable debug output
--workdir <path>Set working directory
Sponsors