Skip to main content

Module flags

Module flags 

Source
Expand description

Global framework flags and flag-extraction helpers.

Structs§

GlobalFlags
Parsed framework-global flags.

Functions§

default_output_format
Computes the default output format for app_id, consulting the ${APP_ID}_OUTPUT env override and whether stdout is an interactive terminal. Used as the fallback when no explicit --output/--json/ --toon/--human is given.
derive_bool_flags
Derives flag names that do not consume the following token.
derive_value_flags
Derives flag names that consume the following token.
extract_command_path
Extracts a colon-separated command path from raw args.
extract_output_format
Extracts output format from raw args.
extract_search_query
Extracts --search from raw args before normal parsing.
global_flags_from_matches
Extracts framework-global flags from parsed clap matches, falling back to default_format when the user gave no explicit output format.
has_true_schema_flag
Reports whether raw args contain a true --schema flag.
output_env_var
Derives the per-application output-format override env var from an app id, e.g. godaddy -> GODADDY_OUTPUT, gdx -> GDX_OUTPUT.
register_global_flags
Registers framework-global flags on a clap command.
resolve_default_output_format
Resolves the default output format when the user gave no explicit format.