feat: Dynamic command loader, default command with module registry

This commit is contained in:
2025-04-20 12:38:27 +02:00
parent a7cae86254
commit cea3d11a41
13 changed files with 373 additions and 3 deletions

View File

@ -0,0 +1,26 @@
using Automancer.Command.Image;
using Automancer.Common;
using Spectre.Console.Cli;
namespace Automancer.Command.Container;
public class Module : ICommandModuleWithRegistry
{
public void Configure(IConfigurator config)
{
// No implementation needed here
}
public void Configure(IConfigurator config, CommandRegistry registry)
{
config.AddBranch("container", container =>
{
var description = "Container operations";
container.SetDescription(description);
registry.Add("container", description);
container.AddCommand<PsCommand>("ps").WithDescription("List containers");
});
}
}