Skip to content

Add telemetry instrumentation for azd tool first-run and operations#8261

Open
hemarina wants to merge 7 commits into
Azure:mainfrom
hemarina:hemarina/tool-telemetry-8168
Open

Add telemetry instrumentation for azd tool first-run and operations#8261
hemarina wants to merge 7 commits into
Azure:mainfrom
hemarina:hemarina/tool-telemetry-8168

Conversation

@hemarina
Copy link
Copy Markdown
Contributor

Closes #8168.

Summary

Instruments the azd tool feature so we can answer the questions in the issue: adoption of the first-run experience, tool preferences, skip rate, install success rate, and command engagement outside first-run.

All attributes are attached as usage attributes via tracing.SetUsageAttributes, so they land on the user''s actual command span (e.g. cmd.tool.install) rather than on a separate child span — matching existing azd telemetry conventions.

What''s emitted

First-run experience (cmd/middleware/tool_first_run.go)

Attribute Type Emitted when
tool.firstrun.skip_reason string First-run was bypassed (env_var, no_prompt, ci_cd, non_interactive, already_completed, config_error)
tool.firstrun.optin bool User answered the welcome prompt (true = accepted)
tool.firstrun.tools_detected int Built-in tools already installed locally
tool.firstrun.tools_offered int Recommended tools offered for installation
tool.firstrun.tools_selected int Tools the user kept selected
tool.firstrun.tools_selected_names string Comma-separated built-in tool IDs
tool.firstrun.tools_deselected_names string Comma-separated built-in tool IDs
tool.firstrun.completed bool tool.firstRunCompleted was persisted to user config
tool.firstrun.install_success_count int First-run batch install — succeeded count
tool.firstrun.install_failure_count int First-run batch install — failed count
tool.firstrun.install_failed_ids string First-run batch — comma-separated failed tool IDs
tool.firstrun.install_duration_ms int First-run batch — wall-clock duration

Tool commands (cmd/tool.goinstall, upgrade, check, show)

Attribute Type Emitted when
tool.id string Single-target install / upgrade / show
tool.ids string Batch install / upgrade
tool.dry_run bool install / upgrade with --dry-run
tool.install.strategy string Single-target install / upgrade
tool.install.success bool Single-target install / upgrade
tool.install.success_count / tool.install.failure_count int Batch install / upgrade
tool.install.failed_ids string At least one failure (tool IDs only — no error text)
tool.install.duration_ms int Batch install / upgrade
tool.upgrade.from_version / tool.upgrade.to_version string Single-target upgrade
tool.check.updates_available int tool check

Design notes / deviations from the issue''s proposed schema

The "Proposed Telemetry Events" table in #8168 was a sketch; the implementation refines a few things:

  • Unified tool.id / tool.ids instead of separate tool.install.tool_id and tool.upgrade.tool_id. The command name already disambiguates; one set of keys keeps the schema small.
  • Split tool.install.count into success_count + failure_count (+ failed_ids). Lets backends compute success rate directly without joining events.
  • Dropped raw tool.install.error strings in favor of tool.install.failed_ids. Error strings risk leaking paths, usernames, or proxy URLs; the global error middleware still captures error class on the same span.
  • Single tool.firstrun.optin bool instead of two separate optin_accepted / optin_declined attributes. Same signal, half the schema.
  • First-run batch-install attrs are namespaced tool.firstrun.install_* so that when a user''s very first azd command is azd tool install <x>, the first-run signal is not clobbered by the command-level tool.install.* write on the same span (usage attributes are last-write-wins).
  • Added tool.dry_run since both install and upgrade accept --dry-run and the flag materially changes what the command did.

Privacy

Only built-in tool IDs (e.g. az-cli, docker) and semver version strings are captured. No file paths, no user-identifiable data, no raw error text.

Tests

  • cmd/middleware/tool_first_run_test.goTestToolFirstRunMiddleware_EmitsSkipReason (env-var / no-prompt / ci_cd / non-interactive / already-completed) + TestToolFirstRunMiddleware_NoSkipReasonForSilentPaths.
  • cmd/tool_test.go — 4 cases for emitToolInstallTelemetry (all-success batch, all-failure batch, mixed, empty result set).
  • cmd/telemetry_coverage_test.gotool, tool list, tool check, tool install, tool show, tool upgrade registered; new ToolFields subtest asserts every new AttributeKey resolves to its expected tool.* string.

Docs

  • docs/tracing-in-azd.md — new "Tool Command Telemetry" section.

Out of scope

  • pkg/tool/installer.go, pkg/tool/detector.go, pkg/tool/update_checker.go — instrumentation lives at the command/middleware layer (where decisions are made) rather than inside the orchestration types. That matches how other azd domains are instrumented.

@hemarina hemarina changed the title Add telemetry instrumentation for zd tool first-run and operations Add telemetry instrumentation for azd tool first-run and operations May 20, 2026
@hemarina hemarina marked this pull request as ready for review May 20, 2026 22:39
@hemarina hemarina requested a review from wbreza as a code owner May 20, 2026 22:39
Copilot AI review requested due to automatic review settings May 20, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds OpenTelemetry usage-attribute instrumentation for the azd tool command group and its first-run onboarding middleware, enabling measurement of first-run funnel behavior and tool operation outcomes while avoiding raw error strings in tool-specific telemetry.

Changes:

  • Introduces new tool.* telemetry field constants and documents the emitted schema.
  • Instruments tool install/upgrade/check/show and the tool first-run middleware to emit usage attributes on the command span.
  • Extends telemetry coverage tests and adds unit tests for new tool telemetry helpers/paths.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cli/azd/internal/tracing/fields/fields.go Adds new tool.* attribute key constants for first-run and tool operations telemetry.
cli/azd/docs/tracing-in-azd.md Documents the new tool telemetry schema and coverage expectations.
cli/azd/cmd/tool.go Emits tool operation telemetry attributes and adds helpers to aggregate install/upgrade results.
cli/azd/cmd/tool_test.go Adds unit tests validating aggregate tool install/upgrade telemetry emission behavior.
cli/azd/cmd/telemetry_coverage_test.go Registers tool subcommands for telemetry coverage and asserts new field constants.
cli/azd/cmd/middleware/tool_first_run.go Emits first-run funnel telemetry attributes (skip reason, opt-in, selection, install outcomes).
cli/azd/cmd/middleware/tool_first_run_test.go Adds tests validating first-run skip-reason emission and silent skip paths.
cli/azd/.vscode/cspell.yaml Adds spelling dictionary entries for newly introduced telemetry terms.
Comments suppressed due to low confidence (1)

