Exploring azd extensions: Enhance your Azure developer experienceThe Azure Developer CLI (azd) has a new feature called extensions that empowers developers to customize their workflow with azd. If you're a developer building on Azure, maybe you already have a "wish list" of CLI capabilities. If so, you might be able to create an extension for them. This post explores what azd extensions are, their key features, real-world use cases, and how to use extensions from our registry or create a private registry. By the end, you'll know how azd extensions can enhance your Azure development workflow, how to apply them in your projects, and even build an extension.What are azd extensions?The Azure Developer CLI (azd) extensions are modular additions that extend the azd functionality beyond the built-in commands and integrate seamlessly with the azd commands and functionality. Essentially, an extension is a plugin that can introduce new CLI commands, allowing you to tailor azd to your specific needs and scenarios. This means you can add new capabilities, automate repetitive tasks, and even integrate third-party or Azure services directly from the CLI interface.Extensions bring developer tools closer to azd's core workflow, enabling a more customized and powerful developer experience. Extensions can be discovered and used by installing an extension from the registry. The extensions allow developers to customize their environment, automate complex processes, and add new capabilities specific to their projects. It might address common developer pain points in idiomatic ways or specific considerations to an engineering organization’s processes and requirements--without changing the core of azd. Think: faster deployments, better debugging, and more efficient management of cloud resources.azd extensions are currently released as an alpha feature. This means you need to enable the extension feature before you can use it. It also means that the feature is early in its lifecycle (so expect rapid improvements and possible changes). To opt in to extensions, use the configuration flag in azd:azd config set alpha.extensions onEnabling this flag turns on extension management in your azd environment. Once enabled, azd provides a set of commands under the azd extension namespace to manage extensions (for example, to list, install, or remove extensions).Key features of azd extensionsThe extension framework comes with several important features: New custom commands - An extension can introduce its own CLI commands or subcommands in azd. An extension might add a new top-level command like azd demo or azd ai with its own set of subcommands. This feature allows packaging complex operations or workflows behind convenient commands. And azd now supports nested command namespaces for extensions, so extension authors can organize commands hierarchically. For example, azd ai setup, azd ai start, etc. Modularity and isolation - Extensions are separate modules, which means you only install what you need. They don’t bloat the core CLI; instead, you opt in to the capabilities relevant to your project. If you no longer need an extension, you can remove it cleanly. This modular design keeps azd lean while giving you flexibility. Automated workflows - Extensions can encapsulate automation. For instance, they can prompt users for input, execute a series of steps, or listen for certain events in the CLI process. The demo extension showcases this feature by adding commands that demonstrate interactive prompts and event handling (more on workflows in the quickstart). This capability means that you can build on top of existing azd features to create customized multi-step processes. For example, running tests and setting up environments to the azd resource provisioning flow. Integration with external services - One of the powerful features of azd extensions is the ability to integrate external tools or cloud services with azd. Because an extension has access to azd’s context and can call external APIs or scripts, you could create an extension that interacts with Azure services (beyond what azd core supports) or even with third-party services. This might mean to integrate with GitHub, Azure DevOps, or your custom internal systems directly from azd. The repo docs have more detail on how extensions help integrate with other services so you can trigger or manipulate external resources as part of your CLI workflow. Extension source registries - As mentioned, azd uses extension sources to distribute extensions. The official registry is the default, but you can add your own feeds if you have private extensions. For example, a company could maintain an internal list of azd extensions (perhaps for proprietary workflows) and distribute them via a private URL that team members add with azd extension source add. This design borrows from concepts that developers might recognize from package managers (like adding an npm registry or a NuGet feed). The azd team curates the official feed, and there’s also a "dev" feed for preview extensions where experimental ideas live (with the caveat that those extensions aren't signed or fully supported yet). You can opt in to "dev" by using azd extension source add -n dev -t url -l "https://aka.ms/azd/extensions/registry/dev". Lifecycle management via CLI - Once extensions are enabled, everything from discovering new extensions to keeping them updated is handled through CLI commands. This means you don't need to manually download plugins or run separate installers. You get a seamless experience. For example, running azd extension install microsoft.azd.demo fetches the extension from the registry and make its commands available immediately. Similarly, azd extension upgrade --all updates all your installed extensions when new versions are available. This reduces maintenance overhead.The goal of azd extensions is to allow you to adapt the CLI to your needs, reduce manual effort, and integrate the tools and services that matter to you directly into your Azure development workflow.How extensions are delivered?Azure Developer CLI extensions are delivered through extension sources, which are essentially registries or feeds of extensions. By default, azd comes preconfigured with the official extension registry. This is similar to how package managers like NuGet or npm have public feeds. You can also add other extension sources (for example, a private registry URL or a local file source) to install custom or in-house extensions.There's an optional "dev" extension registry for experimental extensions (intended for internal testing) that users can opt into. Each extension source adheres to a specific manifest schema, but azd handles the details. The extensions system is designed to be open and flexible so that you can fetch extensions from official Microsoft feeds or your own organization's feed as needed.Once extension support is enabled and sources are configured, you can install extensions. We walk through a concrete example, but at a high level, managing extensions is straightforward. You can list available extensions, install or uninstall them, and upgrade them using familiar CLI commands. For example: azd extension list – lists available extensions (--installed shows what you have installed) azd extension install – installs a specified extension by name azd extension upgrade – updates an installed extension to a newer version (use --all to update everything) azd extension uninstall – removes an extension you no longer needBecause this system is in alpha, the extensions commands are listed under an 'Extensions' section of azd's help menu, separated from the stable core commands. This separation makes it clear which parts of azd are experimental.In summary, azd extensions provide a plugin mechanism to inject custom functionality into the azd CLI, giving developers the flexibility to adapt the tool to evolve project and team requirements.Using the azd demo extensionA hands-on demo is one of the best ways to see a new feature in action. So, let's walk through an example using the azd demo extension. By trying out this demo extension, you get a feel for the extension installation process and how to use extension-provided commands.1. PrerequisitesEnsure you have the latest version of azd installed. The extension commands aren't available in versions before 1.17.0.Optionally, you might want to initialize an azd project to use with the extension. The demo extension can be run in the context of any azd project. For a quick start, you can create a sample project using the "Hello azd" template. Navigate to an empty directory and run:azd init -t hello-azdThis command sets up a simple starter project for you to experiment with, but you can use any existing azd project if you have one. The demo extension doesn't require a specific project type.2. Enable extension supportEnsure you enabled the extensions feature in azd (this is a one-time set up).azd config set alpha.extensions on3. Install the demo extensionUse the azd extension install command to add the extension from the official registry:azd extension install microsoft.azd.demo4. Verify the extension is installedYou can check that the extension installed correctly by listing your installed extensions:azd extension list --installedThis displays a list of extensions currently added. You should see microsoft.azd.demo in the output, indicating the demo extension is ready to use.5. Use the extension to explore new commandsWith the demo extension installed, try out its commands. The extension adds a new top-level command to azd named demo. To see what it offers, run:azd demoThis menu tells us that the extension added several subcommands under the azd demo namespace. azd demo version - If you run this command, it prints the version of the demo extension application. azd demo context - This command outputs the context of your current azd project and environment. It demonstrates that the extension can access your azd project's state, such as the template you initialized, what environment is active, etc., and display it in the terminal output. This could be useful for extensions that need to know what you're working on. azd demo colors - If you try this command, it prints a table of ASCII colors in the terminal. It's a fun example of how an extension can produce formatted output. Not Azure-specific, but it demonstrates that the extension can control console output in creative ways. azd demo prompt - This command is the most interesting. It starts an interactive workflow in your terminal. The extension asks a series of questions. For example, 'Which Azure services do you use most with azd?' and presents a list of options (Container Apps, Functions, Static Web Apps, etc.) in a checkbox-style menu. You can type to filter the list and select one or multiple options. This demonstrates the extension’s ability to prompt the user and handle input. After you make a selection and hit Enter, it will continue with other prompts including yes/no questions and other list selections. Think of this pattern as building an interactive CLI wizard into azd via an extension that could be used in real extensions to configure services, gather user preferences, or confirm actions in a guided way. azd demo listen - This command starts the extension and listens for events. In this mode, it listens for certain events or triggers from azd. In the demo, it shows that extensions can hook into azd’s event pipeline (for example, lifecycle events like infrastructure provisioned or deployment completed) and perform actions when those occur. However, it isn't intended to be called directly from users and extension developers should make these commands hidden to avoid confusion.Experiment with these commands in your environment. Remember, this is just a demonstration extension, so while these commands don't change actual resources, they illustrate the mechanics. This extension is using the extension framework API to integrate into azd, parse your input, and display output. For a developer interested in building their own extension, the demo extension’s code serves as a reference implementation of key patterns (reading azd context, prompting user, etc.).6. Uninstall the extension (optional)To see how to remove an extension, let's remove the demo extension. Run:azd extension uninstall microsoft.azd.demoThis takes the extension out of your azd CLI context and removes the azd demo commands. You can always reinstall it later if needed.That's it! You installed an azd extension and tried its commands. The process for other extensions is the same: enable extensions (once), then install the extension you want by name, and use the new commands it provides.Hopefully this demo extension illustrated how approachable it is to extend azd’s functionality. Next, let's look at real use cases and scenarios where such extensions can be valuable.Use cases and scenarios for azd extensionsHere are some practical examples and scenarios where azd extensions can help developers in different ways.Integrate AI and machine learning servicesOne exciting area for extensions is simplifying AI/ML workflows in Azure. Imagine you want to incorporate AI into your app. An extension could provide an azd ai set of commands to do this. In fact, the azd team has been prototyping an "AI extension" that guides developers through setting up AI resources and integrating them. For example, a prototype extension offers a command azd ai setup that launches a guided experience to configure the necessary Azure AI services and even lets you incorporate your own custom data into an AI model. This kind of extension can automate the steps to provision an Azure AI Service, deploy models, etc. behind an interactive CLI guided flow. No need to manually navigate the Azure portal for every setting or write complex scripts, just answer a few prompts and let the extension do the heavy lifting.Custom DevOps and pipeline tasksMany teams have DevOps processes that involve various scripts and commands. With extensions, some of these can be rolled into azd. For example, you might create an extension that runs a suite of quality checks (linting, security scans, etc.) tailored to your project. While azd itself already has azd pipeline config for CI/CD, an extension could go further to integrate with external systems or cover scenarios azd doesn’t natively handle. One could envision an extension that interacts with GitHub or Azure DevOps REST APIs to work with azd boards create-workitem (to file an issue or task in GitHub or Azure Boards) or an azd gh extension that creates GitHub repos or manages labels. The benefit is encapsulating these dev lifecycle tasks in the same CLI you use for deployment.Enhanced resource managementAzure is vast, and azd focuses on the core developer workflow (init, up, deploy, monitor). But perhaps you want custom resource management tasks available. Extensions might fill in gaps like managing quotas, cleaning up resources, or toggling settings. For instance, as part of AI integration, the team discussed extension commands to check Azure AI model availability and quotas. A specialized extension could provide commands to list usage quotas of certain Azure services or switch between different pricing tiers quickly. Another example could be an extension to bulk-delete resources created by an azd template (something beyond azd down like cleaning up log analytics or other side-resources that azd core might not fully tear down).Team or domain-specific extensionsConsider a data science team versus a web front-end team and how their needs differ. A data science team might build an extension for azd that adds commands to handle data operations, such as triggering a data pipeline or running a machine learning experiment in Azure Machine Learning. A web front-end team might build an extension that interfaces with a headless CMS or a CDN for their static content. Domain-specific extensions can encapsulate the tools and processes of that domain. The key is that they integrate those steps into the overall azd workflow so that deploying the app and managing its related tasks are done in one place. Teams working on Azure IoT, for example, could create an extension for IoT hub management or device provisioning. Teams building on Azure Kubernetes Service (AKS) could have an extension to simplify certain kubectl/helm steps as part of app deployment.Third-party integrationsNot all developer tools are Microsoft Azure. You might use services like Stripe (for payments) or SendGrid (for email) or any number of APIs. If your Azure application needs to set up or coordinate with those integrations, an azd extension could be written to handle that integration step. For instance, an extension might add a command azd sendgrid set up to configure the service as part of your Key Vault used in your app, or azd stripe webhooks to automatically register your deployed app’s endpoints as Stripe webhooks. These examples are hypothetical, but they demonstrate that extensions could serve as glue between Azure deployments and external systems.Inner-loop toolingSome extensions may not even talk to Azure. They might just make a developer’s inner-loop easier. For example, an extension could integrate a file generator, so you could do something like azd generate unit-test --for and it creates a test file stub according to your project’s conventions. Or an extension could wrap docker commands to run a local development container for you if that’s part of your workflow, such as azd devcontainer up. Think of any command or script you wish azd had – that’s a candidate for an extension.It’s worth noting that the Azure Developer CLI team is already working on several extensions in these areas. We have multiple extensions in progress to bring more developer tools into azd. The AI extension is one of them to enable AI scenarios. Another is the developer extension that helps developers build their own extensions. In the future as the ecosystem grows, we may see contributions from the community and third-parties addressing niche use cases via extensions.If you have a specific scenario where a custom command would save time or enforce consistency, that’s a great opportunity for an extension. They enhance the Azure development experience by integrating everything you need into one flow, reducing context switches and manual steps. From provisioning AI services, to automating project set up, to integrating with third-party APIs, the possibilities are broad. The result is a more streamlined developer workflow that stays focused within Azure Developer CLI.Build an extension with an extensionThat's right. We have an extension that guides the process of building an extension.1. Install the extension# Install the azd developer extensionazd extension install microsoft.azd.extensionsOnce you install the extension, you see a confirmation and examples in the terminal output.2. Initialize a new extension project# Initialize a new extension projectazd x initFollow the prompts in your terminal. The namespace is your top level command. In this example, I selected test as the namespace, so the commands follow this namespace, such as azd test [command].Your output should look something like this after making all of your selections.3. Finally, try out the new extension project# Run your new azd extension command# azd [command] -hNow you have an extension. You need to build out the functionality of the extension, but consider this the on-ramp. And, from here you can start building.How to contributeThe Azure Developer CLI (azd) is an open-source project hosted on GitHub. This means that not only can you view the source code, but you can also contribute to it. Here are ways to contribute: Build your own extension for the registry: (soon!) since this feature is in alpha we aren't yet allowing users to contribute directly to the official azd extension registry, but we do have plans to open this up. This will be the most direct way to contribute to the ecosystem. Contact us if you want to publish an early extension in our beta release. Contribute to the CLI: if you have ideas to improve the extension framework (or any part of azd), you can open issues or pull requests on the GitHub repo. The repo has a CONTRIBUTING guide and uses discussions and issues to manage feedback. Because azd is open source, it means the barrier to suggest changes is lower and you can directly engage with the code or file an issue for the team. Participate in discussions: azd has discussion threads for new features. By participating and sharing your needs, you indirectly contribute by shaping the priorities. If many developers ask for a certain extension or have a common pain point, the team can respond to that. Documentation and samples: another way to help is to contribute to the docs or examples. The documentation we referenced has a GitHub repository. If you spot an issue or want to add an example (say, a tutorial on building an extension), you could submit changes there. Similarly, sharing sample code for extensions or blogging about your own extension experience can help grow the knowledge base for everyone.We can't wait to see what you buildThe azd extensions open up a new world of possibilities for cloud and AI developers. They bring flexibility and customization to your fingertips, allowing you to adapt Azure's developer tooling to your exact needs. We built this extension framework because we live in a cloud-first, and increasingly AI-first, world where most projects are built for cloud and AI infrastructure. We wanted to give developers the ability to move faster when building cloud and AI features in their application because time-to-market is important.If you're a developer building on Azure, now is a great time to experiment with azd extensions. Try out the demo extension to get a feel for it, and then think about those "wish list" CLI capabilities you want. You might be able to create an extension for them. And as you do, share your feedback with the Azure Developer CLI team. Together, we can shape this feature into something truly empowering for all Azure builders.