GitHub

API reference for Spec.

A command path as data: its flags, arguments, subcommands and examples.

Attributes

AttributeTypeDescription
pathtuple[str, ...]
namestr
aliasstr | None
descriptionstr | None
short_descriptionstr | None
unlistedbool
examplestuple[ExampleDoc, ...]

The examples for path, not for the bare command name.

annotationsContext[Any]
flagstuple[Flag, ...]

Local flags, then those shared by ancestors from the root down, then global flags with the built-ins first.

argumentstuple[Argument, ...]
subcommandstuple[Subcommand, ...]

Functions

__init__

__init__(path, name, alias, description, short_description, unlisted, examples, annotations, flags, arguments, subcommands) -> None
ParameterTypeDescription
pathtuple[str, ...]
namestr
aliasstr | None
descriptionstr | None
short_descriptionstr | None
unlistedbool
examplestuple[ExampleDoc, ...]
annotationsContext[Any]
flagstuple[Flag, ...]
argumentstuple[Argument, ...]
subcommandstuple[Subcommand, ...]