21 lines
518 B
Python
21 lines
518 B
Python
|
G
|
"""
|
||
|
|
This module contains the main group for the utils CLI.
|
||
|
|
"""
|
||
|
|
|
||
|
|
import click
|
||
|
|
|
||
|
|
from utils_cli.utils import commands
|
||
|
|
|
||
|
|
|
||
|
|
@click.group()
|
||
|
|
@click.option("-v", "--verbose", is_flag=True, type=bool, help="Increase verbosity, especially useful for debugging.")
|
||
|
|
def cli(verbose):
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
# Loop through project commands, binding them all to the CLI.
|
||
|
|
for command_name in dir(commands):
|
||
|
|
command = getattr(commands, command_name)
|
||
|
|
if isinstance(command, click.Command):
|
||
|
|
cli.add_command(command, name=command_name)
|