2020-08-05 13:59:46 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# builtins
|
|
|
|
import click
|
|
|
|
from halfapi.conf import IS_PROJECT
|
|
|
|
|
|
|
|
@click.group(invoke_without_command=True)
|
|
|
|
@click.option('--version', is_flag=True)
|
|
|
|
@click.pass_context
|
|
|
|
def cli(ctx, version):
|
|
|
|
if version:
|
|
|
|
import halfapi
|
2020-08-27 11:25:20 +02:00
|
|
|
return click.echo(halfapi.version())
|
2020-08-05 13:59:46 +02:00
|
|
|
|
|
|
|
if IS_PROJECT:
|
2020-08-27 11:25:20 +02:00
|
|
|
import halfapi.cli.config
|
2020-08-05 13:59:46 +02:00
|
|
|
import halfapi.cli.domain
|
|
|
|
import halfapi.cli.run
|
2020-08-27 11:25:20 +02:00
|
|
|
|
2020-08-05 13:59:46 +02:00
|
|
|
else:
|
|
|
|
import halfapi.cli.init
|