feat(cli): add snapshot management commands #7263
Open
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
The Snapshot directory can get very large. This is a simple command to delete it.
Its a known issue
Also relevent to #1126 #6845 #5617 #3182 #3176
This adds a new
snapshotcommand to manage project snapshot directories with list and clear subcommands.Changes
New command:
opencode snapshotopencode snapshot list- Lists all projects with snapshot sizes, sorted by sizeopencode snapshot clear [project-id]- Clears specific snapshotopencode snapshot clear- Clears all snapshotsFeatures:
--dry-runflag, confirmation prompts by default--forceflag to skip confirmationMotivation
Snapshot directories can grow large . Users need a way to:
I have 8.1 GB across 14 projects.
Testing
Code Style