title: Include submodules on click
body: <p>I am trying to make a kind of recursive call on my first Click CLI app.
  The main point is to have sub-commands associated to the first and, so, I was trying to separate it all in different files/modules to improve it's maintainability.</p>
  
  <p>I have the current <code>directory</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>root
  |-commands
  |-project
  |---__init__
  |---command1
  |---command2
  |-database
  |---__init__
  |---command1
  |---command2
  </code></pre>
  
  <p>This is my main file:</p>
  
  <pre><code>import click
  from commands.project import project
  from commands.database import database
  
  
  @click.group(help="Main command")
  def main():
      pass
  
  
  main.add_command(project)
  main.add_command(database)
  </code></pre>
  
  <p>My projects <code>__init__</code> file:</p>
  
  <pre><code>from commands.project.command1 import *
  from commands.project.command2 import *
  import click
  
  
  @click.group(help="Projects")
  def project():
      pass
  
  
  project.add_command(command1)
  project.add_command(command2)
  </code></pre>
  
  <p>My <code>commands.project.command1</code> file:</p>
  
  <pre><code>import click
  
  
  @click.command()
  def command1():
      """
      Execute all the steps required to update the project.
      """
      pass
  </code></pre>
  
  <p>The main point here is that, every time I want to add a new subcommand, I need to:</p>
  
  <ol>
  <li><p>Add <code>.py</code> file with all code to the command, in respective subcommand/submodule folder (obviously!)</p></li>
  <li><p>Add it's <code>import</code> statement on it's <code>__init__</code> file</p></li>
  <li><p>Relate this new command to it's parent (project/database, in this case)</p></li>
  </ol>
  
  <p>Is there any way to do a circular/dynamic load to avoid step no.2 and 3?</p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>After tried Stephen Rauch way, it successfully includes all provided files, but none of the commands works with <code>-</code> only with function name (eg: <strike><code>update-project</code></strike> -> <code>update_project</code>).</p>
  
  <pre><code>root
  |-commands
  |-project
  |---update
  |---install_project
  |-database
  |---command_one
  |---command_two
  </code></pre>
  
  <p><strong>main.py</strong></p>
  
  <pre><code># main command ----------------------------------------------------------- ###
  @click.group(help="CLI tool!", context_settings=dict(max_content_width=120))
  def main():
      pass
  
  
  # PROJECT command group -------------------------------------------------------- ###
  @main.group(cls=group_from_folder("commands/project"),
              short_help="Project installation and upgrade utils.",
              help="Project installation and upgrade.")
  def project():
      pass
  </code></pre>
  
  <p><strong>commands/project/install_project.py</strong></p>
  
  <pre><code>import click    
  
  @click.command(name="install-project",
                 help="This options allows you to easily install project",
                 short_help="Install a brand new project")
  @click.pass_context
  def install_project(ctx):
  </code></pre>
  
  <p><strong>CLI result <code>main project --help</code></strong> <em>(note the <code>install_project</code> instead <code>install-project</code> sub command)</em></p>
  
  <pre><code>Usage: main project [OPTIONS] COMMAND [ARGS]...
  
    Project installation and upgrade.
  
  Options:
    --help  Show this message and exit.
  
  Commands:
    install_project                     Install a brand new project one
  </code></pre>