@@ -103,8 +103,8 @@ For detailed help on any command, use:
103103
104104var newCmd = & cobra.Command {
105105 Use : "new [workflow]" ,
106- Short : "Create a new workflow Markdown file with example configuration" ,
107- Long : `Create a new workflow Markdown file with commented examples and explanations of all available options.
106+ Short : "Create a new agentic workflow file with example configuration" ,
107+ Long : `Create a new agentic workflow file with commented examples and explanations of all available options.
108108
109109When called without a workflow name (or with --interactive flag), launches an interactive wizard
110110to guide you through creating a workflow with custom settings.
@@ -162,7 +162,7 @@ Examples:
162162var removeCmd = & cobra.Command {
163163 Use : "remove [pattern]" ,
164164 Short : "Remove agentic workflow files matching the given name prefix" ,
165- Long : `Remove workflow files matching the given workflow-id pattern.
165+ Long : `Remove agentic workflow files matching the given workflow-id pattern.
166166
167167The workflow-id is the basename of the Markdown file without the .md extension.
168168You can provide a workflow-id prefix to remove multiple workflows, or a specific workflow-id.
@@ -224,7 +224,7 @@ Examples:
224224
225225var compileCmd = & cobra.Command {
226226 Use : "compile [workflow]..." ,
227- Short : "Compile workflow Markdown files (.md) into GitHub Actions workflows (.lock.yml)" ,
227+ Short : "Compile agentic workflow files (.md) into GitHub Actions workflows (.lock.yml)" ,
228228 Long : `Compile one or more agentic workflows to YAML workflows.
229229
230230If no workflows are specified, all Markdown files in .github/workflows will be compiled.
@@ -790,6 +790,30 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all
790790 rootCmd .AddCommand (completionCmd )
791791 rootCmd .AddCommand (hashCmd )
792792 rootCmd .AddCommand (projectCmd )
793+
794+ // Fix help flag descriptions for all subcommands to be consistent with the
795+ // root command ("Show help for gh aw" vs the Cobra default "help for [cmd]").
796+ var fixSubCmdHelpFlags func (cmd * cobra.Command )
797+ fixSubCmdHelpFlags = func (cmd * cobra.Command ) {
798+ cmd .InitDefaultHelpFlag ()
799+ if f := cmd .Flags ().Lookup ("help" ); f != nil {
800+ cmdPath := cmd .CommandPath ()
801+ // CommandPath() uses Name() which returns the first word of Use
802+ // ("gh" from "gh aw"), so subcommand paths look like "gh compile".
803+ // Replace the leading "gh " prefix with "gh aw " to match the root
804+ // command's display name.
805+ if strings .HasPrefix (cmdPath , "gh " ) && ! strings .HasPrefix (cmdPath , "gh aw" ) {
806+ cmdPath = "gh aw " + cmdPath [3 :]
807+ }
808+ f .Usage = "Show help for " + cmdPath
809+ }
810+ for _ , sub := range cmd .Commands () {
811+ fixSubCmdHelpFlags (sub )
812+ }
813+ }
814+ for _ , sub := range rootCmd .Commands () {
815+ fixSubCmdHelpFlags (sub )
816+ }
793817}
794818
795819func main () {
0 commit comments