RootCommand ConfigureApp() { var rootCommand = new RootCommand(); AppendAddCommand(rootCommand); { var cmd = new Command("subscriptions"); rootCommand.Add(cmd); var loginAzCliOption = new Option <bool>("--login-az-cli", "Login from az cli Service Principial, not from Environment vars"); var list = new Command("list") { loginAzCliOption }; list.SetHandler((bool loginAzCli) => _subscriptionWorker.ListSubscriptions(loginAzCli), loginAzCliOption); cmd.Add(list); } return(rootCommand); }