def arg(*args, **kwargs):
    """Return an attrib() that can be fed as a command-line argument.

    This function is a wrapper for an attr.attrib to create a corresponding
    command line argument for it. Use it with the same arguments as argparse's
    add_argument().

    Example:

    >>> @attrs
    ... class MyFeature(Feature):
    ...     my_number = arg('-n', '--number', default=3)
    ...     def run(self):
    ...         print('Your number:', self.my_number)

    Now you could run it like `firefed myfeature --number 5`.
    """
    metadata = {'arg_params': (args, kwargs)}
    return attrib(default=arg_default(*args, **kwargs), metadata=metadata)