printHelp
argparse provides set of printHelp functions to print help messages.
Signature
void printHelp(Config config, COMMAND...)()
void printHelp(Config config, COMMAND...)(void delegate(string) sink)
Parameters
configConfigobject that is expected to be the same as the one passed toCLI API. Note that only the first function checks forconfig.helpPrinterand calls it if it's set.COMMAND...List of types representing subcommand hierarchy starting with top-level, for example:
TOP_LEVEL_CMD, SUBCMD1, SUBCMD1_2(whereSUBCMD1_2is a subcommand ofSUBCMD1).sinkDelegate that is called with help text.
argparsecalls this delegate multiple times passing help text by pieces - as soon as they are formatted and ready to be printed.
Last modified: 11 January 2026