from typing import Callable
import click


def with_input(func: Callable) -> Callable:
    """
    Attaches a "source" argument to the command.
    """
    return click.argument(
        "source", type=click.Path(exists=True), required=True
    )(func)