initial commit

This commit is contained in:
2026-03-22 02:25:16 +01:00
commit eb72820ce9
42 changed files with 2506 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
using System.CommandLine;
using Hush.Daemon;
using Spectre.Console;
namespace Hush.Cli.Commands;
public static class StopCommand
{
public static Command Create()
{
var command = new Command("stop", "Stop recording and process");
command.SetHandler(async (context) =>
{
try
{
await using var client = new SocketClient();
await client.ConnectAsync(TimeSpan.FromSeconds(2));
await client.SendCommandAsync(DaemonProtocol.STOP);
AnsiConsole.MarkupLine("[green]Stop command sent[/]");
}
catch (Exception ex)
{
AnsiConsole.MarkupLine($"[red]Error: {ex.Message}[/]");
context.ExitCode = 1;
}
});
return command;
}
}