SupabaseBobbie SoedirgoAnnouncement
Supabase CLI
Summary
Supabase announces its CLI as the first step toward running Supabase locally, managing database migrations, generating types and API or validation schemas from a database, managing projects, and eventually pushing local changes to production. The local stack runs through Docker Compose, using tools described as 100% compatible with every Supabase project, and a React setup can initialize it with supabase init before supabase start. For schema changes, the post favors database diffing over accumulating manual SQL migrations and adds a CLI mode and Docker image for pgAdmin Schema Diff, which tracks view-owner changes needed for Row Level Security and handles domains. The supabase eject command outputs Docker Compose, Kong, and Postgres configuration for self-hosting. An update dated 15 August 2022 states that CLI V1 is generally available and that a Management API is in beta.
Context
The CLI is intended to support local Supabase development, database schema changes, management of Supabase projects, future promotion of local changes to production, and self-hosting. The post identifies accumulating manual migration scripts and handling database-diff edge cases as challenges, including view-owner changes relevant to Row Level Security.
Approach / What changed
The CLI runs Supabase locally with Docker Compose and provides commands such as supabase init, supabase start, and supabase eject. For schema changes, Supabase created a CLI mode for pgAdmin Schema Diff and released a Docker image, allowing databases to be compared through connection strings. The diff supports object and schema selection, while eject produces Docker Compose, Kong, and Postgres configuration for self-hosting.
Takeaways
Supabase’s local setup uses Docker Compose, and the post says its local-development tools are 100% compatible with every Supabase project.
Supabase selected pgAdmin Schema Diff because it tracks view-owner changes required for Row Level Security on views; a CLI mode and Docker image were added because the original tool was GUI-only.
The supabase eject command produces docker-compose.yml plus kong and postgres directories, allowing the stack to be started with docker compose up and adapted to an existing Postgres database.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.