Skip to main content
For complete CLI command reference and detailed usage information, see the Auth0 CLI Reference Documentation.

Before you start

Set up an Auth0 Tenant.
The Auth0 CLI is a command-line tool that provides direct access to the Auth0 Management API, enabling you to manage your Auth0 tenant from your terminal. It’s designed for interactive use during development and can be integrated into scripts for automation.

Key Features

  • Interactive Management: Quickly create, update, and manage Auth0 resources from the command line
  • Authentication Support: Multiple authentication methods including user login and machine-to-machine credentials
  • Resource Management: Full CRUD operations for applications, APIs, connections, users, and more
  • Cross-Platform: Available for macOS, Linux, and Windows
  • JSON Output: Machine-readable output for scripting and automation

Installation

macOS

Using Homebrew:
brew tap auth0/auth0-cli
brew install auth0

Linux

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

Windows

Using Scoop:
scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git
scoop install auth0
Or download the latest release from the GitHub releases page.

Authentication

Before using the Auth0 CLI, you need to authenticate:
auth0 login
This will open a browser window for you to log in to your Auth0 account. You can also authenticate using a machine-to-machine application:
auth0 login --domain <your-domain> --client-id <client-id> --client-secret <client-secret>

Common Commands

Manage Applications

# List all applications
auth0 apps list

# Create a new application
auth0 apps create --name "My App" --type spa

# Show application details
auth0 apps show <app-id>

# Update an application
auth0 apps update <app-id> --callbacks "http://localhost:3000/callback"

# Delete an application
auth0 apps delete <app-id>

Manage APIs

# List all APIs
auth0 apis list

# Create a new API
auth0 apis create --name "My API" --identifier "https://my-api.example.com"

# Show API details
auth0 apis show <api-id>

Manage Users

# List users
auth0 users list

# Create a user
auth0 users create --email "user@example.com" --connection "Username-Password-Authentication"

# Show user details
auth0 users show <user-id>

# Update a user
auth0 users update <user-id> --email "newemail@example.com"

Manage Tenant Settings

# Show current tenant
auth0 tenants list

# Update tenant settings
auth0 tenants update

Using in Scripts

The Auth0 CLI supports JSON output for easy parsing in scripts:
# Get application details as JSON
auth0 apps show <app-id> --json

# Create an app and capture the output
auth0 apps create --name "My App" --type spa --json > app-details.json

Use Cases

The Auth0 CLI is ideal for:
  • Development Workflows: Quickly set up and configure Auth0 resources during development
  • Testing: Create test applications and users for automated testing
  • Debugging: Inspect and modify Auth0 configuration in real-time
  • Scripting: Automate repetitive tasks with shell scripts
  • CI/CD Integration: Integrate Auth0 configuration into your deployment pipelines

Comparison with Other Tools

Auth0 CLI vs Deploy CLI

  • Auth0 CLI: Interactive, command-by-command resource management. Best for development and ad-hoc tasks.
  • Deploy CLI: Declarative, configuration-file-based tenant management. Best for managing entire tenant configurations across environments.

Auth0 CLI vs Terraform Provider

  • Auth0 CLI: Imperative commands for immediate changes. No state management.
  • Terraform Provider: Declarative infrastructure-as-code with state tracking. Best for production infrastructure management.

Documentation and Support

For complete documentation, command reference, and examples, visit:

Next Steps