def add_options(options):
    """
    Decorator that adds a list of command line options to a Click command or
    group.

    The list is processed in reversed order because of the way Click processes
    options.

    Parameters:

      options (list): List of click.option objects defining the options to add.
    """

    def _add_options(func):
        """
        Reverse options list, else if single item,
        make into a list.
        """
        for option in reversed(options):
            func = option(func)
        return func

    return _add_options