Intended to make bitcoin command line features more discoverable and allow installing new multiprocess binaries in libexec/ instead of bin/ so they don’t cause confusion.
Idea and implementation of this were discussed in #30983.
Initial implementation of this feature is deliberately minimal so the UX can evolve in response to feedback and there are not too many details to debate and discuss in a single PR. But many improvements are possible or planned:
- Adding manpage and bash completions.
- Showing nicer error messages that detect if an executable isn’t installed and suggest how to fix (comment)
- Showing wrapper command lines in subcommand in help output (comment). This could be done conditionally as suggested in the comment or be unconditional.
- Showing wrapper command lines in subcommand error output. There is a bitcoin-cli error pointed out in (comment) that is needlessly confusing.
- Integrating help so bitcoin help subcommandinvokesbitcoin subcommand -h.bitcoin -h subcommandshould also be supported and be equivalent (comment)
- Adding support for bitcoin-utilsubcommands. Ideal interface would probably be more likebitcoin grindnotbitcoin util grindbut this has been punted for now. Supporting subcommands directly would require some ArgsManager modifications
- Adding a dedicated python functional test for the wrapper. Right now there is some CI coverage by setting the BITCOIN_CMDvariable, but this doesn’t cover things like the help output and version output, and support for different directory layouts.
- Better --multiprocess(-m) /--monolithic(-M) default selection. Right now, default is monolithic but it probably makes sense to chose more intelligently depending on whether -ipc options are enabled and what binaries are available.
- Maybe parsing bitcoin.confand supporting options to control wrapper behavior like custom locations or preferences or aliases.
- Better command command line usability. Allow combining short options like (-ah). Allow fuzzy matching of subcommands or suggestions if you misspell. (suggested by stickies in review club)
- Not directly related to this PR but bitcoin-cli namedimplementation used by the wrapper should do a better job disambiguating named arguments from base64 arguments ending in = as pointed out in (comment)
This PR is part of the process separation project. A review club meeting for it took place in https://bitcoincore.reviews/31375