sincecutoff.com
← all changes

Supabase CLI v3 local targets and --remote selection

Introduced 2026-11-02 · score 0.99

HOW TO USE IT

When no target is supplied, the listed database, inspection, type-generation, and storage commands use the local stack. Add `--remote` for the linked project or `--remote=<ref|branch|postgres-url>` for another hosted target; with an operand, place it before bare `--remote`.

supabase db schema declarative generate --remote
supabase db pull add_profiles --remote

WHY THIS HELPS

Run database, migration, inspection, type-generation, or storage commands against the local stack or a selected hosted target.

BEFORE THIS CHANGE

Use the prior target-selection options such as `--linked`, `--project-ref`, or `--db-url`; `gen types` without a target opened a project picker.

REQUIREMENTS AND LIMITATIONS

  • Version: v3.0.0
  • Non-interactive: Bare `--remote` in an unlinked checkout opens the project picker in an interactive terminal. Hosted mutations fail in non-interactive, JSON, stream-json, agent, or `-o json|yaml|toml|env` runs unless `--yes` or shell-exported `SUPABASE_YES` is set; piped `y` does not confirm. Target selection prints `Target: …` to stderr; JSON object results and error envelopes include a `target` object.
  • --remote: Select the linked project; with `=<ref>`, `=<branch>`, or `=<postgres-url>`, select another project, linked-project branch, or database URL.
  • --yes: Consent to hosted mutations in unattended runs.
  • SUPABASE_PROJECT_ID: Selects which project bare `--remote` refers to; alone it does not select a hosted target.
  • SUPABASE_YES: Shell-exported variable that consents to hosted mutations.
  • `SUPABASE_PROJECT_ID` alone no longer selects a hosted project; it only determines which project bare `--remote` means.
  • `--linked`, `--project-ref`, `--db-url`, and `gen types --project-id` are deprecated; they still work, print a warning naming the `--remote` form, and are hidden from help. `--local` does nothing and warns. These options cannot be combined with `--remote=<value>`.
  • `--remote <word>` after a command that takes an operand fails with a “did you mean” error when the word looks like a branch name or project ref.
  • `db query` rejects SQL passed both as an argument and with `--file`; an empty `--project-ref=` is an error.
  • Bare `--remote` in an unlinked checkout opens the project picker in an interactive terminal.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card