title: HelpFormatter in Click
body: <p>I am using <a href="https://pypi.python.org/pypi/click" rel="noreferrer">click</a> within a local module and I would like to adjust how the help is displayed: </p>
  
  <p><strong>Currently output with <code>--help</code>:</strong> </p>
  
  <pre><code>Usage: __main__.py [OPTIONS] COMMAND [ARGS]...
  
  Options:
    --help  Show this message and exit.
  
  Commands:
    foo     Foo is a program very nice and pretty...
  </code></pre>
  
  <p>By default the <code>prog</code> name is <code>__main__.py</code> and the text is trimmed to 78 chars. </p>
  
  <p>I discovered that this can be adjusted using the <code>HelpFormatter</code> class. But I don't know how to use it in this context.</p>
  
  <p><strong>Current Code:</strong></p>
  
  <pre><code>import click
  
  @click.group()
  def main(ctx):
     pass
  
  @main.command()
  def foo():
     pass
  
  click.CommandCollection(sources=[main])()
  </code></pre>
  
  <p><strong>Expected output:</strong></p>
  
  <pre><code>Usage: my_module_name [OPTIONS] COMMAND [ARGS]...
  
  Options:
    --help  Show this message and exit.
  
  Commands:
    foo     Foo is a program very nice and pretty and this sentence is very long.
  </code></pre>