cli/azd/cmd/tool.go:1063

  • tool.id is set from the raw CLI arg before FindTool validates it. If the arg is invalid, this can emit arbitrary user input into telemetry and inflate cardinality. Move the SetUsageAttributes(fields.ToolIdKey...) call to after FindTool succeeds (or set it from toolDef.Id).
	toolID := a.args[0]
	tracing.SetUsageAttributes(fields.ToolIdKey.String(toolID))

	toolDef, err := a.manager.FindTool(toolID)
	if err != nil {
		return nil, fmt.Errorf("finding tool: %w", err)

Comment thread cli/azd/cmd/tool.go Outdated
Comment thread cli/azd/cmd/middleware/tool_first_run.go Outdated
Comment thread cli/azd/internal/tracing/fields/fields.go Outdated
Comment thread cli/azd/docs/tracing-in-azd.md
Comment thread cli/azd/docs/tracing-in-azd.md
@github-actions github-actions Bot added the area/extensions Extensions (general) label May 20, 2026
@hemarina hemarina requested a review from RickWinter as a code owner May 22, 2026 23:41
Copy link
Copy Markdown
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

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

Thanks for this — it's a thoughtful telemetry pass, especially the tool.install.* vs tool.firstrun.install_* namespacing to dodge last-write-wins on a single span. That's the kind of detail experienced telemetry engineers regularly miss. The privacy posture (no error strings, no paths, classification declared on every key) and the telemetry_coverage_test.go round-trip assertions also stand out. 👍

The findings below are organized by severity, with code shapes wherever a fix isn't obvious. I deliberately skipped the things Copilot flagged that you've already addressed (raw-arg leak, empty-string tools_selected_names, the doc table syntax) — those are good as-is, and you're correct to push back on the || table comments.


🔴 Critical — blocks the merge as currently coded

C1. emitToolInstallTelemetry records "0 failures" when the batch call itself fails

cli/azd/cmd/tool.go (install action ~L514, upgrade action ~L770)

installResults, rawResults, _ := runToolOperation(ctx, tools, operationFn, "Installing", "install", a.console)
emitToolInstallTelemetry(rawResults, time.Since(start))

runToolOperation returns (results, opErr). When manager.InstallTools returns (nil, err) — network failure, unsupported platform, permission denied — rawResults is nil and you emit:

tool.install.success_count = 0
tool.install.failure_count = 0
tool.install.failed_ids    = (unset)

A user who runs azd tool install az-cli docker and gets a hard error produces a span that's indistinguishable from a no-op. The whole point of #8168 ("success rate") breaks on exactly the cases you most want to see.

The third return is right there — please capture it and synthesize failures when the batch infrastructure itself failed:

start := time.Now()
installResults, rawResults, opErr := runToolOperation(ctx, tools, operationFn, "Installing", "install", a.console)
emitToolInstallTelemetry(rawResults, time.Since(start), opErr, tools)
func emitToolInstallTelemetry(
    results []*tool.InstallResult, elapsed time.Duration, opErr error, requested []*tool.ToolDefinition,
) {
    successCount, failureCount := 0, 0
    failedIDs := make([]string, 0, len(requested))
    if opErr != nil && len(results) == 0 {
        // Operation infrastructure failure — every requested tool effectively failed.
        // Maintain the invariant: success_count + failure_count == len(requested).
        failureCount = len(requested)
        for _, t := range requested {
            failedIDs = append(failedIDs, t.Id)
        }
    } else {
        for _, r := range results { /* existing loop */ }
    }
    ...
}

Alternatively (cleaner long-term): add a tool.install.outcome string enum ("ok", "partial", "operation_error") — that's how cmd/login.go and cmd/deploy.go model the same shape (auth.outcome, deploy.outcome).


🟠 High — please address before merge

H1. Comma-joined ID lists are unbounded-cardinality (your own doc forbids this)

Files & lines:

  • cli/azd/cmd/tool.go ~L509 (tool.ids install), ~L758 (tool.ids upgrade), ~L665 (tool.install.failed_ids in emitToolInstallTelemetry)
  • cli/azd/cmd/middleware/tool_first_run.go ~L238/241 (tool.firstrun.tools_selected_names / _deselected_names), ~L289 (tool.firstrun.install_failed_ids)

Each individual ID is bounded (~12 built-ins today), but strings.Join(ids, ",") preserves user-supplied order, so the value space is permutations of subsets — Σ P(N,k), which is in the tens of thousands for 12 tools and millions for 20. cli/azd/docs/tracing-in-azd.md (the very doc this PR edits) requires attributes to avoid "high-cardinality values," and OTel/AppInsights typically warns above a few hundred distinct values per key. The cost is twofold: indexing/storage bloat downstream, and defeated faceting (every install becomes its own bucket).

One-line fix at each site: sort before joining. The IDs come from a fixed manifest, so this is safe and the analytical signal ("which tools were selected together") is preserved while collapsing N! into 2^N:

sort.Strings(resolvedIDs)
tracing.SetUsageAttributes(fields.ToolIdsKey.String(strings.Join(resolvedIDs, ",")))

Apply identically to failedIDs, selectedIDs, deselectedIDs. Also update the Notes column in tracing-in-azd.md to say "comma-separated sorted built-in tool IDs" so the invariant is documented next to the schema.

For background on why this matters in OTel, see the OpenTelemetry Sampling docs on attribute cardinality — and the existing pattern in azd: pkg/extensions/manager.go sorts extension IDs before emitting extension.ids for exactly this reason.


H2. tool.upgrade.from_version is never emitted on the most common upgrade path

cli/azd/cmd/tool.go ~L736-749

fromVersions := make(map[string]string)
if len(a.args) > 0 {
    for _, id := range a.args {
        toolDef, findErr := a.manager.FindTool(id)
        ...
        toolsToUpgrade = append(toolsToUpgrade, toolDef)
        // ← no fromVersions write here
    }
} else {
    for _, s := range statuses { /* populates fromVersions */ }
}

fromVersions only gets populated on the no-args (auto-detect) branch. The canonical single-target case — azd tool upgrade az-cli — never writes to the map, so tool.upgrade.from_version is always unset there. The PR description and tracing-in-azd.md both advertise this attribute as emitted on "Single-target upgrade," so either:

  1. Preferred: in the explicit branch, fetch the current status for each ID (using whatever detection method already lives in the upgrade auto-detect path) and populate fromVersions[toolDef.Id] = status.InstalledVersion. The signal is the same on both branches.
  2. Cheaper: narrow the doc to "auto-detect path only" — but that loses signal exactly where you most need it (the user knew what they were upgrading).

H3. tool.upgrade.to_version is emitted even when the upgrade failed

cli/azd/cmd/tool.go ~L783-786

if r.InstalledVersion != "" {
    singleAttrs = append(singleAttrs, fields.ToolUpgradeToVersionKey.String(r.InstalledVersion))
}

InstallResult.InstalledVersion is "the version detected after installation" (per its doc in pkg/tool/installer.go). On failure that's typically either the unchanged old version or empty, and an analyst seeing from=1.0.0 to=1.0.0 success=false can't tell whether the version actually didn't move or the installer just didn't re-detect.

if r.Success && r.InstalledVersion != "" {
    singleAttrs = append(singleAttrs, fields.ToolUpgradeToVersionKey.String(r.InstalledVersion))
}

(from_version is fine to emit regardless — it's a pre-state.)


H4. tool.firstrun.completed is overloaded and partially misdocumented

cli/azd/cmd/middleware/tool_first_run.go L190 (opt-in declined) and L259 (success path); cli/azd/internal/tracing/fields/fields.go ~L486

// opt-in declined:
tracing.SetUsageAttributes(
    fields.ToolFirstRunOptInKey.Bool(false),
    fields.ToolFirstRunCompletedKey.Bool(true),  // ← always true
)
m.markCompleted()
// success path: same Bool(true)

Three smaller things converging:

  1. The key is Bool but only ever true. Dashboards filtering tool.firstrun.completed = false will silently return zero rows forever.
  2. It's now set both when the user declined opt-in and when the flow succeeded. Most readers will see completed=true ∧ optin=false as a contradiction.
  3. The multi-select error path and installSpinner.Run error path still fall through to markCompleted + completed=true, despite "failed during install" not really being "completed."

Two clean options — pick one:

  • Option A (minimal): rename to tool.firstrun.persisted (always true once markCompleted runs). Honest about what it actually measures: "we wrote the flag to user config so we won't ask again."
  • Option B (cleaner long-term): replace with tool.firstrun.outcome string enum: "completed" | "declined" | "cancelled" | "detect_failed" | "install_failed". One low-cardinality field, mutually exclusive with skip_reason, self-documenting in dashboards.

Either way: update the field comment in fields.go and the Notes column in tracing-in-azd.md to match the chosen semantics.


H5. tool.id and tool.ids co-emitted for single-tool installs (docs say mutually exclusive)

cli/azd/cmd/tool.go ~L509-521

tracing.SetUsageAttributes(fields.ToolIdsKey.String(strings.Join(resolvedIDs, ",")))
...
if len(rawResults) == 1 {
    tracing.SetUsageAttributes(singleResultCommonAttrs(rawResults[0])...)  // appends tool.id
}

So azd tool install az-cli produces both tool.id="az-cli" and tool.ids="az-cli". tracing-in-azd.md describes them as mutually exclusive ("Single-target" vs "Batch"). Anyone writing a downstream query against tool.ids will double-count single-tool installs.

if len(resolvedIDs) > 1 {
    tracing.SetUsageAttributes(fields.ToolIdsKey.String(strings.Join(resolvedIDs, ",")))
}

🟡 Medium

M1. tool.dry_run is emitted before arg validation

cli/azd/cmd/tool.go ~L484: tool.dry_run is set immediately, but tool.ids (correctly) waits until after FindTool resolves the arguments. If a user runs azd tool install bogus-name, the span gets tool.dry_run=false with no tool.ids — analytically muddled. Move the emit to alongside tool.ids after the FindTool loop so the contract is uniform ("we emit usage attrs once we've confirmed we're operating on built-ins").

M2. First-run install error path emits install_duration_ms without counts

cli/azd/cmd/middleware/tool_first_run.go ~L371-376: on installSpinner.Run error you emit duration but not install_success_count / install_failure_count / install_failed_ids (even though results may contain partial data). Downstream consumers seeing duration > 0 with no counts will treat the record as malformed. Either also emit zero/partial counts on the error path, or move the duration emit into the same installAttrs block after success.

M3. Aggregate install loop is duplicated between command and middleware

cli/azd/cmd/tool.go:625-655 (emitToolInstallTelemetry) vs cli/azd/cmd/middleware/tool_first_run.go:369-391. Same successCount/failureCount/failedIDs aggregation, only different field keys. The two sites already differ subtly today and will drift on the next change. A small parametric helper:

type installTelemetryKeys struct {
    SuccessCount, FailureCount, DurationMs, FailedIDs fields.AttributeKey
}

func emitInstallAggregate(results []*tool.InstallResult, elapsed time.Duration, k installTelemetryKeys) { ... }

Then both call sites collapse to one line each.

M4. Tests mutate global tracing baggage with sentinel-survives-the-call assertions

cli/azd/cmd/tool_test.go (TestEmitToolInstallTelemetry_*) and cli/azd/cmd/middleware/tool_first_run_test.go: the __sentinel__ pattern is clever but tracing baggage is process-global. These tests (a) leak state to subsequent tests in the package, (b) can't be t.Parallel(), and (c) tightly couple to baggage internals. Worth adding a tracing.ResetUsageAttributesForTest(t *testing.T) helper that calls t.Cleanup to restore prior state, then dropping the sentinel idiom. Belt-and-braces is fine, but it shouldn't be the only safeguard.

M5. Behavioral test coverage for the emitted attributes is sparse

Of ~25 newly emitted attributes, only 7 have a behavioral test that exercises the production emit path (TestEmitToolInstallTelemetry_* covers success/failure counts/duration/failed_ids; coverage test covers key strings only). Notably uncovered: every tool.firstrun.tools_* and install_* attribute, plus tool.id/tool.ids/tool.dry_run/tool.install.strategy/tool.install.success/tool.upgrade.from_version/tool.upgrade.to_version/tool.check.updates_available.

The whole point of this PR is the signal — if a future refactor silently stops emitting tools_offered, nothing breaks today. One right-sized fix: a single TestToolFirstRunMiddleware_FullFlow end-to-end test that walks opt-in=true → detection → offer → select N → install and asserts each of the ~12 first-run attributes is present on the span (one test, ~12 attributes covered).

Also: the PR description claims a test for "all-failure batch" but the diff has _FailureWithNilTool (which deliberately tests the opposite — that failed_ids is not overwritten when Tool is nil). Add the missing all-failure case (or update the PR description).

M6. PR description / doc / code mismatches worth tightening

  • Privacy claim: "Only built-in tool IDs ... and semver version strings." tool.upgrade.from_version / to_version are not validated against a semver regex — they're "whatever tool.VersionRegex captures" per pkg/tool/detector.go. Today's manifests are well-behaved, but pkg/tool/manifest.go has @azure/mcp with a prerelease pattern (\d+\.\d+\.\d+(?:-[^"]*)?)-[^"]* allows arbitrary suffixes up to a quote. Defense-in-depth: sanitize at the emit site:

    var semverRe = regexp.MustCompile(`^\d+\.\d+\.\d+(?:-[A-Za-z0-9.]+)?$`)
    func sanitizeVersion(v string) string {
        if semverRe.MatchString(v) { return v }
        return "non-semver"
    }
  • Per-tool duration dropped: issue #8168 lists tool.install.duration_ms per-tool; you emit it as a batch wall-clock aggregate. That's defensible, but please add a bullet to the "Design notes / deviations" section explaining the intentional collapse so future readers know it wasn't an oversight.

  • failed_ids shorter than failure_count: when a failure has a nil Tool, the count goes up but no ID is appended (your _FailureWithNilTool test proves this). Add one sentence to the docs' Notes column: "failed_ids may be shorter than failure_count when a failure has no resolved tool reference."


🟢 Nits / smaller polish (take or leave)

  • N1 tool.firstrun.optintool.firstrun.opt_in for consistency with skip_reason, tools_detected, from_version, etc. Side benefit: drops the optin entry from .vscode/cspell.yaml.
  • N2 cli/azd/cmd/middleware/tool_first_run.go import block: go.opentelemetry.io/otel/attribute is currently grouped with azd internals — should be in the external block per goimports defaults and AGENTS.md import ordering. mage preflight should fix it.
  • N3 failedIDs := make([]string, 0)make([]string, 0, len(results)). You know the upper bound — saves reallocations.
  • N4 singleResultCommonAttrs(r *tool.InstallResult) dereferences r.Success without nil-checking. Today's callers gate on len(rawResults) == 1, but the helper itself should be either value-receiver (r tool.InstallResult) or guard nil — small footgun otherwise.
  • N5 runToolOperation returns three values, all sites now write _ , _ , _ := … — a named result struct (toolOpOutcome { Items, Results, Err }) would self-document and avoid future-proofing churn.
  • N6 tool.firstrun.skip_reason values include both no_prompt and non_interactive. Worth a one-line field-comment clarification on whether they're analytically distinct or whether they should collapse.
  • N7 Doc table style: new tables are 4-column (Attribute | Type | Emitted when | Notes); existing ### Extension Attributes and ### Hook Attributes use 3-column (Attribute | Description | Example). Not wrong, but worth either folding examples into Notes or matching the existing column shape. Also ### First-run experience (sentence case) vs ### Extension Attributes (Title Case) is a tiny style nit.
  • N8 Add a comment near the first-run install emit site noting that tool.id / tool.ids / tool.dry_run are deliberately not emitted from this middleware to avoid clobbering the subsequent subcommand's writes — that's a load-bearing design choice and future contributors should know.
  • Doc table syntax (Copilot lines 229 & 248): you're right, the bot misread. Feel free to resolve those threads with a one-liner pointing at the actual rendered bytes — the tables are well-formed.

✅ Things that are great and worth keeping

  • Namespace separation (tool.firstrun.install_* vs tool.install.*) to defeat last-write-wins on the same span — this is the kind of design detail experienced telemetry engineers regularly miss, and you called it out explicitly in the PR description. 👏
  • Privacy posture — using failed_ids (low-cardinality IDs) instead of raw error strings, and explicitly deferring error attribution to the global error middleware, is the right boundary.
  • Classification + Purpose + IsMeasurement are set uniformly on every new field. That's the kind of consistency that compounds.
  • Telemetry coverage test asserts both key string and value type round-trip — catches a whole class of refactor regressions.
  • Field doc comments explain when the field is emitted, not just what it means. Exactly what future query authors need.
  • Out-of-scope honored — no leaks into pkg/tool/installer.go, detector.go, or update_checker.go as promised.
  • Engagement with prior feedback — the resolvedIDs/toolDef.Id discipline post-Copilot's first round was the right response.

CI

At time of review, gh pr checks 8261 shows 0 failing / 19 pending (the earlier azure-dev - cli + CodeCoverage_Upload failures appear to have been a transient run that's been restarted). Recommend monitoring the pending run; if CodeCoverage_Upload re-fails it's almost certainly infra/flake, but a re-failed main build would be worth gh run view --log-failed follow-up.


Great work overall. C1 is the only finding that I'd consider a hard blocker — once that's addressed and the H-series are at least decided on (fix vs. document-the-deviation), this lands solidly. Happy to dig into any of the suggested code shapes if they're unclear.

@hemarina hemarina added area/tools External tools (Docker, npm, Python) and removed area/extensions Extensions (general) labels May 23, 2026
@github-actions github-actions Bot added the area/extensions Extensions (general) label May 23, 2026
@azure-sdk
Copy link
Copy Markdown
Collaborator

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:

curl -fsSL https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/install-azd.sh | bash -s -- --base-url https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261 --version '' --verbose --skip-verify

pwsh:

Invoke-RestMethod 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261' -Version '' -SkipVerify -Verbose

Windows

PowerShell install

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261' -Version '' -SkipVerify -Verbose;"

MSI install

powershell -c "irm 'https://azuresdkartifacts.z5.web.core.windows.net/azd/standalone/pr/8261/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"

Standalone Binary

MSI

Documentation

learn.microsoft.com documentation

title: Azure Developer CLI reference
description: This article explains the syntax and parameters for the various Azure Developer CLI commands.
author: alexwolfmsft
ms.author: alexwolf
ms.date: 05/23/2026
ms.service: azure-dev-cli
ms.topic: conceptual
ms.custom: devx-track-azdevcli

Azure Developer CLI reference

This article explains the syntax and parameters for the various Azure Developer CLI commands.

azd

The Azure Developer CLI (azd) is an open-source tool that helps onboard and manage your project on Azure

Options

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
      --docs                 Opens the documentation for azd in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for azd.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd add: Add a component to your project.
  • azd auth: Authenticate with Azure.
  • azd completion: Generate shell completion scripts.
  • azd config: Manage azd configurations (ex: default Azure subscription, location).
  • azd copilot: Manage GitHub Copilot agent settings. (Preview)
  • azd deploy: Deploy your project code to Azure.
  • azd down: Delete your project's Azure resources.
  • azd env: Manage environments (ex: default environment, environment variables).
  • azd exec: Execute commands and scripts with azd environment context.
  • azd extension: Manage azd extensions.
  • azd hooks: Develop, test and run hooks for a project.
  • azd infra: Manage your Infrastructure as Code (IaC).
  • azd init: Initialize a new application.
  • azd mcp: Manage Model Context Protocol (MCP) server. (Alpha)
  • azd monitor: Monitor a deployed project.
  • azd package: Packages the project's code to be deployed to Azure.
  • azd pipeline: Manage and configure your deployment pipelines.
  • azd provision: Provision Azure resources for your project.
  • azd publish: Publish a service to a container registry.
  • azd restore: Restores the project's dependencies.
  • azd show: Display information about your project and its resources.
  • azd template: Find and view template details.
  • azd up: Provision and deploy your project to Azure with a single command.
  • azd update: Updates azd to the latest version.
  • azd version: Print the version number of Azure Developer CLI.

azd add

Add a component to your project.

azd add [flags]

Options

      --docs   Opens the documentation for azd add in your web browser.
  -h, --help   Gets help for add.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth

Authenticate with Azure.

Options

      --docs   Opens the documentation for azd auth in your web browser.
  -h, --help   Gets help for auth.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth login

Log in to Azure.

Synopsis

Log in to Azure.

When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.

To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, or --federated-credential-provider.

To log in using a managed identity, pass --managed-identity, which will use the system assigned managed identity.
To use a user assigned managed identity, pass --client-id in addition to --managed-identity with the client id of
the user assigned managed identity you wish to use.

azd auth login [flags]

Options

      --check-status                           Checks the log-in status instead of logging in.
      --client-certificate string              The path to the client certificate for the service principal to authenticate with.
      --client-id string                       The client id for the service principal to authenticate with.
      --client-secret string                   The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
      --docs                                   Opens the documentation for azd auth login in your web browser.
      --federated-credential-provider string   The provider to use to acquire a federated token to authenticate with. Supported values: github, azure-pipelines, oidc
  -h, --help                                   Gets help for login.
      --managed-identity                       Use a managed identity to authenticate.
      --redirect-port int                      Choose the port to be used as part of the redirect URI during interactive login.
      --tenant-id string                       The tenant id or domain name to authenticate with.
      --use-device-code[=true]                 When true, log in by using a device code instead of a browser.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth logout

Log out of Azure.

Synopsis

Log out of Azure

azd auth logout [flags]

Options

      --docs   Opens the documentation for azd auth logout in your web browser.
  -h, --help   Gets help for logout.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd auth status

Show the current authentication status.

Synopsis

Display whether you are logged in to Azure and the associated account information.

azd auth status [flags]

Options

      --docs   Opens the documentation for azd auth status in your web browser.
  -h, --help   Gets help for status.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion

Generate shell completion scripts.

Synopsis

Generate shell completion scripts for azd.

The completion command allows you to generate autocompletion scripts for your shell,
currently supports bash, zsh, fish and PowerShell.

See each sub-command's help for details on how to use the generated script.

Options

      --docs   Opens the documentation for azd completion in your web browser.
  -h, --help   Gets help for completion.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion bash

Generate bash completion script.

azd completion bash

Options

      --docs   Opens the documentation for azd completion bash in your web browser.
  -h, --help   Gets help for bash.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion fig

Generate Fig autocomplete spec.

azd completion fig

Options

      --docs   Opens the documentation for azd completion fig in your web browser.
  -h, --help   Gets help for fig.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion fish

Generate fish completion script.

azd completion fish

Options

      --docs   Opens the documentation for azd completion fish in your web browser.
  -h, --help   Gets help for fish.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion powershell

Generate PowerShell completion script.

azd completion powershell

Options

      --docs   Opens the documentation for azd completion powershell in your web browser.
  -h, --help   Gets help for powershell.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd completion zsh

Generate zsh completion script.

azd completion zsh

Options

      --docs   Opens the documentation for azd completion zsh in your web browser.
  -h, --help   Gets help for zsh.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config

Manage azd configurations (ex: default Azure subscription, location).

Synopsis

Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.

Available since azure-dev-cli_0.4.0-beta.1.

The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

Options

      --docs   Opens the documentation for azd config in your web browser.
  -h, --help   Gets help for config.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config get

Gets a configuration.

Synopsis

Gets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config get <path> [flags]

Options

      --docs   Opens the documentation for azd config get in your web browser.
  -h, --help   Gets help for get.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config list-alpha

Display the list of available features in alpha stage.

azd config list-alpha [flags]

Options

      --docs   Opens the documentation for azd config list-alpha in your web browser.
  -h, --help   Gets help for list-alpha.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config options

List all available configuration settings.

Synopsis

List all possible configuration settings that can be set with azd, including descriptions and allowed values.

azd config options [flags]

Options

      --docs   Opens the documentation for azd config options in your web browser.
  -h, --help   Gets help for options.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config reset

Resets configuration to default.

Synopsis

Resets all configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.

azd config reset [flags]

Options

      --docs    Opens the documentation for azd config reset in your web browser.
  -f, --force   Force reset without confirmation.
  -h, --help    Gets help for reset.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config set

Sets a configuration.

Synopsis

Sets a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config set <path> <value> [flags]

Examples

azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus

Options

      --docs   Opens the documentation for azd config set in your web browser.
  -h, --help   Gets help for set.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config show

Show all the configuration values.

Synopsis

Show all configuration values in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config show [flags]

Options

      --docs   Opens the documentation for azd config show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd config unset

Unsets a configuration.

Synopsis

Removes a configuration in the configuration path.

The default value of the config directory is:

  • $HOME/.azd on Linux and macOS
  • %USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.

azd config unset <path> [flags]

Examples

azd config unset defaults.location

Options

      --docs   Opens the documentation for azd config unset in your web browser.
  -h, --help   Gets help for unset.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot

Manage GitHub Copilot agent settings. (Preview)

Options

      --docs   Opens the documentation for azd copilot in your web browser.
  -h, --help   Gets help for copilot.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent

Manage tool consent.

Synopsis

Manage consent rules for tool execution.

Options

      --docs   Opens the documentation for azd copilot consent in your web browser.
  -h, --help   Gets help for consent.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent grant

Grant consent trust rules.

Synopsis

Grant trust rules for tools and servers.

This command creates consent rules that allow tools to execute
without prompting for permission. You can specify different permission
levels and scopes for the rules.

Examples:
Grant always permission to all tools globally
azd copilot consent grant --global --permission always

Grant project permission to a specific tool with read-only scope
azd copilot consent grant --server my-server --tool my-tool --permission project --scope read-only

azd copilot consent grant [flags]

Options

      --action string       Action type: 'all' or 'readonly' (default "all")
      --docs                Opens the documentation for azd copilot consent grant in your web browser.
      --global              Apply globally to all servers
  -h, --help                Gets help for grant.
      --operation string    Operation type: 'tool' or 'sampling' (default "tool")
      --permission string   Permission: 'allow', 'deny', or 'prompt' (default "allow")
      --scope string        Rule scope: 'global', or 'project' (default "global")
      --server string       Server name
      --tool string         Specific tool name (requires --server)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent list

List consent rules.

Synopsis

List all consent rules for tools.

azd copilot consent list [flags]

Options

      --action string       Action type to filter by (all, readonly)
      --docs                Opens the documentation for azd copilot consent list in your web browser.
  -h, --help                Gets help for list.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, lists rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd copilot consent revoke

Revoke consent rules.

Synopsis

Revoke consent rules for tools.

azd copilot consent revoke [flags]

Options

      --action string       Action type to filter by (all, readonly)
      --docs                Opens the documentation for azd copilot consent revoke in your web browser.
  -h, --help                Gets help for revoke.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, revokes rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd deploy

Deploy your project code to Azure.

azd deploy <service> [flags]

Options

      --all                   Deploys all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd deploy in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Deploys the packaged service located at the provided path. Supports zipped file packages (file path) or container images (image tag).
  -h, --help                  Gets help for deploy.
      --timeout int           Maximum time in seconds for azd to wait for each service deployment. This stops azd from waiting but does not cancel the Azure-side deployment. (default: 1200) (default 1200)

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd down

Delete your project's Azure resources.

azd down [<layer>] [flags]

Options

      --docs                 Opens the documentation for azd down in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Does not require confirmation before it deletes resources.
  -h, --help                 Gets help for down.
      --purge                Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env

Manage environments (ex: default environment, environment variables).

Options

      --docs   Opens the documentation for azd env in your web browser.
  -h, --help   Gets help for env.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config

Manage environment configuration (ex: stored in .azure/{environment}/config.json).

Options

      --docs   Opens the documentation for azd env config in your web browser.
  -h, --help   Gets help for config.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config get

Gets a configuration value from the environment.

Synopsis

Gets a configuration value from the environment's config.json file.

azd env config get <path> [flags]

Options

      --docs                 Opens the documentation for azd env config get in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config set

Sets a configuration value in the environment.

Synopsis

Sets a configuration value in the environment's config.json file.

Values are automatically parsed as JSON types when possible. Booleans (true/false),
numbers (42, 3.14), arrays ([...]), and objects ({...}) are stored with their native
JSON types. Plain text values are stored as strings. To force a JSON-typed value to be
stored as a string, wrap it in JSON quotes (e.g. '"true"' or '"8080"').

azd env config set <path> <value> [flags]

Examples

azd env config set myapp.endpoint https://example.com
azd env config set myapp.debug true
azd env config set myapp.count 42
azd env config set infra.parameters.tags '{"env":"dev"}'
azd env config set myapp.port '"8080"'

Options

      --docs                 Opens the documentation for azd env config set in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env config unset

Unsets a configuration value in the environment.

Synopsis

Removes a configuration value from the environment's config.json file.

azd env config unset <path> [flags]

Examples

azd env config unset myapp.endpoint

Options

      --docs                 Opens the documentation for azd env config unset in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for unset.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd env get-value

Get specific environment value.

azd env get-value <keyName> [flags]

Options

      --docs                 Opens the documentation for azd env get-value in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-value.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env get-values

Get all environment values.

azd env get-values [flags]

Options

      --docs                 Opens the documentation for azd env get-values in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env list

List environments.

azd env list [flags]

Options

      --docs   Opens the documentation for azd env list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env new

Create a new environment and set it as the default.

azd env new <environment> [flags]

Options

      --docs                  Opens the documentation for azd env new in your web browser.
  -h, --help                  Gets help for new.
  -l, --location string       Azure location for the new environment
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env refresh

Refresh environment values by using information from a previous infrastructure provision.

azd env refresh <environment> [flags]

Options

      --docs                 Opens the documentation for azd env refresh in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.
      --hint string          Hint to help identify the environment to refresh
      --layer string         Provisioning layer to refresh the environment from.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env remove

Remove an environment.

azd env remove <environment> [flags]

Options

      --docs                 Opens the documentation for azd env remove in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Skips confirmation before performing removal.
  -h, --help                 Gets help for remove.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env select

Set the default environment.

azd env select [<environment>] [flags]

Options

      --docs   Opens the documentation for azd env select in your web browser.
  -h, --help   Gets help for select.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env set

Set one or more environment values.

Synopsis

Set one or more environment values using key-value pairs or by loading from a .env formatted file.

azd env set [<key> <value>] | [<key>=<value> ...] | [--file <filepath>] [flags]

Options

      --docs                 Opens the documentation for azd env set in your web browser.
  -e, --environment string   The name of the environment to use.
      --file string          Path to .env formatted file to load environment values from.
  -h, --help                 Gets help for set.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd env set-secret

Set a name as a reference to a Key Vault secret in the environment.

Synopsis

You can either create a new Key Vault secret or select an existing one.
The provided name is the key for the .env file which holds the secret reference to the Key Vault secret.

azd env set-secret <name> [flags]

Options

      --docs                 Opens the documentation for azd env set-secret in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set-secret.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

  • azd env: Manage environments (ex: default environment, environment variables).
  • Back to top

azd exec

Execute commands and scripts with azd environment context.

Synopsis

Execute commands and scripts with full access to azd environment variables.

Commands are run with the azd environment loaded into the child process.
Multiple arguments use direct process execution (no shell wrapping).
A single quoted argument uses shell inline execution.

Examples:
azd exec python script.py # Direct exec (exact argv)
azd exec npm run dev # Direct exec (no shell)
azd exec -- python app.py --port 8000 # Direct exec with flags
azd exec 'echo $AZURE_ENV_NAME' # Inline via shell
azd exec ./setup.sh # Execute script file
azd exec --shell pwsh "Write-Host 'Hello'" # Inline PowerShell
azd exec ./build.sh -- --verbose # Script with args
azd exec -i ./init.sh # Interactive mode

azd exec [command] [args...] [-- script-args...] [flags]

Options

      --docs                 Opens the documentation for azd exec in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for exec.
  -i, --interactive          Run in interactive mode (connect stdin)
  -s, --shell string         Shell to use (bash, sh, zsh, pwsh, powershell, cmd). Auto-detected if not specified.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension

Manage azd extensions.

Options

      --docs   Opens the documentation for azd extension in your web browser.
  -h, --help   Gets help for extension.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension install

Installs specified extensions.

azd extension install <extension-id> [flags]

Options

      --docs             Opens the documentation for azd extension install in your web browser.
  -f, --force            Force installation, including downgrades and reinstalls
  -h, --help             Gets help for install.
  -s, --source string    The extension source to use for installs
  -v, --version string   The version of the extension to install

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension list

List available extensions.

azd extension list [--installed] [flags]

Options

      --docs            Opens the documentation for azd extension list in your web browser.
  -h, --help            Gets help for list.
      --installed       List installed extensions
      --source string   Filter extensions by source
      --tags strings    Filter extensions by tags

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension show

Show details for a specific extension.

azd extension show <extension-id> [flags]

Options

      --docs            Opens the documentation for azd extension show in your web browser.
  -h, --help            Gets help for show.
  -s, --source string   The extension source to use.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source

View and manage extension sources

Options

      --docs   Opens the documentation for azd extension source in your web browser.
  -h, --help   Gets help for source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source add

Add an extension source with the specified name

azd extension source add [flags]

Options

      --docs              Opens the documentation for azd extension source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   The location of the extension source
  -n, --name string       The name of the extension source
  -t, --type string       The type of the extension source. Supported types are 'file' and 'url'

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source list

List extension sources

azd extension source list [flags]

Options

      --docs   Opens the documentation for azd extension source list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source remove

Remove an extension source with the specified name

azd extension source remove <name> [flags]

Options

      --docs   Opens the documentation for azd extension source remove in your web browser.
  -h, --help   Gets help for remove.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension source validate

Validate an extension source's registry.json file.

Synopsis

Validate an extension source's registry.json file.

Accepts a source name (from 'azd extension source list'), a local file path,
or a URL. Checks required fields, valid capabilities, semver version format,
platform artifact structure, and extension ID format.

azd extension source validate <name-or-path-or-url> [flags]

Options

      --docs     Opens the documentation for azd extension source validate in your web browser.
  -h, --help     Gets help for validate.
      --strict   Enable strict validation (require checksums)

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension uninstall

Uninstall specified extensions.

azd extension uninstall [extension-id] [flags]

Options

      --all    Uninstall all installed extensions
      --docs   Opens the documentation for azd extension uninstall in your web browser.
  -h, --help   Gets help for uninstall.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd extension upgrade

Upgrade installed extensions to the latest version.

Synopsis

Upgrade one or more installed extensions.

By default, uses the stored registry source for each extension. If the stored
source is unavailable, falls back to the main (azd) registry. Extensions that
were installed from a non-main registry (e.g., dev) are automatically promoted
to the main registry when a newer version is available there.

Use --source to explicitly override the registry source for the upgrade. Use
--all to upgrade all installed extensions in a single batch; failures in one
extension do not prevent the remaining extensions from being upgraded.

Use --output json for a structured report of all upgrade results.

azd extension upgrade [extension-id] [flags]

Options

      --all              Upgrade all installed extensions
      --docs             Opens the documentation for azd extension upgrade in your web browser.
  -h, --help             Gets help for upgrade.
  -s, --source string    The extension source to use for upgrades
  -v, --version string   The version of the extension to upgrade to

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd hooks

Develop, test and run hooks for a project.

Options

      --docs   Opens the documentation for azd hooks in your web browser.
  -h, --help   Gets help for hooks.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd hooks run

Runs the specified hook for the project, provisioning layers, and services

azd hooks run <name> [flags]

Options

      --docs                 Opens the documentation for azd hooks run in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for run.
      --layer string         Only runs hooks for the specified provisioning layer.
      --platform string      Forces hooks to run for the specified platform.
      --service string       Only runs hooks for the specified service.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd infra

Manage your Infrastructure as Code (IaC).

Options

      --docs   Opens the documentation for azd infra in your web browser.
  -h, --help   Gets help for infra.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd infra generate

Write IaC for your project to disk, allowing you to manually manage it.

azd infra generate [flags]

Options

      --docs                 Opens the documentation for azd infra generate in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Overwrite any existing files without prompting
  -h, --help                 Gets help for generate.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd init

Initialize a new application.

Synopsis

Initialize a new application.

When used with --template, a new directory is created (named after the template)
and the project is initialized inside it — similar to git clone.
Pass "." as the directory to initialize in the current directory instead.

azd init [flags]

Options

  -b, --branch string         The template branch to initialize from. Must be used with a template argument (--template or -t).
      --docs                  Opens the documentation for azd init in your web browser.
  -e, --environment string    The name of the environment to use.
  -f, --filter strings        The tag(s) used to filter template results. Supports comma-separated values.
      --from-code             Initializes a new application from your existing code.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
  -m, --minimal               Initializes a minimal project.
  -s, --subscription string   ID of an Azure subscription to use for the new environment
  -t, --template string       Initializes a new application from a template. You can use a Full URI, <owner>/<repository>, <repository> if it's part of the azure-samples organization, or a local directory path (./dir, ../dir, or absolute path).
      --up                    Provision and deploy to Azure after initializing the project from a template.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd mcp

Manage Model Context Protocol (MCP) server. (Alpha)

Options

      --docs   Opens the documentation for azd mcp in your web browser.
  -h, --help   Gets help for mcp.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd mcp start

Starts the MCP server.

Synopsis

Starts the Model Context Protocol (MCP) server.

This command starts an MCP server that can be used by MCP clients to access
azd functionality through the Model Context Protocol interface.

azd mcp start [flags]

Options

      --docs   Opens the documentation for azd mcp start in your web browser.
  -h, --help   Gets help for start.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd monitor

Monitor a deployed project.

azd monitor [flags]

Options

      --docs                 Opens the documentation for azd monitor in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for monitor.
      --live                 Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
      --logs                 Open a browser to Application Insights Logs.
      --overview             Open a browser to Application Insights Overview Dashboard.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd package

Packages the project's code to be deployed to Azure.

azd package <service> [flags]

Options

      --all                  Packages all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd package in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.
      --output-path string   File or folder path where the generated packages will be saved.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd pipeline

Manage and configure your deployment pipelines.

Options

      --docs   Opens the documentation for azd pipeline in your web browser.
  -h, --help   Gets help for pipeline.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd pipeline config

Configure your deployment pipeline to connect securely to Azure. (Beta)

azd pipeline config [flags]

Options

  -m, --applicationServiceManagementReference string   Service Management Reference. References application or service contact information from a Service or Asset Management database. This value must be a Universally Unique Identifier (UUID). You can set this value globally by running azd config set pipeline.config.applicationServiceManagementReference <UUID>.
      --auth-type string                               The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials.
      --docs                                           Opens the documentation for azd pipeline config in your web browser.
  -e, --environment string                             The name of the environment to use.
  -h, --help                                           Gets help for config.
      --principal-id string                            The client id of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-name string                          The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role stringArray                     The roles to assign to the service principal. By default the service principal will be granted the Contributor and User Access Administrator roles. (default [Contributor,User Access Administrator])
      --provider string                                The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines).
      --remote-name string                             The name of the git remote to configure the pipeline to run on. (default "origin")

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd provision

Provision Azure resources for your project.

azd provision [<layer>] [flags]

Options

      --docs                  Opens the documentation for azd provision in your web browser.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for provision.
  -l, --location string       Azure location for the new environment
      --no-state              (Bicep only) Forces a fresh deployment based on current Bicep template files, ignoring any stored deployment state.
      --preview               Preview changes to Azure resources.
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd publish

Publish a service to a container registry.

azd publish <service> [flags]

Options

      --all                   Publishes all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd publish in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Publishes the service from a container image (image tag).
  -h, --help                  Gets help for publish.
      --to string             The target container image in the form '[registry/]repository[:tag]' to publish to.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd restore

Restores the project's dependencies.

azd restore <service> [flags]

Options

      --all                  Restores all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd restore in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd show

Display information about your project and its resources.

azd show [resource-name|resource-id] [flags]

Options

      --docs                 Opens the documentation for azd show in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for show.
      --show-secrets         Unmask secrets in output.

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template

Find and view template details.

Options

      --docs   Opens the documentation for azd template in your web browser.
  -h, --help   Gets help for template.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template list

Show list of sample azd templates. (Beta)

azd template list [flags]

Options

      --docs             Opens the documentation for azd template list in your web browser.
  -f, --filter strings   The tag(s) used to filter template results. Supports comma-separated values.
  -h, --help             Gets help for list.
  -s, --source string    Filters templates by source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template show

Show details for a given template. (Beta)

azd template show <template> [flags]

Options

      --docs   Opens the documentation for azd template show in your web browser.
  -h, --help   Gets help for show.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source

View and manage template sources. (Beta)

Options

      --docs   Opens the documentation for azd template source in your web browser.
  -h, --help   Gets help for source.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source add

Adds an azd template source with the specified key. (Beta)

Synopsis

The key can be any value that uniquely identifies the template source, with well-known values being:
・default: Default templates
・awesome-azd: Templates from https://aka.ms/awesome-azd

azd template source add <key> [flags]

Options

      --docs              Opens the documentation for azd template source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   Location of the template source. Required when using type flag.
  -n, --name string       Display name of the template source.
  -t, --type string       Kind of the template source. Supported types are 'file', 'url' and 'gh'.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source list

Lists the configured azd template sources. (Beta)

azd template source list [flags]

Options

      --docs   Opens the documentation for azd template source list in your web browser.
  -h, --help   Gets help for list.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd template source remove

Removes the specified azd template source (Beta)

azd template source remove <key> [flags]

Options

      --docs   Opens the documentation for azd template source remove in your web browser.
  -h, --help   Gets help for remove.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd up

Provision and deploy your project to Azure with a single command.

azd up [flags]

Options

      --docs                  Opens the documentation for azd up in your web browser.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for up.
  -l, --location string       Azure location for the new environment
      --subscription string   ID of an Azure subscription to use for the new environment

Options inherited from parent commands

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd update

Updates azd to the latest version.

azd update [flags]

Options

      --channel string             Update channel: stable or daily.
      --check-interval-hours int   Override the update check interval in hours.
      --docs                       Opens the documentation for azd update in your web browser.
  -h, --help                       Gets help for update.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

azd version

Print the version number of Azure Developer CLI.

azd version [flags]

Options

      --docs   Opens the documentation for azd version in your web browser.
  -h, --help   Gets help for version.

Options inherited from parent commands

  -C, --cwd string           Sets the current working directory.
      --debug                Enables debugging and diagnostics logging.
  -e, --environment string   The name of the environment to use.
      --no-prompt            Runs without prompts. Uses existing values; fails if any required value or decision cannot be resolved automatically.

See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Extensions (general) area/tools External tools (Docker, npm, Python)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add telemetry instrumentation for azd tool first-run experience and tool operations

4 participants