Expand description
Global framework flags and flag-extraction helpers.
Structs§
- Global
Flags - Parsed framework-global flags.
Functions§
- app_
id_ env_ prefix - Sanitizes an app id into an environment-variable prefix: ASCII alphanumerics
are uppercased and every other character becomes
_, e.g.godaddy->GODADDY,my-cli->MY_CLI. - debug_
component_ enabled - Reports whether a
--debugpattern enables a named component. - default_
output_ format - Computes the default output format for
app_id, consulting the${APP_ID}_OUTPUTenv override and whether stdout is an interactive terminal. Used as the fallback when no explicit--output/--json/--toon/--humanis 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
--searchfrom raw args before normal parsing. - global_
flags_ from_ matches - Extracts framework-global flags from parsed
clapmatches, falling back todefault_formatwhen the user gave no explicit output format. - has_
true_ schema_ flag - Reports whether raw args contain a true
--schemaflag. - 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
clapcommand. - resolve_
default_ output_ format - Resolves the default output format when the user gave no explicit format.