I know there is way to declare rules that need to be executed on the local machine using localrules as:
localrules: all, foo
Is there a similar
I do not think this is supported unfortunately. I checked the snakemake source code, and one way to hack this is do to something like this:
all_rules = [rule for rule in dir(rules) if not rule.startswith("__")]
cluster_rules = ["my_cluster_rule1", "my_cluster_rule2"]
workflow._localrules = set(rule for rule in all_rules if rule not in cluster_rules)
I haven't tested it but I think this should work. This way we just overwrite what Snakemake parsed from the document. The problem with doing something like this is that it might not be stable between different snakemake versions.