File tree Expand file tree Collapse file tree
src/{{project_slug}}/{% if with_typer_cli %}cli{% endif %} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ project_name:
1313 help : What is your project name?
1414 validator : >-
1515 {% if not (project_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
16- project_name must start with a letter, followed by one or more letters,
16+ Project name must start with a letter, followed by one or more letters,
1717 digits or dashes all lowercase.
1818 {% endif %}
1919
@@ -130,8 +130,8 @@ cli_name:
130130 help : Set the CLI's name
131131 default : " {{ project_name }}"
132132 validator : >-
133- {% if not (project_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
134- project_name must start with a letter, followed by one or more letters,
133+ {% if not (cli_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
134+ The CLI's name must start with a letter, followed by one or more letters,
135135 digits or dashes all lowercase.
136136 {% endif %}
137137
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ classifiers = [
2929 {%- endfor %}
3030 " Topic :: Software Development :: Libraries :: Python Modules " ,
3131]
32+ dependencies = [
33+ {%- if with_typer_cli %}
34+ " typer >=0.15.2",
35+ {% - endif %}
36+ ]
3237
3338{% if repository_provider == 'github' -%}
3439[project.urls]
@@ -37,7 +42,6 @@ Repository = "{{ repository }}"
3742Documentation = "{{ documentation }}"
3843{% - endif %}
3944
40-
4145{% if with_typer_cli -%}
4246[project.scripts]
4347{{ cli_name }} = "{{ project_slug }}.cli.main:app"
@@ -71,7 +75,7 @@ name = "cz_gitmoji"
7175{% - else %}
7276name = "cz_conventional_commits"
7377{% - endif %}
74- version_files = ["src/{{ project_slug }}/__version__.py"{% if dockerfile %} ", compose.yaml"{% endif %} ]
78+ version_files = ["src/{{ project_slug }}/__version__.py"{% if dockerfile %} , " compose.yaml"{% endif %} ]
7579tag_format = "$version"
7680version_scheme = "pep440"
7781version_provider = "uv"
Original file line number Diff line number Diff line change 1+ import typer
12from rich import print as rprint
2- from typer import Typer
33
44from {{ project_slug }} import __version__
55
66app = typer.Typer()
77
8+
89@app.command(rich_help_panel="Help and Others", help="Show the CLI's version.")
910def version() -> None:
1011 rprint(f"{{ cli_name }} Version: [green]{__version__}[/green]")
Original file line number Diff line number Diff line change 11from typing import Annotated
22
33from rich import print as rprint
4- from typer import Typer
4+ import typer
55
66from {{ project_slug }} import __version__
77from {{ project_slug }}.cli.commands import version
@@ -10,7 +10,7 @@ app = typer.Typer(
1010 help="{{ cli_name }} CLI.",
1111 no_args_is_help=True,
1212 rich_markup_mode="rich",
13- # epilog="Made with [red]:heart:[/red] by [bold]Bassem Karoui [/bold]",
13+ # epilog="Made with [red]:heart:[/red] by [bold]{{ author_fullname }} [/bold]",
1414 # pretty_exceptions_show_locals=False,
1515)
1616
@@ -24,4 +24,4 @@ def callback(
2424 raise typer.Exit()
2525
2626
27- app.add_typer(version.app, help="Show the CLI's version." )
27+ app.add_typer(version.app)
You can’t perform that action at this time.
0 commit comments