Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Developer CLI (azd) extensions are modular components that extend the functionality of the Azure Developer CLI. They enable you to add new capabilities, automate workflows, and integrate with other services directly from the CLI. Use extensions to tailor azd to evolving team needs and Azure scenarios.
Note
azd extensions are currently in beta.
Manage extension sources
You can discover, install, and update extensions as your requirements grow. Extension sources handle distribution and management.
- Extension sources are file or URL based manifests that provide lists of available
azdextensions. - You can add custom extension sources that connect to private, local, or public registries.
- Extension sources are an equivalent concept to NuGet or Node Package Manager (NPM) feeds and must adhere to the official extension registry schema.
azd provides two extension source registries to help you get started with extensions:
- The official extension source registry is preconfigured in
azdand is hosted at https://aka.ms/azd/extensions/registry. - The development extension registry can also be added to your
azdconfiguration. This opt-in registry contains experimental extensions for internal testing that might become official extensions.
To opt in to the development registry, run the following command:
# Add a new extension source name 'dev' to your `azd` configuration.
azd extension source add -n dev -t url -l "https://aka.ms/azd/extensions/registry/dev"
Caution
Extensions hosted in the dev registry don't contain signed binaries.
Extension source commands
Use the following commands to manage extension sources for your azd installation.
List installed extension sources
azd extension source list
Add a new extension source
azd extension source add -n <name> -t url -l <registry-url>
-l, --location: The location of the extension source.-n, --name: The name of the extension source.-t, --type: The type of extension source. Supported types are file and url.
Remove an extension source
azd extension source remove <name>
Manage extensions
After you enable extensions and configure your extension sources, install extensions to add new capabilities to azd. For an example of working with extensions, see Quickstart - use the AI extension.
List extensions
azd extension list [flags]
--installedDisplays a list of installed extensions.--sourceOnly lists extensions from the specified source.--tagsFilters extensions by tags, such as AI or test.
Install an extension
azd extension install <extension-names> [flags]
Replace <extension-name> with the name of the extension you want to install.
-v, --versionSpecifies the version constraint to apply when installing extensions.-s, --sourceSpecifies the extension source used for installations.
Upgrade an extension
azd extension upgrade <extension-name>
--allUpgrades all previously installed extensions when specified.-v, --versionUpgrades a specified extension using a version constraint, if provided.-s, --sourceSpecifies the extension source used for installations.
Uninstall an extension
azd extension uninstall <extension-name>
--allRemoves all installed extensions when specified.
Use azd extensions in dev containers
The azd Dev Container Feature supports an extensions option to automatically install a comma-separated list of azd extensions during the container build. Extensions installed this way are available as soon as the container starts, reducing manual setup and enabling azd commands to run with the required extensions already installed.
To auto-install extensions, add the extensions option to the azd feature entry in your devcontainer.json file:
{
"name": "Azure Developer CLI",
"image": "mcr.microsoft.com/devcontainers/python:3.10-bullseye",
"features": {
"ghcr.io/azure/azure-dev/azd:latest": {
"extensions": "my-ext-1,my-ext-2"
}
}
}
The extensions value is a comma-separated list of azd extension names. Installation occurs during the container build, so the extensions are ready to use as soon as the container starts. After changing the extensions list, use the Rebuild and Reopen in Dev Container command in Visual Studio Code to rebuild the container with the updated extensions.
Learn more about the azd Dev Container Feature.