Files
hush/Hush.Cli/Program.cs
T
2026-03-22 02:25:16 +01:00

37 lines
1.1 KiB
C#

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<int> 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());
return rootCommand;
}
}