30 lines
533 B
Python
30 lines
533 B
Python
import click
|
|
|
|
from ..tools import context
|
|
from ..tools.ble import monitor, scanner
|
|
|
|
|
|
@click.command(name="scan")
|
|
def scanner_cmd() -> None:
|
|
scanner.run()
|
|
|
|
|
|
@click.command(name="monitor")
|
|
def monitor_cmd() -> None:
|
|
monitor.run()
|
|
|
|
|
|
@click.command(name="tui")
|
|
def tui_cmd() -> None:
|
|
context.set_environment(context.BlattedEnvironment.TUI)
|
|
|
|
|
|
@click.group()
|
|
def main() -> None:
|
|
context.set_environment(context.BlattedEnvironment.CLI)
|
|
|
|
|
|
main.add_command(scanner_cmd)
|
|
main.add_command(monitor_cmd)
|
|
main.add_command(tui_cmd)
|