code: def main(
          template, extra_context, no_input, checkout, verbose,
          replay, overwrite_if_exists, output_dir, config_file,
          default_config, debug_file):
      
      # If you _need_ to support a local template in a directory
      # called 'help', use a qualified path to the directory.
      if template == u'help':
          click.echo(click.get_current_context().get_help())
          sys.exit(0)
  
      configure_logger(
          stream_level='DEBUG' if verbose else 'INFO',
          debug_file=debug_file,
      )
  
      try:
          cookiecutter(
              template, checkout, no_input,
              extra_context=extra_context,
              replay=replay,
              overwrite_if_exists=overwrite_if_exists,
              output_dir=output_dir,
              config_file=config_file,
              default_config=default_config,
              password=os.environ.get('COOKIECUTTER_REPO_PASSWORD')
          )
      except (OutputDirExistsException,
              InvalidModeException,
              FailedHookException,
              UnknownExtension,
              InvalidZipRepository,
              RepositoryNotFound,
              RepositoryCloneFailed) as e:
          click.echo(e)
          sys.exit(1)
      except UndefinedVariableInTemplate as undefined_err:
          click.echo('{}'.format(undefined_err.message))
          click.echo('Error message: {}'.format(undefined_err.error.message))
  
          context_str = json.dumps(
              undefined_err.context,
              indent=4,
              sort_keys=True
          )
          click.echo('Context: {}'.format(context_str))
          sys.exit(1)
docs: Create a project from a Cookiecutter project template (TEMPLATE).
  
      Cookiecutter is free and open source software, developed and managed by
      volunteers. If you would like to help out or fund the project, please get
      in touch at https://github.com/audreyr/cookiecutter.