Skip to content

azd ext install: allow installing directly from a registry URL/location without a separate ext source add step #8581

Description

@JeffreyCA

Summary

Today, installing an extension from a custom registry is a two-step flow:

azd extension source add -n my-source -t url -l https://link/to/registry.json
azd extension install <id> -s my-source

We'd like a one-liner that accepts a registry location directly:

azd extension install <id> -s https://link/to/registry.json

When -s/--source is given a URL or file path (rather than the name of an already-registered source), azd registers the source and then installs the extension from it.

Motivation

The Azure SDK bot posts an "Azure Dev CLI Install Instructions" comment on azure-dev PRs with installer links so reviewers/end-users can quickly install and test a PR build of azd without building from source.

We want the equivalent for extension PRs (tracked separately, see related issue): a PR pipeline publishes the extension build to a temporary/custom registry, and the bot comments a single copy-paste command. The current two-step source add + install flow is more friction than necessary, and the intermediate source name is an implementation detail users shouldn't have to invent.

Also complements /pull/8740, to easily install nightlies.

Also complements /pull/8697, which supports installing extension zips/bundles.

Proposed behavior

Detect whether the -s/--source value is a location (URL or file path) vs. the name of an existing source:

  • Existing source name → current behavior, unchanged.
  • Location → register the source (inferring type as url vs file the same way source add does), then install <id> from it.

Details:

  • Source is persisted, not ephemeral — so azd extension upgrade/list/show continue to work against that registry afterward without re-specifying the URL.
  • Prompt for the source name. Under --no-prompt, direct user to add source separately beforehand.
  • Confirm before registering when installing directly from a URL, since it may be an untrusted source.

Acceptance criteria

  • azd extension install <id> -s <url-or-path> installs the extension without a prior azd extension source add.
  • The source is persisted with the chosen name and inferred type.
  • User is prompted for the source name and confirms before a URL source is registered.
  • Existing behavior for -s <existing-source-name> is unchanged.

Related

Metadata

Metadata

Labels

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions