httk.handlers.core

Functions

register_cli_command(→ None)

Register a lazy top-level httk command.

Package Contents

httk.handlers.core.register_cli_command(name: str, handler: str | collections.abc.Callable[Ellipsis, Any], summary: str) None[source]

Register a lazy top-level httk command.

A handler is either a callable or a lazy "module:callable" reference with the contract (argv: Sequence[str], context: CLIContext) -> int. Names use lowercase, hyphen-separated command syntax. Registration is intentionally strict: reserved names and duplicate registrations are errors rather than order-dependent overrides.