KosmoKrator

productivity

Auth0 CLI for AI Agents

Use the Auth0 CLI from KosmoKrator to call Auth0 tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Auth0 CLI Setup

Auth0 can be configured headlessly with `kosmokrator integrations:configure auth-zero`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure auth-zero --set access_token="$AUTH_ZERO_ACCESS_TOKEN" --set domain="$AUTH_ZERO_DOMAIN" --enable --read allow --write ask --json
kosmokrator integrations:doctor auth-zero --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token AUTH_ZERO_ACCESS_TOKEN Secret secret yes Access Token
domain AUTH_ZERO_DOMAIN Text text yes Tenant Domain

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call auth-zero.auth_zero_list_users '{"page":1,"per_page":1,"q":"example_q","sort":"example_sort"}' --json
Provider shortcut
kosmo integrations:auth-zero auth_zero_list_users '{"page":1,"per_page":1,"q":"example_q","sort":"example_sort"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs auth-zero --json
kosmo integrations:docs auth-zero.auth_zero_list_users --json
kosmo integrations:schema auth-zero.auth_zero_list_users --json
kosmo integrations:search "Auth0" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

auth-zero.auth_zero_list_users

List users in the Auth0 tenant. Supports search with Lucene syntax, pagination, and sorting.

Read read
Parameters
page, per_page, q, sort
Generic call
kosmo integrations:call auth-zero.auth_zero_list_users '{"page":1,"per_page":1,"q":"example_q","sort":"example_sort"}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_list_users '{"page":1,"per_page":1,"q":"example_q","sort":"example_sort"}' --json

auth-zero.auth_zero_get_user

Retrieve a single Auth0 user by their user ID (e.g. "auth0|abc123").

Read read
Parameters
id
Generic call
kosmo integrations:call auth-zero.auth_zero_get_user '{"id":"example_id"}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_get_user '{"id":"example_id"}' --json

auth-zero.auth_zero_create_user

Create a new user in Auth0. Requires email, password, and the connection name (database connection).

Write write
Parameters
email, password, connection, name
Generic call
kosmo integrations:call auth-zero.auth_zero_create_user '{"email":"example_email","password":"example_password","connection":"example_connection","name":"example_name"}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_create_user '{"email":"example_email","password":"example_password","connection":"example_connection","name":"example_name"}' --json

auth-zero.auth_zero_list_connections

List identity connections configured in the Auth0 tenant. Optionally filter by strategy (e.g. "auth0", "google-oauth2").

Read read
Parameters
strategy
Generic call
kosmo integrations:call auth-zero.auth_zero_list_connections '{"strategy":"example_strategy"}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_list_connections '{"strategy":"example_strategy"}' --json

auth-zero.auth_zero_list_roles

List roles defined in the Auth0 tenant with optional pagination.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call auth-zero.auth_zero_list_roles '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_list_roles '{"page":1,"per_page":1}' --json

auth-zero.auth_zero_get_tenant_settings

Retrieve the Auth0 tenant settings (session lifetime, idle timeout, default directory, etc.).

Read read
Parameters
none
Generic call
kosmo integrations:call auth-zero.auth_zero_get_tenant_settings '{}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_get_tenant_settings '{}' --json

auth-zero.auth_zero_get_current_user

Run a lightweight Auth0 Management API health check by retrieving tenant settings.

Read read
Parameters
none
Generic call
kosmo integrations:call auth-zero.auth_zero_get_current_user '{}' --json
Shortcut
kosmo integrations:auth-zero auth_zero_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

auth-zero.auth_zero_list_users 4 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_list_users --json
ParameterTypeRequiredDescription
page integer no Page index (zero-based). Default: 0.
per_page integer no Number of results per page. Default: 50, max: 100.
q string no Lucene search query (e.g. "email:*@example.com").
sort string no Field to sort by, with optional direction (e.g. "created_at:-1" or "name:1").
auth-zero.auth_zero_get_user 1 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_get_user --json
ParameterTypeRequiredDescription
id string yes The Auth0 user identifier (e.g. "auth0|abc123", "google-oauth2|xyz").
auth-zero.auth_zero_create_user 4 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_create_user --json
ParameterTypeRequiredDescription
email string yes Email address for the new user.
password string yes Password for the new user (must meet connection requirements).
connection string yes The database connection name to create the user in (e.g. "Username-Password-Authentication").
name string no Full name of the user.
auth-zero.auth_zero_list_connections 1 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_list_connections --json
ParameterTypeRequiredDescription
strategy string no Filter by connection strategy (e.g. "auth0", "google-oauth2", "samlp", "oidc").
auth-zero.auth_zero_list_roles 2 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_list_roles --json
ParameterTypeRequiredDescription
page integer no Page index (zero-based). Default: 0.
per_page integer no Number of results per page. Default: 50.
auth-zero.auth_zero_get_tenant_settings 0 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_get_tenant_settings --json
ParameterTypeRequiredDescription
No parameters.
auth-zero.auth_zero_get_current_user 0 parameters
Schema command
kosmo integrations:schema auth-zero.auth_zero_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.