def parse_magic_invocation(line):
    """
    Parses the magic invocation for the commands

    As a general rule we want to forward the arguments to sfdx
    But we also need to pass the variable to capture the results

    %%sfdx:cmd {var?} {...options}

    """
    args = {"variable": None, "sfdx_args": ""}

    line = line.strip()

    if line.startswith("-"):
        args["sfdx_args"] = line
        return args
    else:
        [variable, *sfdx_args] = line.split(" ")
        args = {"variable": variable, "sfdx_args": " ".join(sfdx_args)}
        return args