feat(cli): add version/list commands, shared tree renderer, async install#117
Merged
antosubash merged 2 commits intomainfrom Apr 23, 2026
Merged
feat(cli): add version/list commands, shared tree renderer, async install#117antosubash merged 2 commits intomainfrom
antosubash merged 2 commits intomainfrom
Conversation
…tall
- Add `sm version` command and `--version` flag backed by AssemblyInformationalVersion
- Add `sm list` command showing modules with route prefixes and endpoint counts,
resolving RoutePrefix from string literals and from {Module}Constants.RoutePrefix
- Extract shared FileTreeRenderer helper to replace three near-identical tree
renderers in NewProject/NewModule/NewFeature (~80 lines of duplication removed)
- Convert InstallCommand to AsyncCommand and use WaitForExitAsync instead of
blocking GetAwaiter().GetResult()
- Wire root-level usage examples into Spectre's --help output
Deploying simplemodule-website with
|
| Latest commit: |
49afb71
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://308bd35a.simplemodule-website.pages.dev |
| Branch Preview URL: | https://claude-improve-cli-fzuk8.simplemodule-website.pages.dev |
…esults - Sort results by severity: FAIL → WARN → PASS so failures are immediately visible - Replace flat trailing markup lines with a bordered summary Panel whose color matches overall status (red/yellow/green) and whose header reads "Failing", "Passing with warnings", or "Healthy" - Track fixed count across the fix → recheck transition and display it in the summary so users can see --fix actually did something - Add top-level Rule separator to frame the report - Round the results table border for consistency with `sm list`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Targeted CLI improvements focused on discoverability, DRY, and correctness.
New commands
sm version(andsm --version) — prints the CLI version, backed byAssemblyInformationalVersion.sm list— lists modules in the current project with their route prefixes and endpoint counts. ResolvesRoutePrefixfrom both string literals (RoutePrefix = "products") and constant references (RoutePrefix = OrdersConstants.RoutePrefix).Refactors
FileTreeRendererinInfrastructure/. Replaces three near-identical tree renderers inNewProjectCommand,NewModuleCommand,NewFeatureCommand(~80 lines of duplication). Supports both relative-path mode (new project) and filename-only mode (new module / new feature), plus dry-run and created variants.Fixes
InstallCommandnow inheritsAsyncCommandand usesWaitForExitAsync+awaitinstead of blocking withGetAwaiter().GetResult()on the process-output tasks.UX
sm --helpnow includes concrete examples (sm new project MyApp,sm dev,sm list,sm doctor --fix, etc.).new project/module/featurecommands get targeted--helpexamples viaWithExample.Test plan
dotnet build— full solution, 0 warnings / 0 errorsVersionCommandTests,ListCommandTests,FileTreeRendererTests)sm --versionprints1.0.0,sm --helpshows examplessm liston a simulated project renders a rounded table with route prefixes and endpoint counts for both literal and constant-reference prefixessm new project Acme --dry-runrenders the expected tree via the shared rendererGenerated by Claude Code