This repository has been archived on 2020-06-17. You can view files and clone it, but cannot push or open issues or pull requests.
autonomic/autonomic/__main__.py

34 lines
781 B
Python

"""Command-line entrypoint."""
import os
import click
from autonomic.command import init
@click.group()
@click.option(
"--debug/--no-debug",
default=False,
help="Enable or disable debug mode",
show_default=True,
)
@click.pass_context
def autonomic(ctx, debug):
"""
\b
___ _ _
/ _ \ | | (_)
/ /_\ \_ _| |_ ___ _ __ ___ _ __ ___ _ ___
| _ | | | | __/ _ \| '_ \ / _ \| '_ ` _ \| |/ __|
| | | | |_| | || (_) | | | | (_) | | | | | | | (__
\_| |_/\__,_|\__\___/|_| |_|\___/|_| |_| |_|_|\___|
""" # noqa
ctx.obj = {}
ctx.obj["DEBUG"] = debug
ctx.obj["HOME"] = "/home/{user}".format(user=os.getlogin())
autonomic.add_command(init.init)