python
import click
@click.command()
@click.argument('name')
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--uppercase', is_flag=True, help='Convert to uppercase.')
def greet(name, count, uppercase):
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
if uppercase:
click.echo(f"Hello, {name.upper()}!")
else:
click.echo(f"Hello, {name}!")
if __name__ == '__main__':
greet()
pip install click
python greet.py --count 3 --uppercase Alice
HELLO, ALICE!
HELLO, ALICE!
HELLO, ALICE!