2020-08-05 13:59:46 +02:00
|
|
|
#!/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.
|
|
|
|
"""
|
2020-08-05 13:59:46 +02:00
|
|
|
# builtins
|
|
|
|
import click
|
2021-09-03 13:17:06 +02:00
|
|
|
|
2020-08-05 13:59:46 +02:00
|
|
|
@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
|
|
|
|
"""
|
2020-08-05 13:59:46 +02:00
|
|
|
if version:
|
2020-10-05 11:08:27 +02:00
|
|
|
from halfapi import version
|
2020-10-07 09:50:46 +02:00
|
|
|
click.echo(version())
|
2020-08-05 13:59:46 +02:00
|
|
|
|
2021-11-23 11:39:33 +01:00
|
|
|
from . import config
|
|
|
|
from . import domain
|
|
|
|
from . import run
|
|
|
|
from . import init
|
2021-11-22 20:06:50 +01:00
|
|
|
from . import routes
|