httk.core.cli

Extensible root command-line interface for httk.

Classes

CLIContext

Carry invocation context to a registered top-level command.

Functions

main([argv])

Dispatch the httk executable.

Module Contents

class httk.core.cli.CLIContext[source]

Carry invocation context to a registered top-level command.

Parameters:
  • program – Program name used in command output and help.

  • cwd – Working directory selected for the command invocation.

program: str[source]
cwd: pathlib.Path[source]
httk.core.cli.main(argv=None)[source]

Dispatch the httk executable.

The optional -C prefix changes the process working directory before resolving the command, and the returned value is the command’s exit code.

Parameters:

argv (collections.abc.Sequence[str] | None) – Command-line arguments without the executable name, or None to use sys.argv.

Returns:

Exit status for the requested command.

Return type:

int