Affected area
Local development
Problem to solve
stack destroy takes one target. --stack-id is a single string (apps/cli/src/commands/experimental/stack/destroy/destroy.command.ts), and so is --stack.
stack list often shows several stacks (old dogfood scratches, temp projects, one project with more than one name). Cleaning a chosen subset means one destroy invocation per id, each with its own confirmation. There is no --all on destroy (stop has --all). --all would also be the wrong tool when only some of the listed ids should go.
Proposed solution
Accept more than one id in one destroy:
supabase stack destroy --stack-id <id> --stack-id <id> --yes
Repeatable --stack-id. One confirmation for the whole set, listing every resolved id. --yes skips that prompt once, as it does today for a single id.
If one id fails, report that failure and keep going through the rest, then exit non-zero. Do not stop the batch on the first miss.
--stack and --stack-id stay mutually exclusive, including when several ids are passed.
Alternatives considered
- A shell loop of
stack destroy --stack-id … --yes. Works, and repeats startup and confirmation once per id.
--all, matching stack stop --all. That destroys every readable stack, not a chosen subset.
- A comma-separated
--stack-id a,b. Repeatable flags match the rest of the CLI better and do not need a new delimiter.
Additional context
Related: #6961. Text stack list currently prints an 8-character id that --stack-id rejects, so a batch flag is only usable with the full ids from --output-format json until that is fixed.
Affected area
Local development
Problem to solve
stack destroytakes one target.--stack-idis a single string (apps/cli/src/commands/experimental/stack/destroy/destroy.command.ts), and so is--stack.stack listoften shows several stacks (old dogfood scratches, temp projects, one project with more than one name). Cleaning a chosen subset means one destroy invocation per id, each with its own confirmation. There is no--allon destroy (stop has--all).--allwould also be the wrong tool when only some of the listed ids should go.Proposed solution
Accept more than one id in one destroy:
Repeatable
--stack-id. One confirmation for the whole set, listing every resolved id.--yesskips that prompt once, as it does today for a single id.If one id fails, report that failure and keep going through the rest, then exit non-zero. Do not stop the batch on the first miss.
--stackand--stack-idstay mutually exclusive, including when several ids are passed.Alternatives considered
stack destroy --stack-id … --yes. Works, and repeats startup and confirmation once per id.--all, matchingstack stop --all. That destroys every readable stack, not a chosen subset.--stack-id a,b. Repeatable flags match the rest of the CLI better and do not need a new delimiter.Additional context
Related: #6961. Text
stack listcurrently prints an 8-character id that--stack-idrejects, so a batch flag is only usable with the full ids from--output-format jsonuntil that is fixed.