judgevet.adapters.inbound.cli_options

Status: draft.

judgevet.adapters.inbound.cli_options

Register explicit file options through Typer's public command extension.

Examples:

from judgevet.adapters.inbound.cli_options import FileInputs

assert FileInputs().evidence is None
See Also

CommandOptions

Bases: TypedDict

Describe the public Typer command constructor keyword options.

Attributes:

Name Type Description
context_settings dict

Context construction settings.

callback Callable

Command callback.

help str

Full command help.

epilog str

Help epilog.

short_help str

Short help.

options_metavar str

Option placeholder.

add_help_option bool

Enable help option.

no_args_is_help bool

Show help without arguments.

hidden bool

Hide command.

deprecated bool

Mark deprecated command.

rich_markup_mode str

Help markup selection.

rich_help_panel str

Rich help panel.

FileCommand

Bases: TyperCommand

Add explicit file options while retaining the ordinary callback signature.

Attributes:

Name Type Description
context_class type

Public Typer context for metadata and provider choice.

Examples:

assert FileCommand.context_class is typer.Context

__init__(name, *, params=None, **kwargs)

Register repeated options so command validation can diagnose duplicates.

Parameters:

Name Type Description Default
name str | None

Command name.

required
params list[TyperArgument | TyperOption] | None

Callback parameters generated by Typer.

None

Other Parameters:

Name Type Description
**kwargs Unpack[CommandOptions]

Public command constructor options.

FileInputs dataclass

Group optional policy and evidence paths for internal dispatch.

Attributes:

Name Type Description
policy str | None

Explicit policy path.

evidence str | None

Explicit image manifest path.

Examples:

assert FileInputs().policy is None

file_values(ctx, name)

Retrieve typed option occurrences without using provider selection storage.

Parameters:

Name Type Description Default
ctx Context

Current invocation context.

required
name str

Registered option name.

required

Returns:

Type Description
list[str]

Ordered string values, empty when the option is absent.

Raises:

Type Description
TypeError

Invocation metadata contains an unexpected value.