Supabase CLI v3: local is the new default, and your CI needs --remote --yes
Supabase CLI v3 targets the local database by default and asks before touching your hosted project. What breaks in CI and how to migrate.
Igor Calabraro
· 7 min read
In this post
If you run Supabase with Next.js, there is probably a supabase db push or a supabase gen types sitting in some package.json or GitHub Actions workflow that nobody looks at anymore. On November 2, CLI v3.0.0 became the default install on npm, Scoop, the Linux packages and the supabase/setup-cli action; Homebrew followed on November 3. The official changelog, dated November 4, flags it as a breaking change. My take: v3 flips the CLI's default from "implicitly remote" to "local unless you say otherwise", which is a safety upgrade that costs you a review of every script that talks to your hosted project.
Target of db push, db pull, db dump, migration list, gen types, storage
Linked project or a specific flag
Local stack, unless you pass --remote
Pointing at the remote
--linked, --project-ref, --db-url
--remote, --remote=<ref> or --remote=<postgres-url> (the old flags are deprecated)
Changes to the hosted project
Run right away
Ask for confirmation, defaulting to "No"
CI with no interactive terminal
Works
Fails with HostedMutationConsentRequiredError without --yes
echo y | to confirm
Works
No longer confirms anything
Schema diff (db diff, db pull)
migra
pg-delta by default
[inbucket] in config.toml
Accepted
Renamed to [local_smtp]
Commands that require confirmation when they change the hosted project include db push, functions deploy, secrets set and config push. Removed commands and flags exit with code 1 and print their replacement, so at least the failure is explicit.
With v2, forgetting a flag could mean running a migration against production when you meant to test locally. With v3, the likely mistake is the opposite: the command runs against the local database and the remote stays untouched. Annoying, but reversible.
That matters more today because it is not only people typing commands. Coding agents run the CLI in a terminal, and automation scripts run unattended. In my view, "local by default plus explicit consent for remote" is exactly the kind of guardrail you want when an agent or a CI job holds the project token. The catch is the side effect: a pipeline that used to push migrations may now "succeed" against a local database that doesn't even exist on the runner, or stop on a consent error.
Start with an inventory. These commands look for CLI calls and changed flags in the places they usually live:
# calls that now depend on --remote and/or --yesgrep -rnE "supabase (db (push|pull|dump|diff)|migration|gen types|storage|functions deploy|secrets set|config push)" \ .github package.json scripts 2>/dev/null# deprecated flags, removed commands and piped confirmationsgrep -rnE -- "--linked|--project-ref|--project-id|--db-url|db remote|gen keys|echo y \|" \ .github package.json scripts 2>/dev/null
Each hit falls into one of three buckets: the command should run locally (usually nothing to do), it should run against the remote (needs --remote), or it changes the hosted project (needs --remote and --yes).
The most common conversions, according to the official migration guide:
Before (v2)
After (v3)
supabase db push
supabase db push --yes --remote
supabase db push --db-url "$DB_URL"
supabase db push --yes --remote="$DB_URL"
supabase gen types typescript --project-id "$REF"
supabase gen types typescript --remote="$REF"
supabase gen types typescript --local
supabase gen types typescript
supabase functions deploy
supabase functions deploy --yes
supabase secrets set ...
supabase secrets set ... --yes
supabase db remote commit
supabase db pull --remote
Two details trip people up: --remote with a value needs the =, and when a command takes a positional argument, --remote goes last, as in supabase migration repair 20240101000000 --status reverted --remote. secrets unset also changed: it now requires --all to delete every secret.
A migration deploy workflow updated for v3 looks like this:
The database URL comes from a secret instead of living in the YAML. And --yes only shows up on the step that changes the hosted project, which makes it obvious in PR review where the risk is.
v3 also changes configuration precedence: flag, then shell variable, then project env files, then config.toml, then the default. In v2, a [remotes.<name>] section in config.toml beat the SUPABASE_* variables; now the variable wins, and the CLI warns you. The guide recommends running supabase config diff before your first config push and setting SUPABASE_ENV in CI. There is also a behavior fix: [auth.sms] enable_confirmations is now applied exactly as written, so double-check that value before pushing config.
For schema diffs, pg-delta is now the default engine for db diff and db pull, so the generated SQL may differ from what migra produced. If you want to compare calmly before adopting it, you can switch back to migra with [experimental.pgdelta] enabled = false in config.toml or the --use-migra flag.
Technical Note 2026.008 (net product value) goes live on Dec 14. What changes in the NF-e XML, rejections 1279, 1282 and 1283, and how to validate first.