feat: add azd tool command group for unified Azure tooling management#7450
Draft
wbreza wants to merge 5 commits intoAzure:mainfrom
Draft
feat: add azd tool command group for unified Azure tooling management#7450wbreza wants to merge 5 commits intoAzure:mainfrom
wbreza wants to merge 5 commits intoAzure:mainfrom
Conversation
Implements the azd tool POC — a unified CLI for discovering, installing, upgrading, and checking status of Azure development tools. New command group: - azd tool — Interactive tool discovery and install flow - azd tool list — List all tools with status (table/JSON) - azd tool install — Install tools by name or interactively - azd tool upgrade — Upgrade installed tools - azd tool check — Check for available updates (table/JSON) - azd tool show — Show detailed info for a specific tool Core package (pkg/tool/): - manifest.go — Tool definitions and built-in registry (7 tools) - platform.go — OS detection and package manager availability - detector.go — Tool detection (CLI version parsing, VS Code extensions) - installer.go — Platform-aware install/upgrade orchestration - manager.go — Top-level orchestrator - update_checker.go — Periodic update checking with disk cache Middleware: - tool_first_run.go — Welcome experience on first azd use - tool_update_check.go — Background update notifications Integration: - IoC registration in container.go - Command registration in root.go - Snapshot test updates for new commands Unit tests: 45 tests, 83.9% coverage on pkg/tool/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use American English spellings (summarizes, serialized, amortized, unparsable) - Add azureresourcegroups to cspell overrides (VS Code extension ID) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace legacy console.MultiSelect/Confirm/Spinner (survey.v2) with the newer pkg/ux/ components that use canvas-based rendering. This fixes escape code artifacts on arrow key presses in terminal. Changes: - cmd/tool.go: 2x console.MultiSelect -> uxlib.NewMultiSelect - cmd/middleware/tool_first_run.go: console.Confirm -> uxlib.NewConfirm, console.MultiSelect -> uxlib.NewMultiSelect, console.ShowSpinner/StopSpinner -> uxlib.NewSpinner.Run Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 30s timeout to background update check goroutine to prevent leaks - Fix middleware predicate to properly exclude tool subcommands - Defer GetUserConfigDir() call from IoC registration to first use - Reorder middleware skip checks (cheap before expensive I/O) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds the
azd toolcommand group — a unified CLI for discovering, installing, upgrading, and checking status of Azure development tools. This is a POC implementation based on the azd tool PRD, with platform-specific install strategies referenced from azure-devkit.Changes
Core Package (
pkg/tool/)manifest.go— Tool type system (ToolDefinition,InstallStrategy, etc.) and built-in registry of 7 tools (az-cli, github-copilot-cli, vscode-azure-tools, vscode-bicep, vscode-github-copilot, azure-mcp-server, azd-ai-extensions)platform.go— OS detection and package manager availability (winget/brew/apt/snap/npm/code)detector.go— Tool detection interface with CLI version parsing and VS Code extension listinginstaller.go— Platform-aware install/upgrade orchestration with fallback URLsmanager.go— Top-level orchestrator wiring detector, installer, and update checkerupdate_checker.go— Periodic update checking with disk cache (~/.azd/tool-check-cache.json)Commands (
cmd/tool.go)azd tool— Interactive flow: detect → display status → select uninstalled → installazd tool list— Table/JSON output of all tools with status and versionazd tool install [tool-name...]— Install by name,--allflag, or interactive selectionazd tool upgrade [tool-name...]— Upgrade specific tools or all installedazd tool check— Check for available updates (table/JSON)azd tool show <tool-name>— Detailed info for a specific toolMiddleware
cmd/middleware/tool_first_run.go— Welcome experience on firstazduse with tool detection and optional installcmd/middleware/tool_update_check.go— Non-blocking background update checks with cached notificationsIntegration
cmd/container.gocmd/root.goIssue References
No related issue — this is a POC/spike for the
azd toolfeature.Testing
pkg/tool/with 83.9% statement coverageCommandRunnerandDetectorinterfacesgo build ./...— passesgo vet ./...— passesgolangci-lint run ./...— passesTestFigSpec,TestUsage)Notes
codeis not in PATH