def add(ctx, alias, mapping, backend):
    """
    Add a new alias to your configuration file.
    """
    if not backend:
        backends_list = ctx.obj['settings'].get_backends()
        if len(backends_list) > 1:
            raise click.UsageError(
                "You're using more than 1 backend. Please set the backend to "
                "add the alias to with the --backend option (choices are %s)" %
                ", ".join(dict(backends_list).keys())
            )

    add_mapping(ctx, alias, mapping, backend)