Skip to main content

Before you start

Set up an Auth0 Tenant.
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.
For complete CLI command reference and detailed usage information, read Auth0 CLI Reference Documentation.

Key Features

  • Interactive Management: 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

Use Cases

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.

Install Auth0 CLI

macOS

Configure with Homebrew:

Linux

Windows

Configure with Scoop:
Or download the latest release from the GitHub releases page.

Authenticate

To use the Auth0 CLI, you need to authenticate. When you run the following command, a browser window opens for you to log in to your Auth0 account:
To authenticate with a machine-to-machine application, use the following command:

Common Commands

Manage Applications

Manage APIs

Manage Users

Manage Tenant Settings

Using in Scripts

The Auth0 CLI supports JSON output for easy parsing in scripts:

Use with AI agents

Agent Mode makes the CLI safe for an AI coding agent to drive without a human watching every step. Enable it with the --agent-mode flag or the AUTH0_AGENT_MODE environment variable:
Agent Mode turns on structured JSON output, disables interactive prompts and color, and guarantees a non-zero exit code on any failure. You don’t have to set it explicitly in most cases — the CLI detects when it isn’t talking to an interactive terminal (for example, when run by Claude Code, Cursor, or a CI job) and applies the same behavior automatically. Agent Mode defaults to indented JSON output. For high-volume or token-sensitive workflows, pass --json-compact to get the same data without the extra whitespace:
Streaming commands, such as auth0 logs tail, always use the compact form in Agent Mode.

Discover the command surface

An agent can map the entire CLI in a single call instead of working through --help one level at a time:
Add --detailed to include flags, arguments, defaults, and whether authentication is required for each command — enough to construct a valid call without opening a --help page.

Check a payload shape before sending it

--schema prints the exact request payload a command expects, sourced from the OpenAPI spec:
--data sends the whole payload as one JSON object — inline, from a file, or piped through stdin — and validates it locally before the request reaches the API:

Structured errors

Every failure in Agent Mode returns a JSON error envelope instead of a plain-text message:
code is a stable, machine-readable failure class (usage, auth, validation, not_found, rate_limit, and others). reason adds finer detail, and details carries field-level information when a payload fails validation — an agent can branch on these values instead of parsing a sentence.

Search documentation from the terminal

auth0 docs search queries Auth0’s public documentation without leaving the terminal and without requiring authentication:
In Agent Mode, results include raw-markdown URLs an agent can fetch directly.

Documentation and Support

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

Next Steps

Deploy CLI

Learn about managing tenant configuration with the Deploy CLI

Terraform Provider

Explore infrastructure-as-code with Terraform

Management API

Access the Auth0 Management API directly