Install and Configure the Deploy CLI Tool

Install and Configure the Deploy CLI Tool

This guide will show you how to install and configure the Deploy CLI tool. To do this, you must:

  1. Install the Deploy CLI Tool

  2. Create the Deploy CLI Application

  3. Configure the Deploy CLI Tool

  4. Run the Deploy CLI Tool

You can also upgrade from a previous version of the tool. The auth0-deploy-cli tool was completely rewritten from version 1 to version 2 or later, which means that it is not backwards compatible. Please consider the following when upgrading:

  • The directory structure and format has changed to allow for additional object types.

  • The command line parameters have changed to allow for additional options, such as export.

Install the Deploy CLI Tool

To install the Deploy CLI Tool, use your operating system's command-line interface to run:

npm i -g auth0-deploy-cli

Was this helpful?

/

Create the Deploy CLI Application

The Deploy CLI tool must be authorized to call the Management API. To fulfill this requirement, you must configure your tenant by creating and configuring an application named auth0-deploy-cli and authorizing it for use with the Management API. In the next step, you will use the Client ID and Secret from this application to configure the Deploy CLI Tool.

For complete instructions, see Create and Configure the Deploy CLI Application.

Configure the Deploy CLI Tool

To configure the Deploy CLI tool to use the Deploy CLI application, create a config.json file, including the Client ID and Client Secret from the auth0-deploy-cli application. You can find this application at Auth0 Dashboard > Applications.

{
  "AUTH0_DOMAIN": "{yourDomain}",
  "AUTH0_CLIENT_ID": "{yourClientId}",
  "AUTH0_CLIENT_SECRET": "{yourClientSecret}",
  "AUTH0_KEYWORD_REPLACE_MAPPINGS": { 
    "AUTH0_TENANT_NAME": "{yourTenant}" 
  },
  "AUTH0_ALLOW_DELETE": false,
  "AUTH0_EXCLUDED": []
}

Was this helpful?

/

Run the Deploy CLI Tool

To run the Deploy CLI Tool, use your operating system's command-line interface to run:

a0deploy export --config_file config.json --format yaml --output_folder <your repo directory>

Was this helpful?

/

Learn more