Reproduction (CLI v2.101.0, macOS arm64)
$ supabase db query --linked --agent=no -o csv 'select 1 as ok'
■ Invalid value for flag --output: "csv". Expected: Expected "env" | "pretty" | "json" | "toml" | "yaml", got "csv"
$ supabase db query --linked --agent=no -o table 'select 1 as ok'
■ Invalid value for flag --output: "table". Expected: Expected "env" | "pretty" | "json" | "toml" | "yaml", got "table"
All variants fail identically: --output csv, -o=csv, position-after-SQL, etc. -o json accidentally works only because json is a valid value in both flag definitions.
Scope (verified via --help on installed binary)
| Command |
Command-local -o |
Status |
db query |
-o (table|json|csv) |
BROKEN (collides) |
db diff |
-o <file> (string, write to file) |
BROKEN (collides) |
db dump |
none |
OK |
db push |
none |
OK |
gen types |
none |
OK |
db reset |
--version (per #5350) |
BROKEN (already filed) |
Suggested fix
Either: (a) rename the global --output/-o to avoid the collision (e.g., --status-output), or (b) restore command-local -o precedence over the global. The --output-format global (text|json|stream-json) already covers AI-agent output framing, so the second --output global has limited need.
--output/-oflag acceptsenv|pretty|json|toml|yamland shadows command-local-oflags, makingdb query -o csvunreachable and breaking CSV-based CI parsing.db diff -o <file>; this appears to share the root cause already reported in db reset --version is shadowed by the global --version flag in 2.101.0 #5350 fordb reset --version.db query --agent=no -o csvoutput now silently false-PASS or false-FATAL. Please includedb queryanddb diffin the fix radius for db reset --version is shadowed by the global --version flag in 2.101.0 #5350.Reproduction (CLI v2.101.0, macOS arm64)
All variants fail identically:
--output csv,-o=csv, position-after-SQL, etc.-o jsonaccidentally works only becausejsonis a valid value in both flag definitions.Scope (verified via
--helpon installed binary)-odb query-o (table|json|csv)db diff-o <file>(string, write to file)db dumpdb pushgen typesdb reset--version(per #5350)Suggested fix
Either: (a) rename the global
--output/-oto avoid the collision (e.g.,--status-output), or (b) restore command-local-oprecedence over the global. The--output-formatglobal (text|json|stream-json) already covers AI-agent output framing, so the second--outputglobal has limited need.