You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#Refactor CLI command dispatch: replace reflection-based partial Program god-class with IFalloutCommand types #392
Fallout.Cli implements every CLI command as a static int method on one partial class Program, split across ~10 Program.*.cs files and dispatched by reflection (Program.Handle reflects over its own int-returning methods). The partial split looks organized, but the underlying type is a god object — it owns dispatch, secrets, packages, Cake interop, navigation, config, run orchestration, and the Spectre prompts. Reflection dispatch is stringly-typed: a typo'd signature compiles and fails at runtime, and nothing is DI-able or unit-testable in isolation.
Outcome
One command = one type behind a typed IFalloutCommand, discovered by type via DI instead of reflection. The :command CLI surface and shell-function names stay exactly as they are (non-breaking).
publicinterfaceIFalloutCommand{stringName{get;}// e.g. "run", "setup"intExecute(string[]args,AbsolutePathrootDirectory,AbsolutePathbuildScript);}
Each Program.X.cs partial becomes a standalone XCommand implementing IFalloutCommand; the dispatcher resolves by Name. The partial keyword disappears. Shared helpers move into injectable services in the final collapse PR.
Acceptance criteria
IFalloutCommand + a type/DI-based dispatcher replace reflection dispatch
Every command is its own type; Program collapses to a thin entry point (no partial)
Claude picked wolverine over the license, Im tempted to just pick MediatR. Why? I use it at work and Im familiar with it. Just need to make sure the license terms are a match for this project
Activity
ChrisonSimtian commentedon Jun 17, 2026
Claude picked wolverine over the license, Im tempted to just pick MediatR. Why? I use it at work and Im familiar with it. Just need to make sure the license terms are a match for this project
Make shared CLI helpers internal for incremental command extraction
Convert :get-configuration to GetConfigurationCommand
Convert :add-package to AddPackageCommand
Convert :setup to SetupCommand
Convert :update to UpdateCommand
Convert :cake-convert and :cake-clean to command types
Convert :get-configuration to GetConfigurationCommand
Convert :add-package to AddPackageCommand
Convert :setup to SetupCommand
Convert :update to UpdateCommand
Convert :cake-convert and :cake-clean to command types
7 remaining items
Make shared CLI helpers internal for incremental command extraction
Introduce IFalloutCommand dispatch with DI for Fallout.Cli
Make shared CLI helpers internal for incremental command extraction
Convert :trigger to TriggerCommand (Fallout-build#392)
Add Fallout.Cli command-scaffolding services (Fallout-build#392)
Convert remaining Cli commands to IFalloutCommand and collapse Program (
Re-home Cli command specs to Fallout.Cli.Specs (Fallout-build#392)
Convert :trigger to TriggerCommand (Fallout-build#392)
Add Fallout.Cli command-scaffolding services (Fallout-build#392)
Convert remaining Cli commands to IFalloutCommand and collapse Program (
Re-home Cli command specs to Fallout.Cli.Specs (Fallout-build#392)
Convert :trigger to TriggerCommand (#392)
Add Fallout.Cli command-scaffolding services (#392)
Convert remaining Cli commands to IFalloutCommand and collapse Program (
Re-home Cli command specs to Fallout.Cli.Specs (#392)