halfapi/halfapi/cli/cli.py

21 lines
432 B
Python
Raw Normal View History

#!/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
return click.echo(halfapi.version())
if IS_PROJECT:
import halfapi.cli.config
import halfapi.cli.domain
import halfapi.cli.run
else:
import halfapi.cli.init