Build, manage and test your Auth0 integrations from the command line
MIT License
Build, manage and test your Auth0 integrations from the command line.
auth0 test login
.auth0 logs tail
command.Install via Homebrew:
brew tap auth0/auth0-cli && brew install auth0
Install via cURL:
./auth0
:curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .
sudo mv ./auth0 /usr/local/bin
[!TIP] On macOS, depending on the state of your current development environment you may have to first create the directory with
sudo mkdir -p /usr/local/bin
in order for the above command to work. Alternatively, you can move it to a directory of your choice and then add that directory to your $PATH instead.
Install via Scoop:
scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git
scoop install auth0
Install via Powershell:
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
$latestVersion = $latestRelease.tag_name
$version = $latestVersion -replace "^v"
Invoke-WebRequest -Uri "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
Expand-Archive ".\auth0.zip" .\
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")
Alternatively, follow the instructions in the Manual section below. Learn more about environment variables in Powershell
Install via Go:
# Make sure your $GOPATH/bin is exported on your $PATH
# to be able to run the binary from any directory.
go install github.com/auth0/auth0-cli/cmd/auth0@latest
Download the appropriate binary for your environment from the latest release
Extract the archive
$ tar -xf auth0-cli_{version}_Darwin_{architecture}.tar.gz
$ tar -xf auth0-cli_{version}_Linux_{architecture}.tar.gz
auth0-cli_{version}_Windows_{architecture}.zip
using your preferred method for working with compressed files.Make sure that the PATH
and HOME
environment variables include the folder where the binary was extracted.
macOS/Linux:
PATH
and HOME
are set correctly:export PATH=$PATH:/path/to/extracted/auth0/cli/folder
export HOME=/path/to/home/directory
Windows:
Run auth0
[!TIP] Autocompletion instructions for supported platforms available by running
auth0 completion -h
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:
Warning Authenticating as a user is not supported for private cloud tenants. Instead, those users should authenticate with client credentials.
To change the text editor used for editing templates, rules, and actions, set the environment variable EDITOR
to your
preferred editor. If choosing a non-terminal editor, ensure that the command starts the editor and waits for the files
to be closed before returning.
Examples:
# Uses vscode with the --wait flag.
export EDITOR="code --wait"
# Uses sublime text with the --wait flag.
export EDITOR="subl --wait"
# Uses nano, a terminal based editor.
export EDITOR="nano"
# Uses vim, a terminal based editor.
export EDITOR="vim"
Anonymized data points are collected during the use of this CLI. This data includes the CLI version, operating system, timestamp, and other technical details that do not personally identify you.
Auth0 uses this data to better understand the usage of this tool to prioritize the features, enhancements and fixes that matter most to our users.
To opt-out of this collection, set the AUTH0_CLI_ANALYTICS
environment variable to false
.
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
To provide feedback or report a bug, please raise an issue on our issue tracker.
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.