def METHOD_NAME(
    path: t.Union[str, Path],
    dialect: t.Optional[str],
    template: ProjectTemplate = ProjectTemplate.DEFAULT,
) -> None:
    root_path = Path(path)
    config_extension = "py" if template == ProjectTemplate.DBT else "yaml"
    config_path = root_path / f"config.{config_extension}"
    audits_path = root_path / "audits"
    macros_path = root_path / "macros"
    models_path = root_path / "models"
    seeds_path = root_path / "seeds"
    tests_path = root_path / "tests"
    if config_path.exists():
        raise click.ClickException(f"Found an existing config in '{config_path}'")
    if not dialect and template != ProjectTemplate.DBT:
        raise click.ClickException(
            "Default SQL dialect is a required argument for SQLMesh projects"
        )
    _create_config(config_path, dialect, template)
    if template == ProjectTemplate.DBT:
        return
    _create_folders([audits_path, macros_path, models_path, seeds_path, tests_path])
    _create_macros(macros_path)
    _create_audits(audits_path)
    _create_models(models_path)
    _create_seeds(seeds_path)
    _create_tests(tests_path)