Visitar URL original
Auth0 CLI | Build, manage and test your Auth0 integrations from the command line. Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Build, manage and test your Auth0 integrations from the command line.

Installation

macOS

Install via Homebrew:

brew tap auth0/auth0-cli && brew install auth0

Windows

Install via Scoop:

scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git && scoop install auth0

Install via Powershell

#fetch latest release information
$apiUrl = "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
$latestRelease = Invoke-RestMethod -Uri $apiUrl
$latestVersion = $latestRelease.tag_name
$version = $latestVersion -replace "^v"
# Download the binary to the current folder
Invoke-WebRequest "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
Expand-Archive ".\auth0.zip" .\
# To be able to run the binary from any directory, make sure you add it to your '$PATH'
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")

Linux

Install via cURL:

curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .

Go

Install via Go:

go install github.com/auth0/auth0-cli/cmd/auth0@latest

Manual

  1. Download the appropriate binary for your environment from the latest release
  2. Extract the archive
  3. Run ./auth0

Autocompletion instructions for supported platforms available by running auth0 completion -h

Authenticating to Your Tenant

Authenticating to your Auth0 tenant is required for most functions of the CLI. It can be initiated by running:

auth0 login

There are two ways to authenticate:

  • As a user - Recommended when invoking on a personal machine or other interactive environment. Facilitated by device authorization flow.
  • As a machine - Recommended when running on a server or non-interactive environments (ex: CI). Facilitated by client credentials flow. Flags available for bypassing interactive shell.

Authenticating as a user is not supported for private cloud tenants. Instead, those users should authenticate with client credentials.

Discovering and Scripting Commands

Run auth0 commands to see every command in a tree, or auth0 commands --flat for a flat list that is easy to scan. Add --json (optionally with --detailed) for a machine-readable representation.

The help for any command can also be emitted as JSON by combining --help with --json, for example auth0 apps create --help --json. Setting the AUTH0_AGENT_MODE=1 environment variable makes help emit JSON without needing to pass --json, which is convenient for scripts and AI agents.

Available Commands