addGlobalFlags method
void
addGlobalFlags(
- ArgParser parser
Adds global flags to the provided parser.
Implementation
void addGlobalFlags(ArgParser parser) {
parser.addFlag(
'help',
abbr: 'h',
negatable: false,
help: 'Show this help message.',
);
parser.addFlag(
'version',
abbr: 'v',
negatable: false,
help: 'Show the version of the CLI tool.',
);
parser.addSeparator('Output formatting:');
parser.addFlag(
'json',
help: 'Output results in JSON format.',
negatable: false,
);
parser.addFlag(
'yaml',
help: 'Output results in YAML format.',
negatable: false,
);
}