Skip to content

Commit ff625cc

Browse files
authored
Merge pull request #180535 from tfitzmac/1119commands
clarify command availability
2 parents 2aab78a + f4a4c56 commit ff625cc

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

articles/azure-resource-manager/bicep/bicep-cli.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: Bicep CLI commands and overview
33
description: Describes the commands that you can use in the Bicep CLI. These commands include building Azure Resource Manager templates from Bicep.
44
ms.topic: conceptual
5-
ms.date: 10/18/2021
5+
ms.date: 11/19/2021
66
---
77
# Bicep CLI commands
88

99
This article describes the commands you can use in the Bicep CLI. You must have the [Bicep CLI installed](./install.md) to run the commands.
1010

11-
This article shows how to run the commands in Azure CLI. If you're not using Azure CLI, run the commands without `az` at the start of the command. For example, `az bicep version` becomes ``bicep version``.
11+
You can either run the Bicep CLI commands through Azure CLI or by calling Bicep directly. This article shows how to run the commands in Azure CLI. When running through Azure CLI, you start the commands with `az`. If you're not using Azure CLI, run the commands without `az` at the start of the command. For example, `az bicep build` becomes `bicep build`.
1212

1313
## build
1414

@@ -68,7 +68,7 @@ For more information about using this command, see [Decompiling ARM template JSO
6868

6969
## install
7070

71-
The `install` command adds the Bicep CLI to your local environment. For more information, see [Install Bicep tools](install.md).
71+
The `install` command adds the Bicep CLI to your local environment. For more information, see [Install Bicep tools](install.md). This command is only available through Azure CLI.
7272

7373
To install the latest version, use:
7474

@@ -84,7 +84,7 @@ az bicep install --version v0.3.255
8484

8585
## list-versions
8686

87-
The `list-versions` command returns all available versions of the Bicep CLI. Use this command to see if you want to [upgrade](#upgrade) or [install](#install) a new version.
87+
The `list-versions` command returns all available versions of the Bicep CLI. Use this command to see if you want to [upgrade](#upgrade) or [install](#install) a new version. This command is only available through Azure CLI.
8888

8989
```azurecli
9090
az bicep list-versions
@@ -141,12 +141,12 @@ The `publish` command doesn't recognize aliases that you've defined in a [bicepc
141141

142142
When your Bicep file uses modules that are published to a registry, the `restore` command gets copies of all the required modules from the registry. It stores those copies in a local cache. A Bicep file can only be built when the external files are available in the local cache. Typically, you don't need to run `restore` because it's called automatically by `build`.
143143

144-
To use the restore command, you must have Bicep CLI version **0.4.1008 or later**.
144+
To use the restore command, you must have Bicep CLI version **0.4.1008 or later**. This command is currently only available when calling the Bicep CLI directly. It's not currently available through the Azure CLI command.
145145

146146
To manually restore the external modules for a file, use:
147147

148-
```azurecli
149-
az bicep restore <bicep-file>
148+
```powershell
149+
bicep restore <bicep-file>
150150
```
151151

152152
The Bicep file you provide is the file you wish to deploy. It must contain a module that links to a registry. For example, you can restore the following file:
@@ -168,7 +168,7 @@ The local cache is found at:
168168

169169
## upgrade
170170

171-
The `upgrade` command updates your installed version with the latest version.
171+
The `upgrade` command updates your installed version with the latest version. This command is only available through Azure CLI.
172172

173173
```azurecli
174174
az bicep upgrade
@@ -185,7 +185,13 @@ az bicep version
185185
The command shows the version number.
186186

187187
```azurecli
188-
Bicep CLI version 0.4.1 (e2387595c9)
188+
Bicep CLI version 0.4.1008 (223b8d227a)
189+
```
190+
191+
To call this command directly through the Bicep CLI, use:
192+
193+
```powershell
194+
bicep --version
189195
```
190196

191197
If you haven't installed Bicep CLI, you see an error indicating Bicep CLI wasn't found.

0 commit comments

Comments
 (0)