I'm trying to adapt an example from Flask documentation to create a custom command in a group:
import click
from flask import Flask
from flask.cli import AppGroup
app = Flask(__name__)
user_cli = AppGroup('user')
@user_cli.command('create')
@click.argument('name')
def create_user(name):
...
app.cli.add_command(user_cli)
$ flask user create demo
This appears to work fine, however when I run flask --help I see the commands listed without any help messages, e.g.:
Commands:
user
foo
db Perform database migrations.
How can I add a help message to a group of commands ('user' in this case)?