From c6b87a5ce70bd601ed65573ab2412bb38b2e59c4 Mon Sep 17 00:00:00 2001 From: Tomi Eckert Date: Wed, 4 Mar 2026 12:10:14 +0100 Subject: [PATCH] feat: Add `SetupCommand` to run an interactive setup wizard. --- Commands/SetupCommand.cs | 13 +++++++++++++ Program.cs | 1 + 2 files changed, 14 insertions(+) create mode 100644 Commands/SetupCommand.cs diff --git a/Commands/SetupCommand.cs b/Commands/SetupCommand.cs new file mode 100644 index 0000000..cbd4925 --- /dev/null +++ b/Commands/SetupCommand.cs @@ -0,0 +1,13 @@ +namespace AnchorCli.Commands; + +public class SetupCommand : ICommand +{ + public string Name => "setup"; + public string Description => "Run interactive setup wizard to configure API key and model"; + + public Task ExecuteAsync(string[] args, CancellationToken ct) + { + SetupTui.Run(); + return Task.CompletedTask; + } +} diff --git a/Program.cs b/Program.cs index b9d1435..a5ebab4 100644 --- a/Program.cs +++ b/Program.cs @@ -183,6 +183,7 @@ commandRegistry.Register(new HelpCommand(commandRegistry)); commandRegistry.Register(new ClearCommand()); commandRegistry.Register(new StatusCommand(model, endpoint)); commandRegistry.Register(new CompactCommand(compactor, history)); +commandRegistry.Register(new SetupCommand()); var commandDispatcher = new CommandDispatcher(commandRegistry);