How to set the command help
bin/console my:command --help
bin/console make:crud --help
Symfony's make:crud shows some help lines at the bottom, how is that set in an invokable command? I tried adding this to __invoke, but it didn't seem to work (although again, it might be related to lazy-loading).
$this
// the command help shown when running the command with the "--help" option
->setHelp('This is the help, not the description, and can be multiple lines.');
Ah, I had put it in the wrong spot, it needs to be set in configure()
public function configure(): void
{
$this->setHelp("This is the help for my:command");
}
What do you think about a class attribute for help, so as to avoid calling this,
#[AsCommand('my:command', 'From the extra-console documentation')]
#[CommandHelp(help: 'This is the help for my:command']
final class MyCommand extends InvokableServiceCommand
Of course, looking at this I have to wonder if this shouldn't just be added to the AsCommand attribute.
With an attribute in this class, what about having the option of passing in a filename? Symfony puts the help in separate files:

Yeah, that could indeed be useful!
What do you think about proposing for AsCommand itself in Symfony?
#[AsCommand('my:command', help: __DIR__.'/..')]