Skip to content

feat: enhance help command with examples and exit codes section - #67

Merged
bomly-guy merged 1 commit into
mainfrom
help-improvements
May 15, 2026
Merged

bomly-guy merged 1 commit into
mainfrom
help-improvements

Conversation

@bomly-guy

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements to the CLI user experience, focusing on clearer help output, more structured and modular flag binding, and enhanced discoverability through command examples. The most significant changes include the addition of an exit codes section to the root help, modularization of command flag groups, improved help and usage text, and expanded usage examples for key commands.

Help Output and Usage Improvements:

  • Added an "Exit Codes" section to the root help output, listing all possible exit codes and their meanings. This section is only shown in the root help, not in subcommands. [1] [2] [3] [4] [5]
  • Improved the root command's usage and short description, and added a set of example usages for better discoverability.
  • Updated the help template logic so that the root usage line is only shown in the correct context, and ensured non-global flags are omitted from the root help. [1] [2] [3]

Command Flag Binding Refactor:

  • Introduced modular flag group binding via BindCommandFlagGroups, allowing commands to specify which logical groups of flags they support. This improves flag organization and ensures only relevant flags are available per command. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated tests to reflect the new flag binding and scoping logic, ensuring that global and command-scoped flags are correctly handled. [1] [2] [3] [4] [5]

Command Examples and Messaging:

  • Added detailed Example usage strings to the diff, explain, and plugin commands and subcommands to improve user onboarding and clarify command usage. [1] [2] [3] [4] [5]
  • Updated the branding message in the startup logo from "SBOM clarity with momentum." to "Analyze Your Software DNA." [1] [2]

Internal Refactoring and Consistency:

  • Ensured the Bomly logo animation is shown for all help output by recursively setting the help function for all commands.
  • Improved and clarified long descriptions for commands, including more accurate information about what can be compared in the diff command.

These changes collectively make the CLI more user-friendly, maintainable, and informative.

@bomly-guy
bomly-guy merged commit b9c309a into main May 15, 2026
1 check passed
@bomly-guy
bomly-guy deleted the help-improvements branch May 15, 2026 05:32
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.

1 participant