`CLICommandInvoker` can make this a lot easier.