Skip to content

commands

commands

Command registry for terok-clearance.

Re-exports CommandDef and ArgDef from terok_util — the shared CLI vocabulary every terok-* sibling package now lines up on — and defines the COMMANDS tuple as the single source of truth consumed by both the standalone CLI and the terok integration layer.

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

COMMANDS = (CommandDef(name='notify', help='Send a one-shot desktop notification', handler=_handle_notify, args=(ArgDef(name='summary', help='Notification title'), ArgDef(name='body', nargs='?', default='', help='Notification body text'), ArgDef(name='-t/--timeout', dest='timeout', type=int, default=(-1), help='Expiration timeout in milliseconds (-1 = server default)'))), CommandDef(name='serve', help='Run the clearance hub (serves org.terok.Clearance1 varlink on a unix socket)', handler=_handle_serve), CommandDef(name='serve-verdict', help='Run the verdict helper (serves org.terok.ClearanceVerdict1 for shield exec)', handler=_handle_serve_verdict), CommandDef(name='clearance', help='Interactive terminal tool for shield clearance verdicts', handler=_handle_clearance)) module-attribute