What is the difference between the Azure Command Line Interface and Azure Developer Command Line Interface?
Tags: azure, cli, developer, cloud
Published: 2023-07-24 14:18:30

Let's start by saying they are both great developer tools for Azure and they both allow you to interact with services in two different ways. So let's dig into what they are and when you should use them.

## What is the [Azure Command Line Interface](https://aka.ms/az-blog-what-is-az) (Az CLI)?

The Azure (CLI) is a command-line tool that you can use to manage and control your Azure resources directly from the terminal. It is a cross-platform tool that can be installed in a number of ways (Windows, Mac, Linux, Docker and Azure Cloud Shell).

However, it doesn't stop there. You are also able to install a number of extensions to add additional functionality to the Azure CLI. Some examples of extensions are:

- Azure Interactive Mode
- Azure DevOps
- Azure Kubernetes Service

A full list of extensions can be found [here](https://aka.ms/az-blog-az-extensions).

My personal favourite is the Azure Interactive Mode, an AI based extension. You can checkout my blog post on this here: https://dev.to/liamchampton/step-by-step-how-to-setup-and-use-azure-cli-interactive-mode-292e

When using the Azure CLI you would use the alias `az` and a subcommand typically follows for an action to take. This is just a few of the commands available to you and you can manage almost all of your Azure resources using the Azure CLI.

![azure cli commands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3e0wmckafozff0tezt5l.png)

### Example use case of the Azure CLI

A typical example of when to use the Azure CLI is if you are creating a simple resource group that will hold a Virtual Machine and you need complete control over the commands being executed and how this Virtual Machine will be deployed.

## What is the [Azure Developer Command Line Interface](https://aka.ms/az-blog-what-is-azd) (Azd CLI)?

The Azure Developer CLI is a tool primarily developer-centric. This tool is aimed at creating and deploying Azure applications and infrastructure using only a handful of commands. The Azd CLI is open-source and has 3 main goals:

- Reduce the time required for a developer to be productive
- Demonstrate opinionated best practices for Azure development
- Help developers understand core Azure development constructs

When using the Azd CLI you would typically follow this workflow:

1. Select a template - This template will be written in Bicep or Terraform and it outlines the infrastructure you want to deploy within Azure.
2. Login to Azure using the command `azd auth login`
3. Run the command `azd init` and it will initialise the project with the selected template.
4. Package it all up, provision and deploy the application using the command `azd up`

As you continue to iterate, write code and develop your solutions you can continue to update your deployed application by only running the command `azd deploy`.

If you happen to change the underlying infrastructure files then you only need to run the command `azd provision` again and it will handle the rest for you.

Here are some of the commands available to you when using the Azd CLI:

![azure developer cli commands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ro2l7bndkoasakw3o3b.png)

### Example use case of the Azure Developer CLI

A typical use case of the Azd CLI is if you have a full application consisting of multiple complex services that all connect to one anther and will be a very arduous task to set them up manually in the portal or through many Azure CLI commands. This would also bode well if you are working in a distributed team and you want to ensure everyone is using the same infrastructure and application code.

## When to use the Azure CLI and when to use the Azure Developer CLI?

Both CLI's allow you to deploy services and infrastructure to Azure. However, the Azure CLI is more of a general purpose tool that allows you to manage and control your Azure resources directly from the terminal with a lot of freedom to edit, change and have more of a granular control over each command executed. The Azure Developer CLI is more of a developer-centric tool with a focus on speeding up deployments by having a lot of the dots connected for you within a single application. This isn't to say you lack control but you certainly have less to worry about when it comes to the deployment process.

Happy terminal'ing!

If you have any questions or some feedback, I'd love to hear so feel free to drop me a line 📝

[Twitter](https://twitter.com/liamchampton)
[LinkedIn](https://www.linkedin.com/in/liam-conroy-hampton/)