'This works exactly like the method of the same name on a regular
:class:`click.Group` but it wraps callbacks in :func:`with_appcontext`
unless it\'s disabled by passing ``with_appcontext=False``.'

def command(self, *args, **kwargs):

    wrap_for_ctx = kwargs.pop('with_appcontext', True)
    def decorator(f):
        if wrap_for_ctx:
            f = with_appcontext(f)
        return click.Group.command(self, *args, **kwargs)(f)
    return decorator
