feat: add user confirmation for keys rm command#2452
Open
Conversation
Member
|
This is a breaking change, so I think we should hold it until the next protocol release. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a safety confirmation step to stellar keys rm to prevent accidental identity deletion, with a --force escape hatch for non-interactive use. This aligns CLI behavior with the request in #2420 for destructive-action confirmation.
Changes:
- Add interactive confirmation handling to
keys rm, plus a new--forceflag to skip confirmation. - Add integration tests covering confirmation-required behavior and
--force. - Update user-facing docs/help to mention
--forceand reflect the new behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cookbook/stellar-keys.mdx | Updates the “Remove the Identity” example command. |
| cmd/soroban-cli/src/commands/keys/rm.rs | Implements confirmation prompt + --force flag for key removal. |
| cmd/crates/soroban-test/tests/it/integration/keys.rs | Adds integration tests for confirmation and --force. |
| FULL_HELP_DOCS.md | Documents the new --force option in generated help. |
You can also share your feedback on Copilot code review. Take the survey.
leighmcculloch
approved these changes
Mar 16, 2026
Member
leighmcculloch
left a comment
There was a problem hiding this comment.
One ask otherwise lgtm.
336b07f to
ed1e40b
Compare
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.
What
Add a confirmation prompt when deleting keys. The confirmation prompt can be bypassed with a
--forceflag. Confirmation also works by pipingyintostdin.$ stellar keys rm rmtest --force ℹ️ Removing the key's cli config fileWhy
Closes: #2420
Known limitations
None