Files
tomi eb0619dea2 add configuration profiles with per-invocation --profile flag
- Add SystemPrompt field to HushConfig (empty = built-in default)
- Refactor ConfigManager: extract ApplyTomlFields, add LoadWithProfile(),
  ListProfiles(), GetProfilePath(), EnsureProfilesDirExists(); remove
  HUSH_PROFILE env-var logic (profiles are now resolved by the CLI)
- Extend socket protocol: action commands (START/STOP/TOGGLE/ABORT) now
  carry a [4-byte LE length][optional HushConfig JSON] payload so the CLI
  can pass a per-invocation config override without restarting the daemon
- Add GENERATE_PROFILE (cmd 7) socket command: CLI sends a description,
  daemon calls the LLM and returns a generated system prompt
- Orchestrator: StopAndProcessAsync accepts optional HushConfig override;
  ProcessWithLlmAsync uses proper system/user chat roles and respects
  config.SystemPrompt; add GenerateProfilePromptAsync
- Split CompleteTextAsync signature to (systemPrompt, userMessage, model)
  across ITextStreamingProvider, GroqProvider, FireworksProvider
- Add --profile/-p flag to hush toggle and hush stop
- Add hush profiles subcommand: list, get, new (manual or AI-generated), edit
2026-03-23 00:38:29 +01:00

38 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());
rootCommand.AddCommand(ProfilesCommand.Create());
return rootCommand;
}
}