hubvault.entry.dispatch
Command-line interface entry point for the hubvault package.
This module defines the main Click command group used to expose the CLI for the project, including version reporting, global repository-path selection, and help configuration. It builds user-facing metadata from the project configuration and provides a top-level command entry point.
The module contains the following main components:
hubvaultcli()- Main Click command group for the CLI
Example:
>>> from hubvault.entry.dispatch import hubvaultcli
>>> # Typically invoked via a Click entry point:
>>> # python -m hubvault --help
Note
The version display is implemented via a Click option callback, which
prints version information and exits the process. Runtime repo discovery is
delegated to hubvault.entry.context.
print_version
- hubvault.entry.dispatch.print_version(ctx: Context, param: Option, value: bool) None[source]
Print the version information for the CLI and exit.
This callback is invoked by Click when the
--versionflag is provided. It prints the project title, version, and author list (if available), then exits the Click context.- Parameters:
ctx (
click.core.Context) – Click context for the current command invocation.param (
click.core.Option) – Current Click option metadata.value (bool) – Boolean flag indicating whether the option was provided.
- Returns:
None.- Return type:
None
- Raises:
click.exceptions.Exit – Raised implicitly when
click.Context.exit()is invoked after printing version information.
Example:
>>> import click >>> from hubvault.entry.dispatch import print_version >>> ctx = click.Context(click.Command('demo')) >>> print_version(ctx, click.Option(['--version']), True)
hubvaultcli
- hubvault.entry.dispatch.hubvaultcli(*args: t.Any, **kwargs: t.Any) t.Any
Main Click command group for the
hubvaultCLI.This command group provides a common entry point for subcommands and integrates global options such as
-C,--version, and help flags.- Parameters:
ctx (
click.core.Context) – Click context for the current command invocation.repo_path (str) – Optional repo path passed through
-C.
- Returns:
None.- Return type:
None
Example:
>>> # Typically invoked via a console entry point: >>> # $ hubvault -C /path/to/repo status