#612·kong

[feature request] Optional `help` commands

Author: maratoriCreated Jun 26, 2026Updated Jun 26, 2026

It's very handy when a CLI prints help not only with --help flag, but also with help command. Let's add an option WithHelpCommands() which makes the following runs behaving the same:

bash
my-bin foo bar --help
my-bin foo bar -h
my-bin foo bar help
my-bin --help foo bar
my-bin -h foo bar
my-bin help foo bar

Now, users have to manipulate args to achieve the desired:

go
for i, arg := range os.Args[1:] {
	if arg == "help" {
		os.Args[1+i] = "--help"
	}
}