Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 5 min read Release mediumAdept

Supabase CLI v2: Config as Code

Supabase CLI v2 adds configuration as code: a committed `config.toml` declares Auth redirect URLs, Edge Function settings, Storage buckets seeded from local files, Postgres settings and experimental database webhooks, and these are promoted across preview, staging and production environments. `supabase link` diffs local config against the remote project to detect drift. With Branching enabled, config syncs automatically to ephemeral branches, and `[remotes]` blocks keyed by project ID override settings for persistent branches. The Management API decides whether a Postgres setting needs a restart or can be applied with a reload signal. Edge Function secrets still have to be set manually on branches, and v2 has no breaking changes.

Assumes: Supabase basicsCI/CD pipelinesTOML configuration

Related posts

  • Supabase CLI v1 and Management API Beta

    Supabase mediumAdept

    Supabase CLI v1 leaves beta with commands to manage organizations, projects and Edge Functions, plus database migration tooling, CI/CD workflows and TypeScript type generation. Schema diffing adds an experimental migra backend (`db diff --use-migra`), which runs faster and emits more concise DDL than the previous PgAdmin-based approach, which mishandled default privileges in role grants. Local database branching lets developers test manual migrations without data loss, and `db push` plus a GitHub Actions example cover releasing to staging and production. A beta REST Management API, already used by the CLI, exposes project and organization management for automation and future Terraform/Pulumi integrations.

  • Faster config, migrations and functions on branches

    Supabase mediumAdept

    Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions. Postgres settings are written to disk without a restart so the single restart triggered by enabling WAL-G backups picks them up. SSL enforcement is ordered before the first backup so a restart can't corrupt it, and gitless branches wait for the last restart before migrating. Migrations are split by a Go reimplementation of psql's lexer, validated against regression tests and fuzzing, and each file runs as one pipelined transaction together with its history row. Edge Functions are skipped when the SHA-256 of their deterministic Brotli bundle and their JWT setting are unchanged.

  • Supabase Branching

    Supabase mediumAdept

    Supabase Branching gives each Git branch an isolated hosted Preview environment with its own Postgres database, Auth, Storage, Realtime, Edge Functions and APIs, plus separate credentials. A GitHub app runs migrations from ./supabase/migrations when a PR opens, applies new migration files incrementally on push, seeds from seed.sql, and runs the migrations against production on merge. It integrates with Vercel Preview deployments by auto-populating branch connection secrets. Early access is rolling out in batches to paid orgs, with copy-on-write snapshots, declarative config and automatic dashboard commits planned.

  • The Vibe Coder's Guide to Supabase Environments

    Supabase mediumAdept

    Separate Supabase projects for development and production, with all schema changes captured as timestamped SQL migrations in a Git-tracked supabase/ directory, keep a fast workflow from breaking live data. Changes flow one way: local → dev → prod. Every migration is proven with `supabase db reset`, and GitHub Actions runs `supabase db push` automatically on merges to develop and main. The guide also covers enabling Row Level Security on every table, keeping service role keys out of NEXT_PUBLIC_ variables, nightly backups plus Point in Time Recovery with monthly restore drills, and wiring Vercel preview and production environments to the matching database.

  • Supabase Local Dev: migrations, branching, and observability

    Supabase easyNovice

    Supabase's CLI gains a batch of Postgres local-development features: `supabase inspect db` with 19 diagnostic commands adapted from Heroku's pg-extras, `db dump` backups built on pg_dump, migration squashing and diffing via migra, pgTAP testing with `supabase test`, plpgsql_check linting, seeding, and TypeScript type generation that now detects foreign-key relationships. Local logs are viewable in the dashboard, and the CLI moves to a fortnightly stable-release cycle with a beta channel. Branching enters alpha: each GitHub pull request gets an isolated Firecracker-based preview environment that runs the repo's migrations and seed.sql, with migrations applied to production on merge. Production data cloning is deliberately deferred until copy-on-write with anonymization is judged safe.

The quest for software engineering knowledge.

Look:
Layout: