using System.CommandLine; using System.CommandLine.Builder; using System.CommandLine.Parsing; using Hush.Cli.Commands; namespace Hush.Cli; public class Program { public static async Task Main(string[] args) { var rootCommand = CreateRootCommand(); var parser = new CommandLineBuilder(rootCommand) .UseDefaults() .Build(); return await parser.InvokeAsync(args); } private static RootCommand CreateRootCommand() { var rootCommand = new RootCommand("Hush - Speech-to-text daemon"); rootCommand.AddCommand(ToggleCommand.Create()); rootCommand.AddCommand(StartCommand.Create()); rootCommand.AddCommand(StopCommand.Create()); rootCommand.AddCommand(AbortCommand.Create()); rootCommand.AddCommand(StatusCommand.Create()); rootCommand.AddCommand(DaemonCommand.Create()); rootCommand.AddCommand(SetupCommand.Create()); rootCommand.AddCommand(LatencyTestCommand.Create()); rootCommand.AddCommand(ShowCommand.Create()); rootCommand.AddCommand(ProfilesCommand.Create()); return rootCommand; } }