GitHub

global_flag

API reference for global_flag.

Flags every command accepts (Effect's GlobalFlag).

An Action does something instead of running the command (--help, --version, --wizard, --completions); a Setting is a value the runner provides to the handler as a service (--log-level, or your own: subclass Setting). built_ins are the defaults, which cli_config.layer(built_ins=...) replaces.

Re-exports

Values

AttributeTypeDescription
HelpAction[bool]
VersionAction[bool]
WizardAction[bool]

--wizard: the runner asks for the command's arguments interactively.

CompletionsAction[completions.Shell | None]
built_instuple[GlobalFlag, ...]

Types

TypeDefinitionDescription
GlobalFlagtype GlobalFlag = Action[Any] | type[Setting[Any]]

Classes