-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Phase 5: CLI Presentation
Implement CLI subcommands using DotMake.CommandLine (source generators, AOT-compatible).
Commands to Implement
In Infrastructure/Cli/Commands/:
RootCommand
- No arguments → Interactive mode (shows menu)
- Entry point for the application
- Delegates to InteractiveMenu
AnalyzeCommand
devsweep analyze [modules]
devsweep analyze jetbrains docker
devsweep analyze --all- Accepts module names as arguments
- Calls
IAnalyzeUseCase.ExecuteAsync() - Displays results via
IOutputFormatter
CleanCommand
devsweep clean [modules] [options]
devsweep clean jetbrains homebrew
devsweep clean devtools --nuclear
devsweep clean --all- Accepts module names as arguments
--nuclearflag (requires devtools module)- Calls
ICleanupUseCase.ExecuteAsync()
VersionCommand
devsweep version- Displays version number
- Reads from assembly metadata
Global Options
All commands support:
--dry-run, -d: Preview without deleting--force, -f, -y: Skip confirmations (not nuclear)--verbose: Detailed output--output <format>: rich (default) | plain | json
Implementation with DotMake.CommandLine
[CliCommand(Description = "Developer disk cleanup tool")]
public class RootCommand
{
[CliOption(Description = "Preview actions", Aliases = new[] { "-d" })]
public bool DryRun { get; set; }
[CliOption(Description = "Output format")]
public OutputFormat Output { get; set; } = OutputFormat.Rich;
// ... more options
}Validation
- Nuclear mode requires devtools module
- Module names must be valid (jetbrains, docker, homebrew, devtools, projects, system)
- Cannot combine analyze and clean in single command
Tests Required
All in tests/Infrastructure/Cli/Commands/:
RootCommandTests: Interactive mode, help, versionAnalyzeCommandTests: Module selection, --all flagCleanCommandTests: Module selection, nuclear validationVersionCommandTests: Version display
Port argument parsing tests from bash tests/unit/cli_test.sh.
Definition of Done
- All commands implemented with DotMake.CommandLine
- Source generators working (zero reflection)
- All bash CLI tests ported
- Help text clear and useful
- AOT compilation verified
Reactions are currently unavailable