What are Azure CLI Extensions?
Tags: azure, cli, extensions
Published: 2020-02-10 14:00:14

---
title: What are Azure CLI Extensions?
published: true
description: Learn what Azure CLI Extensions are and how to use them
tags: azure, CLI, extensions
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gmafgghzlyebewbhv9os.png
---

> This is Part 1 of 2. You can check out Part 2 below.

{% link https://dev.to/azure/build-your-own-azure-cli-extensions-42fk %}

## What are Azure CLI Extensions?

The Azure CLI is a powerful command-line interface that you can use to manage your Azure resources. It comes loaded with lots of commands that you can use to create resources like VMs and Web Apps and do almost anything with them that you can imagine, like swap a deployment slot. 

Sometimes, the commands that the Azure CLI offers aren't enough. Or maybe you want to use them differently than they allow you to. For these cases, you can use **Azure CLI Extensions**.

Azure CLI extensions are additions to the CLI that are built by Microsoft and the community and provide you with additional functionality. The extensions are Python wheels that you can run as CLI commands. [Python wheel](https://pypi.org/project/wheel/) is a built-package format for Python code that allows small code packages to be installed and uninstalled in client applications easily.

You can view a list of all of the CLI extensions [here](https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-list?view=azure-cli-latest). And you can also see the list when you type the command **az extension list-available --output table** in the Azure CLI.

## Installing and using an Azure CLI Extension

Installing Azure CLI extensions is very easy. First, open up an instance of the Azure CLI. You can open a local instance on your computer (make sure that you are running the latest version of the CLI) or open it in the Azure Cloud Shell (https://shell.azure.com/).

Once you are in the Azure CLI, you can install extensions with this command:

```
az extension add --name <extension-name>
```

You can use the name of any extension that is listed in the **az extension list-available** list. If you want to use an extension that's not in the list, for instance, an extension that you've built yourself, you can add it by using the URL or the local path to it. Just make sure that your CLI instance has access to the extension that you are trying to install. In the case of an external extension that you need to add with a URL or local path, you should use his command:

```

az extension add --source <URL-or-path>
```

You can also update extensions to their latest version. You do that by using this command:

```
az extension update --name <extension-name>
```

And you can also uninstall extensions when you are done with them. Use this command to remove an extension:

```
az extension remove --name <extension-name>
```

Here is an example of installing the Azure CLI Extension called "[Find](https://github.com/Azure/azure-cli-extensions/tree/master/src/find)". This extension talks to a Microsoft AI-powered API, called Azure Aladdin, that helps to make using Azure easier. The extension is currently in preview. By the time you read this post, the **find** extension might have changed or might have become a part of the Azure CLI. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d8wubii0ftb3ui1j28a0.png)


(Installing the "Find" extension in the Azure Cloud Shell)

The help extension is really cool. You can, for instance, use it to get explanations about Azure CLI commands.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/st861ry50y2nfedfzb7i.png)
(Get CLI command explanations from the "Find" extension in the Azure Cloud Shell)

You can also use the extension to find commands. This is really useful when you know that there should be a CLI command for something but don't exactly what it is.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/33ceh10m6y7h9dcb7z9o.png)
(Get CLI command explanation from the "Find" extension in the Azure Cloud Shell)

## Conclusion

The Azure CLI is a very powerful tool and CLI extensions make it even more powerful and useful. Check out the [list of extensions](https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-list?view=azure-cli-latest) to see if there are any in there that can help you. 

Stay connected with me on various social platforms for daily software development news.

- [Twitter](https://twitter.com/intent/follow?screen_name=mbcrump) | [Twitch](https://twitch.tv/mbcrump) | [Instagram](https://instagram.com/mbcrump) | [YouTube](https://youtube.com/mbcrump) | [GitHub](https://github.com/mbcrump) | [Website](https://www.michaelcrump.net)