feat(cli): add mocad snapshots command tree#243
Merged
Conversation
Registers the cosmos-sdk `client/snapshot` CLI under `mocad snapshots` so operators can manage local state-sync snapshots: list, delete, dump, export, load, restore. The runtime was already wired (baseapp.SetSnapshot + SnapshotStore at data/snapshots in root.go) — only the CLI surface was missing.
phenix3443
approved these changes
Jun 3, 2026
This was referenced Jun 3, 2026
puneet2019
added a commit
that referenced
this pull request
Jun 3, 2026
feat(cli): add `mocad snapshots` command tree (cherry-pick from #243)
3 tasks
puneet2019
added a commit
that referenced
this pull request
Jun 4, 2026
feat(cli): add `mocad snapshots` command tree (cherry-pick from #243)
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
Registers the cosmos-sdk
client/snapshotCLI undermocad snapshotsso operators can manage local state-sync snapshots from the binary.The runtime was already wired (
baseapp.SetSnapshot+SnapshotStoreatdata/snapshotsincmd/mocad/cmd/root.go); only the CLI surface was missing.What you get
mocad snapshots list— list available snapshotsmocad snapshots delete <height> <format>— delete a snapshotmocad snapshots dump— dump a snapshot to a portable archivemocad snapshots export— export current app state as a snapshotmocad snapshots load— load a snapshot archive into the storemocad snapshots restore— restore app state from a local snapshotTest plan
go build ./cmd/mocadmocad snapshots --helpshows all 6 subcommands