feat(cli): add snapshots delete command - #256
Merged
Merged
Conversation
Snapshots could be taken and listed, but never deleted from the CLI. The only way to
drop one was to call the SDK's deleteBucketSnapshot directly, so `tigris snapshots
delete` closes that gap:
tigris snapshots delete my-bucket 1765889000501544464 --yes
Takes one or more comma-separated snapshot versions and deletes each in turn,
reporting per-version success or failure so one bad version does not hide the outcome
of the others. Exits non-zero if any deletion failed. `--format json` emits
{ action, bucket, versions, errors }, the same shape `buckets delete` returns.
Confirmation is required before deleting; `--yes`/`--force` skips it, and the command
refuses to run in non-TTY mode without it, matching `buckets delete` and
`objects delete`.
Also quote the 19-digit example version in specs.yaml. Unquoted it parses as a YAML
float and loses its trailing digits, so `snapshots delete help` printed
1765889000501544400 instead of 1765889000501544464.
Assisted-by: Claude Opus 5 (1M context) via Claude Code
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryAdds a destructive
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified in the changed code. The command is reachable through the existing spec-driven dispatch path, comma-separated versions are normalized by CLI argument extraction, destructive execution is confirmation-gated, and structured partial-failure reporting follows existing delete-command conventions. Important Files Changed
Reviews (1): Last reviewed commit: "feat(cli): add snapshots delete command" | Re-trigger Greptile |
garrensmith
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
tigris snapshots delete <bucket> <version[,version...]>(aliasd). Snapshots could be taken and listed, but never deleted from the CLI — the only way to drop one was to call the SDK'sdeleteBucketSnapshotdirectly.Behavior
--yes/--forceskips it, and the command refuses to run in non-TTY mode without it — matchingbuckets deleteandobjects delete.--format jsonemits{ action, bucket, versions, errors }, the same shapebuckets deletereturns.Incidental fix
The 19-digit example version in
specs.yamlis now quoted. Unquoted it parses as a YAML float and loses its trailing digits, sosnapshots delete helpprinted1765889000501544400instead of1765889000501544464. Existing specs only ever put versions in prose, so nothing else was affected.Testing
tsc --noEmit,pnpm build, andbiome checkall clean..env.testcredentials — the three new integration tests below were not exercised locally and will run for the first time in CI.deletepresent insnapshots help.Changeset included (
minorfor@tigrisdata/cli).🤖 Generated with Claude Code
Note
Cursor Bugbot is generating a summary for commit a8e9b97. Configure here.