Command Line Interface

This page documents the command-line interface implementation for hid_usb_relay.

Use the console script hid-usb-relay-cli to list connected devices, read relay state, and control relays.

Command-line interface for HID USB relay operations.

RelayCLI()

CLI application wrapper that owns parser and service usage.

Source code in src\hid_usb_relay\cli.py
15
16
def __init__(self) -> None:
    self.service = RelayService()

run_cli(argv=None)

Entrypoint compatible wrapper for packaging scripts.

Source code in src\hid_usb_relay\cli.py
67
68
69
def run_cli(argv: Sequence[str] | None = None) -> int:
    """Entrypoint compatible wrapper for packaging scripts."""
    return RelayCLI().run(argv)