using System.CommandLine; using System.CommandLine.Parsing; var rootCommand = new RootCommand("ScadaLink CLI — manage the ScadaLink SCADA system"); var contactPointsOption = new Option("--contact-points") { Description = "Comma-separated cluster contact points", Recursive = true }; var usernameOption = new Option("--username") { Description = "LDAP username", Recursive = true }; var passwordOption = new Option("--password") { Description = "LDAP password", Recursive = true }; var formatOption = new Option("--format") { Description = "Output format (json or table)", Recursive = true }; formatOption.DefaultValueFactory = _ => "json"; rootCommand.Add(contactPointsOption); rootCommand.Add(usernameOption); rootCommand.Add(passwordOption); rootCommand.Add(formatOption); // Placeholder — command groups will be added in Task 6 rootCommand.SetAction(_ => { Console.WriteLine("Use --help to see available commands."); }); var parseResult = CommandLineParser.Parse(rootCommand, args); return await parseResult.InvokeAsync();