Improving bdk-cli usability by introducing single-letter command aliases for core top-level commands
Problem
Some bdk-cli commands are verbose and require repetitive typing, especially for frequently used top-level commands such as wallet, key, compile, repl, and descriptor. This can slow down power users and make command examples harder to scan.
Proposal
Introduce single-letter, capitalized aliases for core top-level commands. These aliases act as shortcuts to the existing commands and do not replace or change current behavior.
Proposed Aliases
| Command |
Alias |
wallet |
W |
key |
K |
compile |
C |
repl |
R |
descriptor |
D |
Aliases map directly to their corresponding commands and remain fully optional.
Example: Wallet Command
Current Usage
cargo run wallet -w test2 -e $EXT -d sqlite new_address
With Aliases
cargo run W -w test2 -e $EXT -d sqlite new_add
Where:
- W is an alias for wallet
- new_add is an alias for new_address
- All flags, arguments, and command logic remain unchanged
CLI Structure
- The command-line interface structure remains the same
- Global args (e.g. --pretty) continue to apply globally but can be easily represented with
P
- Aliases only reduce typing and improve readability
- Existing commands remain fully supported
Benefits
- Reduced typing and faster workflows
- Cleaner and more readable command examples
- Easy mental mapping (W → wallet, D → descriptor, etc.)
- Backward-compatible and non-breaking
- Improved ergonomics for frequent users
Documentation
Aliases would be documented clearly in:
- --help output
- README / CLI usage documentation
Example:
wallet (alias: W)
descriptor (alias: D)
key (alias: K)
compile (alias: C)
repl (alias: R)
Scope
- Applies only to top-level commands
- No changes to internal handlers or business logic
- Can be introduced incrementally
Open Questions
- Should aliases be uppercase-only or case-insensitive?
- Should all top-level commands have aliases or only common ones?
- Should aliases be shown by default in help output?
Motivation
This change improves bdk-cli usability for both new and experienced users by reducing friction in everyday usage while keeping the interface backward-compatible and easy to understand.
If agreed on, I can:
- Adapt this to match bdk-cli’s current clap structure
- Rewrite it to sound more conservative or more opinionated
- Add example code snippets for how aliases would be defined in ReadMe
Improving bdk-cli usability by introducing single-letter command aliases for core top-level commands
Problem
Some
bdk-clicommands are verbose and require repetitive typing, especially for frequently used top-level commands such aswallet,key,compile,repl, anddescriptor. This can slow down power users and make command examples harder to scan.Proposal
Introduce single-letter, capitalized aliases for core top-level commands. These aliases act as shortcuts to the existing commands and do not replace or change current behavior.
Proposed Aliases
walletWkeyKcompileCreplRdescriptorDAliases map directly to their corresponding commands and remain fully optional.
Example: Wallet Command
Current Usage
cargo run wallet -w test2 -e $EXT -d sqlite new_addressWith Aliases
cargo run W -w test2 -e $EXT -d sqlite new_addWhere:
CLI Structure
PBenefits
Documentation
Aliases would be documented clearly in:
Example:
Scope
Open Questions
Motivation
This change improves bdk-cli usability for both new and experienced users by reducing friction in everyday usage while keeping the interface backward-compatible and easy to understand.
If agreed on, I can: