Install the Data API builder command-line interface

In this guide, you go through the steps to install the Data API builder (DAB) command-line interface (CLI) on your local machine. You can then use the CLI to perform the most common actions with DAB. The CLI is distributed as a .NET tool.

Prerequisites

  • .NET 6

Install the CLI

Install the Microsoft.DataApiBuilder package from NuGet as a .NET tool.

  1. Use dotnet tool install to install the latest version of the Microsoft.DataApiBuilder with the --global argument.

    dotnet tool install --global Microsoft.DataApiBuilder
    

    Note

    If the package is already installed, you will update the package instead using dotnet tool update.

    dotnet tool update --global Microsoft.DataApiBuilder
    
  2. Verify that the tool is installed with dotnet tool list using the --global argument.

    dotnet tool list --global
    

Verify that the CLI is installed

Installing the .NET tool makes the dab command available on your local machine.

  1. Use the --version argument to determine the version of your current installation.

    dab --version
    

    Important

    If you are running on Linux or macOS, you could see an error when invoking dab directly. To resolve this error, add the .NET global tools to your PATH. For more information, see troubleshooting Data API builder installation.

  2. Observe the output of the previous command. Assuming the current version of the DAB CLI is 1.0.0, the command would output would include the following content.

    Microsoft.DataApiBuilder 1.0.0