I’ve used the node.js version of argparse, which as I understand it, is a clone of the python implementation and I’ve not seen how to do mutually exclusive flags. Mind you, at the time I didn’t need them, so it wasn’t an issue, but I don’t recall seeing any way to do it either.
However I’ve never had to use that feature. Like I said it can make sense in specific contexts but it is a pretty strong indicator that you have built in a CLI antipattern or too much complexity.
I’ve used the node.js version of argparse, which as I understand it, is a clone of the python implementation and I’ve not seen how to do mutually exclusive flags. Mind you, at the time I didn’t need them, so it wasn’t an issue, but I don’t recall seeing any way to do it either.
Did I miss something?
https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_mutually_exclusive_group
However I’ve never had to use that feature. Like I said it can make sense in specific contexts but it is a pretty strong indicator that you have built in a CLI antipattern or too much complexity.