Skip to content

_registry

_registry

Command registry for terok-dbus.

Provides :class:CommandDef and :class:ArgDef dataclasses describing every terok-dbus subcommand. The COMMANDS tuple is the single source of truth consumed by both the standalone CLI and the terok integration layer (terok dbus …).

Handler functions are async coroutines accepting **kwargs that match the declared :class:ArgDef names.

ArgDef(name, help='', type=None, default=None, action=None, dest=None, nargs=None) dataclass

Definition of a single CLI argument for a command.

CommandDef(name, help='', handler=None, args=()) dataclass

Definition of a terok-dbus subcommand.

Attributes:

Name Type Description
name str

Subcommand name (e.g. "notify").

help str

One-line help string for --help.

handler Callable[..., Coroutine[Any, Any, None]] | None

Async callable implementing the command logic.

args tuple[ArgDef, ...]

CLI arguments beyond the subcommand name.