halfapi/halfapi/cli/cli.py

29 lines
592 B
Python
Raw Normal View History

#!/usr/bin/env python3
2020-10-05 11:08:27 +02:00
"""
cli/cli.py Main entry point of halfapi cli tool
The init command is the only command loaded if not in a *project dir*, and it is
not loaded otherwise.
"""
# builtins
import click
@click.group(invoke_without_command=True)
@click.option('--version', is_flag=True)
@click.pass_context
def cli(ctx, version):
2020-10-05 11:08:27 +02:00
"""
HalfAPI Cli entry point
It uses the Click library
"""
if version:
2020-10-05 11:08:27 +02:00
from halfapi import version
click.echo(version())
2021-11-23 11:39:33 +01:00
from . import config
from . import domain
from . import run
from . import init
from . import routes