Skip to content

Commit afbe10f

Browse files
authored
feat: Improve Crawlee CLI help text (#1297)
### Description Adds a list of choices to the `Crawlee` CLI help text. ### Issues - Closes: #1295
1 parent 83fa8a4 commit afbe10f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/crawlee/_cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from pathlib import Path
88
from typing import Annotated, cast
99

10+
from click import Choice
11+
1012
try:
1113
import inquirer
1214
import typer
@@ -133,22 +135,26 @@ def create(
133135
'--crawler-type',
134136
'--template',
135137
show_default=False,
138+
click_type=Choice(crawler_choices),
136139
help='The library that will be used for crawling in your crawler. If none is given, you will be prompted.',
137140
),
138141
http_client: str | None = typer.Option(
139142
None,
140143
show_default=False,
144+
click_type=Choice(http_client_choices),
141145
help='The library that will be used to make HTTP requests in your crawler. '
142146
'If none is given, you will be prompted.',
143147
),
144148
package_manager: str | None = typer.Option(
145149
default=None,
146150
show_default=False,
151+
click_type=Choice(package_manager_choices),
147152
help='Package manager to be used in the new project. If none is given, you will be prompted.',
148153
),
149154
start_url: str | None = typer.Option(
150155
default=None,
151156
show_default=False,
157+
metavar='[START_URL]',
152158
help='The URL where crawling should start. If none is given, you will be prompted.',
153159
),
154160
*,

0 commit comments

Comments
 (0)