| title | Manage wikis via CLI |
|---|---|
| titleSuffix | Azure DevOps |
| description | Manage wikis with the command-line interface (CLI) in Azure DevOps. |
| ms.subservice | azure-devops-wiki |
| ms.custom | wiki, devx-track-azurecli |
| ms.topic | how-to |
| ms.assetid | |
| ms.author | chcomley |
| author | chcomley |
| ms.reviewer | sancha |
| ms.date | 02/18/2026 |
| ai-usage | ai-assisted |
| monikerRange | azure-devops |
[!INCLUDE version-eq-azure-devops]
You can use the Azure DevOps CLI to create, list, show, and delete wikis, as well as create wiki pages. The CLI is useful for automating wiki management tasks or integrating wiki operations into scripts and pipelines.
Note
You can't delete project wikis with the CLI.
[!INCLUDE wiki-prerequisites]
| Commands | Description |
|---|---|
| az devops wiki create | Create a wiki. |
| az devops wiki delete | Delete a wiki. |
| az devops wiki list | List all the wikis in a project or an organization. |
| az devops wiki page | Manage wiki pages. |
| az devops wiki page create | Add a new page. |
| az devops wiki page delete | Delete a page. |
| az devops wiki page show | Get the content of a page or open a page. |
| az devops wiki page update | Edit a page. |
| az devops wiki show | Show the details of a wiki. |
Enter the az devops wiki create command to create a wiki.
[!div class="tabbedCodeSnippets"]
az devops wiki create [--mapped-path]
[--name]
[--project]
[--repository]
[--subscription]
[--type {codewiki, projectwiki}]
- --mapped-path: [Required for
codewikitype] Mapped path of the new wiki, for example,/to publish from root of repository. - --name: Name of the new wiki.
- --project -p: Optional. Name or ID of the project. Configure the default project by using
az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config. - --repository -r: [Required for
codewikitype] Name or ID of the repository to publish the wiki from. - --subscription: Optional. Name or ID of subscription. Configure the default subscription by using
az account set -s NAME_OR_ID. - --type --wiki-type: Type of wiki to create. Accepted values:
codewiki,projectwiki. Default value:projectwiki.
Create a named project wiki.
[!div class="tabbedCodeSnippets"]
az devops wiki create --name myprojectwiki
Create a code wiki from a folder in a code repository.
[!div class="tabbedCodeSnippets"]
az devops wiki create --name WIKI_NAME --type codewiki
--repository REPO_NAME --mapped-path PATH_TO_PUBLISH
To delete a wiki, enter the az devops wiki delete command.
Note
You can use this command only to delete a code wiki, not a project wiki.
[!div class="tabbedCodeSnippets"]
az devops wiki delete
[--wiki]
[--project]
[--subscription]
[--yes]
- --wiki: Required. Name or ID of the wiki to delete.
- --project -p: Optional. Name or ID of the project. You can configure the default project by using
az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config. - --subscription: Optional. Name or ID of subscription. You can configure the default subscription by using
az account set -s NAME_OR_ID. - --yes -y: Optional. Don't prompt for confirmation.
Delete a wiki without a prompt for confirmation.
[!div class="tabbedCodeSnippets"]
az devops wiki delete --wiki myprojectwiki --yes
To list all the wikis in a project or an organization, enter the az devops wiki list command.
[!div class="tabbedCodeSnippets"]
az devops wiki list
[--project]
[--scope {organization, project}]
[--subscription]
- --project -p: Optional. Name or ID of the project.
- --scope: Optional. List the wikis at project or organization level. Accepted values:
organization,project. Default value:project. - --subscription: Optional. Name or ID of subscription. You can configure the default subscription by using
az account set -s NAME_OR_ID.
List all wikis for a project.
[!div class="tabbedCodeSnippets"]
az devops wiki list
List all wikis in the organization.
[!div class="tabbedCodeSnippets"]
az devops wiki list --scope organization
To show details of a wiki, enter the az devops wiki show command.
[!div class="tabbedCodeSnippets"]
az devops wiki show --wiki
[--open]
[--project]
[--subscription]
- --wiki: Required. Name or ID of the wiki.
- --open: Optional. Open the wiki page in your web browser.
- --project -p: Optional. Name or ID of the project.
- --subscription: Optional. Name or ID of subscription. Configure the default subscription by using
az account set -s NAME_OR_ID.
Show the wiki named myprojectwiki and open the wiki page in your web browser.
[!div class="tabbedCodeSnippets"]
az devops wiki show --wiki myprojectwiki --open
To add a new wiki page, enter the az devops wiki page create command.
[!div class="tabbedCodeSnippets"]
az devops wiki page create --path
--wiki
[--comment]
[--content]
[--encoding {ascii, utf-16be, utf-16le, utf-8}]
[--file-path]
[--project]
[--subscription]
- --path: Required. Path of the wiki page.
- --wiki: Required. Name or ID of the wiki.
- --comment: Optional. Comment in the commit message for the file add operation. Default value:
added a new page using Azure DevOps CLI. - --content: Optional. Content of the wiki page. Ignored if
--file-pathis specified. - --encoding: Optional. Encoding of the file. Used with
--file-pathparameter. - --file-path: Optional. Path of the file input if content is specified in the file.
- --project -p: Optional. Name or ID of the project.
- --subscription: Name or ID of subscription. You can configure the default subscription by using
az account set -s NAME_OR_ID.
Create a new page with the path my page in a wiki named myprojectwiki by using inline content.
[!div class="tabbedCodeSnippets"]
az devops wiki page create --path 'my page' --wiki myprojectwiki --content "Hello World"
Create a new page with the path my page in a wiki named myprojectwiki by using content from a file.
[!div class="tabbedCodeSnippets"]
az devops wiki page create --path 'my page' --wiki myprojectwiki --file-path a.txt --encoding utf-8