feat: add --password flag for non-interactive CLI usage#275
Conversation
Add --password option to account create, send, unlock, and all staking write commands (validator-join, validator-deposit, validator-exit, validator-claim, validator-prime, prime-all, set-operator, set-identity, delegator-join, delegator-exit, delegator-claim). When provided, skips interactive password prompts enabling scripted/CI usage.
📝 WalkthroughWalkthroughThis PR adds optional password parameters to account and staking CLI commands. When a password is provided via CLI options, it bypasses interactive prompts; otherwise, the existing prompt behavior is preserved. Updates include new password fields across SendOptions, UnlockAccountOptions, CreateAccountOptions, StakingConfig, and related interfaces, plus modifications to BaseAction.createKeypairByName to support programmatic password injection. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
--passwordoption to all commands that prompt for password interactively--passwordis provided, skips interactive prompts enabling scripted/CI usageaccount create,account send,account unlock, and all staking write commands (validator-join, validator-deposit, validator-exit, validator-claim, validator-prime, prime-all, set-operator, set-identity, delegator-join, delegator-exit, delegator-claim)Test plan
account send --passwordworks non-interactivelyaccount create --passwordworks non-interactivelyaccount unlock --passwordworks non-interactivelySummary by CodeRabbit
New Features
--passwordoption to account commands (create, send, unlock)--passwordoption to staking-related commandsDependencies