Skip to content

[azsdk-cli] Organize command line hierarchy#12854

Merged
praveenkuttappan merged 11 commits into
mainfrom
azsdk_cli_grouping
Nov 13, 2025
Merged

[azsdk-cli] Organize command line hierarchy#12854
praveenkuttappan merged 11 commits into
mainfrom
azsdk_cli_grouping

Conversation

@praveenkuttappan

@praveenkuttappan praveenkuttappan commented Nov 12, 2025

Copy link
Copy Markdown
Member

This is a new PR created after rebasing all changes in the PR created by @benbp
#12564

@praveenkuttappan praveenkuttappan self-assigned this Nov 12, 2025
@praveenkuttappan
praveenkuttappan requested a review from a team as a code owner November 12, 2025 01:08
Copilot AI review requested due to automatic review settings November 12, 2025 01:08
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Nov 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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., pkg as alias for package, tsp as alias for typespec)
  • Renamed several commands for consistency (e.g., convert-swaggerconvert, validate-typespecvalidate)
  • Refactored command organization by moving tools into appropriate command group hierarchies
  • Created MCPNoCommandTool base 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.

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/Core/MCPNoCommandTool.cs
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Commands/SharedOptions.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/CodeownersToolsTests.cs Outdated
praveenkuttappan and others added 2 commits November 11, 2025 20:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Commands/SharedCommandGroups.cs
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/README.md

@timovv timovv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, just one thought on the changelog

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/CHANGELOG.md Outdated

protected override Command GetCommand() =>
new("test-results", "Analyze test results")
new("results", "Analyze test results")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results command seems unrelated to the analysis and might be confusing to users.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will let @benbp comment on this change.

Comment thread tools/azsdk-cli/docs/cli-commands-guidelines.md Outdated
@praveenkuttappan
praveenkuttappan merged commit a681003 into main Nov 13, 2025
13 checks passed
@praveenkuttappan
praveenkuttappan deleted the azsdk_cli_grouping branch November 13, 2025 20:27
@ronniegeraghty ronniegeraghty added the AzSDK Tools Agent Issue related to the AzSDK Tools Agent. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AzSDK Tools Agent Issue related to the AzSDK Tools Agent. azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants