initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user