home / databases / supabase

Supabase CLI

Official · Supabase
1.6k

Official Supabase CLI for local stacks, database migrations, Edge Functions, and project management.

$brew install supabase/tap/supabase
Language
Go
Stars
1,607
Category
Databases
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

Supabase CLI is Supabase's official command line for local development and hosted project operations. It combines local stack control, database and Edge Function workflows, and management API actions in one tool.

What It Enables
  • Start a full local Supabase stack, inspect service URLs and local keys, and link a working directory to a remote Supabase project.
  • Diff, pull, push, dump, lint, and reset Postgres schema changes; generate typed clients from the database schema; and create, serve, deploy, or download Edge Functions.
  • Create or inspect projects and preview branches, list API keys, manage secrets, restore backups, and handle other project-level operations without using the dashboard.
Agent Fit
  • One CLI covers local inspect, change, and verify loops plus hosted management tasks, which is useful when an agent needs to move between repo-local work and remote Supabase state.
  • The shared -o output encoder gives many status, list, and get-style commands real JSON, YAML, TOML, or env output, but DB migrations, dumps, and some codegen flows still write text or files instead of structured results.
  • Automation works best with explicit flags, linked project refs, and SUPABASE_ACCESS_TOKEN; login and some create, delete, or selection flows can prompt, and the local stack can also expose an /mcp endpoint when Studio is enabled.
Caveats
  • Local development commands depend on Docker containers and a Supabase project config in the working directory.
  • Management API commands require auth up front, and several commands fall back to interactive prompts if IDs, refs, or passwords are omitted.