Azure / Azure/azure-sdk-tools

Consider adding Copilot CLI availability check to `azsdk verify setup`

Open
#15,429 0 comments 0 reactions 0 assignees View on GitHub
AzSDK Tools Agent azsdk-cli
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 2h
Merged PRs (30d)
130

Description

## Context

#15276 improved error handling when the GitHub Copilot CLI executable is missing from standalone `azsdk` builds. Features like customized code update, sample generation/translation, and readme generation depend on the Copilot CLI, and when it's absent the tool now gives a clear error with a pointer to the `AZSDK_COPILOT_CLI_PATH` environment variable workaround.

## Proposal

Consider adding an optional check in `azsdk verify setup` that detects whether the Copilot CLI executable is available.

## Considerations

- **Warning vs error:** The Copilot CLI is only needed for a subset of tools, so a hard failure would be misleading. A warning is more appropriate.
- **User confusion:** Not every user will go on to use a copilot-dependent tool, so surfacing a warning unconditionally could be noisy and confusing ("why is it telling me about something I don't need?").
- **Detection scope:** We'd need to check the bundled path, the `AZSDK_COPILOT_CLI_PATH` env var, and possibly `PATH` — matching what `ServiceRegistrations` and the SDK do at runtime.
- **Standalone vs dotnet tool:** The issue primarily affects standalone/published builds. When running as a dotnet tool, the NuGet restore handles bundling automatically so sometimes the warning may not even be correct unless we know how the tool is being run
- **Opt-in flag:** Could gate the check behind a `--include-copilot` flag or a tool-group filter so it only runs when the user expects to use copilot-dependent features.

Contributor guide

Open the contributing guide

Research direction

Start with the `azsdk verify setup` implementation, then read `ServiceRegistrations` and the SDK runtime detection described in the issue. Define how bundled paths, `AZSDK_COPILOT_CLI_PATH`, and `PATH` are handled, and whether the check is optional or filtered. Done means the chosen behavior warns only when appropriate without making setup fail incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.