{
  "slug": "supabase-cli-hosted-mutation-consent-and-target-reporting-17fa9ef72b6e",
  "title": "Supabase CLI hosted mutation consent and target reporting",
  "tools": [
    "supabase"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-11-02T12:18:34.000Z",
  "announced_at": "2026-11-02T12:18:34.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a Supabase CLI command mutates a hosted project in an unattended run, pass `--yes`. Use the target report on stderr and the JSON `target` field to identify the resolved target.",
    "examples": [
      "supabase db push --remote --yes",
      "supabase functions deploy <function-name> --prune --yes"
    ],
    "gotchas": [
      "Version: v3.0.0",
      "Non-interactive: Without `--yes`, unattended hosted mutations fail with `HostedMutationConsentRequiredError`; a declined mutation fails with `HostedMutationDeclinedError`. A piped `y` or `SUPABASE_YES` from a working-directory env file does not confirm. Target-resolving commands print `Target: …` on stderr; JSON object results and error envelopes include a `target` object.",
      "--yes: Answer yes to all prompts; needed for unattended hosted mutations.",
      "--remote: Select the linked hosted project as the target.",
      "--prune: Delete deployed functions absent locally; runs even if all functions are up to date.",
      "Commands changing hosted projects ask for confirmation and fail unattended unless `--yes` is passed.",
      "Only `projects`, `branches`, `orgs` and `domains create`, and `bootstrap`, default to Yes.",
      "A `y` piped on stdin no longer confirms; `SUPABASE_YES` in a `.env` file no longer counts. If an env file in the working directory defines `SUPABASE_YES`, a shell-exported value does not count either.",
      "Declining `db pull` or `pull` writes no files.",
      "`db reset` changes its JSON `target` from a string to an object; `config push` JSON drops `declined_addons` and its skipped status."
    ]
  },
  "why_it_matters": "Run Supabase CLI commands in CI or other unattended workflows that mutate hosted projects.",
  "before": "Use the per-command cancelled error codes when consent is declined; declining `db pull` or `pull` could write files.",
  "sources": [
    "https://github.com/supabase/cli/releases/tag/v3.0.0",
    "https://github.com/supabase/cli/releases",
    "https://supabase.com/docs/reference/cli/v0/supabase-projects-list"
  ],
  "rank": 0.97078,
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261102-13",
    "verdict_id": "daily-20261102-13:daily-20261102-13-fd86132b8b07ac67-2:gate",
    "evidence_hash": "a9796195d3340f20a436d0ef0d56cdeae53d22854fb6678ab01b301b30f5c8a5"
  }
}
