using System.CommandLine; using MicroForge.CLI.Commands.Interfaces; namespace MicroForge.CLI.Commands; public partial class MicroForge { public new partial class Add : Command, ISubCommandOf { public Add(IEnumerable> subCommands) : base("add", "Add a predefined feature to your project") { foreach (var subCommandOf in subCommands) AddCommand((subCommandOf as Command)!); } } public class Run : Command, ISubCommandOf { public Run() : base("run", "Run your app") { this.SetHandler(ExecuteAsync); } private async Task ExecuteAsync() { await Bash.ExecuteAsync([ "source .venv/bin/activate", "uvicorn main:app --reload" ]); } } }