Skip to content

Conversation

@chahat-101
Copy link

This PR adds single-letter aliases for top-level CLI commands to improve ergonomics.

Added aliases:

  • W → wallet
  • K → key
  • C → compile
  • R → repl
  • D → descriptor

No behavior changes; aliases map directly to existing commands.

Closes #229

@AmosOO7
Copy link
Contributor

AmosOO7 commented Dec 26, 2025

Hello @chahat-101 , thank you for opening the PR on this issue.

I suggest also shortening the subcommands for example; using the wallet top command, you can have something like new_address as new_add or n_a (if we want to make it extremely short)

Also adding what each aliases point to in the Readme file.

@chahat-101
Copy link
Author

@AmosOO7 I agree that this could be useful, would you like me to extend this PR with subcommand aliases and readme updates, or handle that in a follow-up PR?

@AmosOO7
Copy link
Contributor

AmosOO7 commented Dec 27, 2025

@AmosOO7 I agree that this could be useful, would you like me to extend this PR with subcommand aliases and readme updates, or handle that in a follow-up PR?

Hello @chahat-101
I suggest you extend this PR

@chahat-101
Copy link
Author

Hey @AmosOO7
Done! added wallet subcommand aliases and updated the README.

@AmosOO7
Copy link
Contributor

AmosOO7 commented Dec 29, 2025

Hello @chahat-101, nice work. I like the aliases you used for the subcommands.
I noticed the subcommands of some top commands have not being given aliases, also I don't know if there is a reason you left them and only focused on the wallet subcommands.

/// Returns the available spending policies for the descriptor.
Policies,
/// Returns the public version of the wallet's descriptor(s).
#[command(alias = "pub_desc")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @chahat-101
I noticed you didn't add extract_psbt , finalize_psbt, and combine_psbt under the wallet subcommand.

Comment on lines +88 to +111
## Command Aliases

bdk-cli provides short aliases for commonly used commands to improve CLI ergonomics.

### Top-level command aliases

| Command | Alias |
|------------|-------|
| wallet | W |
| key | K |
| compile | C |
| repl | R |
| descriptor | D |

### Wallet subcommand aliases

| Command | Alias |
|---------------------|-------|
| new_address | new_addr |
| unused_address | unused_addr |
| create_tx | create |
| bump_fee | bump |
| public_descriptor | pub_desc |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I advice moving this section to below the pretty section

@chahat-101
Copy link
Author

Thanks! I initially focused on wallet subcommands to keep the scope incremental and aligned with the original issue. I’m happy to add aliases for subcommands of other top-level commands as well if that’s preferred.

@va-an
Copy link
Contributor

va-an commented Dec 31, 2025

What about generating tab completion for commands and arguments for the user? This would allow them to see all available commands and eliminate the need to memorize short versions of commands.

See https://docs.rs/clap_complete/4.5.64/clap_complete/

@va-an
Copy link
Contributor

va-an commented Dec 31, 2025

You also can find good example of autocomplete in rustup:

rustup completions --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Improving bdk-cli usability by introducing single-letter command aliases for core top-level commands

3 participants