Skip to content

Conversation

@drewburlingame
Copy link
Collaborator

Implement argument grouping to organize command options under labeled sections in help output, improving readability for commands with many options.

Key features:

  • ArgumentGroupAttribute: Apply to IArgumentModel classes to set a default group for all options
  • OptionAttribute.Group: Set group name on individual options
  • Group inheritance: Nested models inherit parent group unless overridden
  • Property-level override: Individual options can override model-level group
  • Alphabetical sorting: Groups displayed in alphabetical order
  • Backward compatible: Ungrouped options displayed first in help text

Changes include:

  • New ArgumentGroupAttribute for model-level grouping
  • Group property added to Option and OptionAttribute
  • Enhanced help text providers (BasicHelpTextProvider, HelpTextProvider) to render grouped options with headers
  • Comprehensive test coverage for various grouping scenarios including:
    • Basic option grouping
    • Model-level grouping with ArgumentGroupAttribute
    • Property-level overrides
    • Nested model inheritance and overrides
    • Mixed options and operands

Also removes obsolete LogProvider references from AppRunner.

Implement argument grouping to organize command options under labeled
sections in help output, improving readability for commands with many
options.

Key features:
- ArgumentGroupAttribute: Apply to IArgumentModel classes to set a
  default group for all options
- OptionAttribute.Group: Set group name on individual options
- Group inheritance: Nested models inherit parent group unless overridden
- Property-level override: Individual options can override model-level group
- Alphabetical sorting: Groups displayed in alphabetical order
- Backward compatible: Ungrouped options displayed first in help text

Changes include:
- New ArgumentGroupAttribute for model-level grouping
- Group property added to Option and OptionAttribute
- Enhanced help text providers (BasicHelpTextProvider, HelpTextProvider)
  to render grouped options with headers
- Comprehensive test coverage for various grouping scenarios including:
  * Basic option grouping
  * Model-level grouping with ArgumentGroupAttribute
  * Property-level overrides
  * Nested model inheritance and overrides
  * Mixed options and operands

Also removes obsolete LogProvider references from AppRunner.
@drewburlingame drewburlingame merged commit 0a41372 into master Nov 20, 2025
8 checks passed
@drewburlingame drewburlingame deleted the option-groups branch November 20, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants