1
0

feat: Introduce explicit start, stop, and status commands, including minimum recording duration.

This commit is contained in:
2026-02-28 18:06:15 +01:00
parent 8ec0629e1a
commit a55e599c4f
13 changed files with 234 additions and 283 deletions

View File

@@ -23,6 +23,25 @@ public class Program
toggleCmd.SetHandler(ToggleCommand.ExecuteAsync, pipeOption, copyOption, verboseOption);
rootCommand.AddCommand(toggleCmd);
// Start Command
var startCmd = new Command("start", "Explicitly starts the recording");
startCmd.SetHandler(StartCommand.ExecuteAsync, verboseOption);
rootCommand.AddCommand(startCmd);
// Stop Command
var stopCmd = new Command("stop", "Explicitly stops the recording");
stopCmd.AddOption(pipeOption);
stopCmd.AddOption(copyOption);
stopCmd.SetHandler(StopCommand.ExecuteAsync, pipeOption, copyOption, verboseOption);
rootCommand.AddCommand(stopCmd);
// Status Command
var statusCmd = new Command("status", "Outputs the current daemon status");
var jsonOption = new Option<bool>("--json", "Output status as JSON");
statusCmd.AddOption(jsonOption);
statusCmd.SetHandler(StatusCommand.ExecuteAsync, jsonOption, verboseOption);
rootCommand.AddCommand(statusCmd);
// Daemon Command
var daemonCmd = new Command("daemon", "Starts the background service");
daemonCmd.SetHandler(Toak.Core.DaemonService.StartAsync, verboseOption);