You can add show_default=True
to any @click.option
so that the --help
message displays the defaults, but it seems like click
has chosen not to include something as helpful as argparse
’s ArgumentDefaultsHelpFormatter
, which aways shows the default. I remember searching for this a bunch of years back, but I finally came across a satisfying patch:
import click
click.option = functools.partial(click.option, show_default=True)