[azsdk-cli] Organize command line hierarchy#12854
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR reorganizes the azsdk-cli command hierarchy to provide a more structured and consistent command-line interface. The changes streamline command naming, introduce command aliases, and better organize commands into logical groups.
Key Changes
- Introduced a hierarchical command structure with command groups and sub-groups (e.g.,
pkg readme generate,tsp client update) - Added command aliases for better usability (e.g.,
pkgas alias forpackage,tspas alias fortypespec) - Renamed several commands for consistency (e.g.,
convert-swagger→convert,validate-typespec→validate) - Refactored command organization by moving tools into appropriate command group hierarchies
- Created
MCPNoCommandToolbase class for tools that only expose MCP server methods without CLI commands
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/cli-commands-guidelines.md | Updated documentation to reflect new command hierarchy and aliases |
| Tools/TypeSpec/*.cs | Added command hierarchies and renamed commands for consistency |
| Tools/Package/*.cs | Reorganized package commands into sub-groups (readme, test, sample) |
| Tools/Pipeline/PipelineTool.cs | Moved to SharedCommandGroups.AzurePipelines hierarchy |
| Tools/Config/*.cs | Moved GitHub and codeowners tools under new Config group |
| Tools/Core/MCPNoCommandTool.cs | New base class for tools without CLI commands |
| Tools/Core/MCPMultiCommandTool.cs | Enhanced to recursively set handlers on subcommands |
| Commands/SharedCommandGroups.cs | Restructured command groups with aliases and updated descriptions |
| Commands/CommandGroup.cs | Added Aliases field to support command aliases |
| Commands/CommandRunner.cs | Added alias support and debug validation for duplicate commands |
| Commands/HostServer/HostServerCommand.cs | Refactored to support multiple commands with hidden legacy alias |
| Commands/SharedOptions.cs | Removed global ToolOption, moved CleanupTool to DEBUG only |
| .vscode/mcp.json | Updated MCP server startup command from start to mcp |
| Tests/ | Updated test code to reflect renamed classes and added test ignores |
Comments suppressed due to low confidence (1)
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Config/GitHubLabelsTool.cs:45
- [nitpick] Inconsistent command description punctuation. Most command descriptions in this file don't end with periods (see lines 39, 125), but this one does. Consider removing the period for consistency.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
deyaaeldeen
reviewed
Nov 12, 2025
deyaaeldeen
reviewed
Nov 12, 2025
praveenkuttappan
requested review from
deyaaeldeen,
l0lawrence,
m-redding,
maririos,
raych1,
richardpark-msft and
timovv
November 13, 2025 17:05
raych1
reviewed
Nov 13, 2025
timovv
approved these changes
Nov 13, 2025
timovv
left a comment
Member
There was a problem hiding this comment.
Looks fine, just one thought on the changelog
deyaaeldeen
approved these changes
Nov 13, 2025
raych1
reviewed
Nov 13, 2025
|
|
||
| protected override Command GetCommand() => | ||
| new("test-results", "Analyze test results") | ||
| new("results", "Analyze test results") |
Member
There was a problem hiding this comment.
The results command seems unrelated to the analysis and might be confusing to users.
raych1
reviewed
Nov 13, 2025
Co-authored-by: Ray Chen <raychen@microsoft.com>
raych1
approved these changes
Nov 13, 2025
l0lawrence
approved these changes
Nov 13, 2025
samvaity
approved these changes
Nov 13, 2025
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.
This is a new PR created after rebasing all changes in the PR created by @benbp
#12564