Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
{
"name": "auth0",
"source": "./plugins/auth0",
"description": "Essential Auth0 skills including quickstarts, migration from other providers, and Multi-Factor Authentication (MFA).",
"description": "Essential Auth0 skills including quickstarts, CLI management, migration from other providers, and Multi-Factor Authentication (MFA).",
"version": "1.0.0",
"repository": "https://github.com/auth0/agent-skills.git",
"license": "Apache-2.0",
"author": {
"name": "Auth0",
"email": "support@auth0.com"
},
"keywords": ["auth0", "quickstart", "migration", "mfa", "security"],
"keywords": ["auth0", "quickstart", "cli", "migration", "mfa", "security"],
"category": "authentication"
},
{
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Essential skills for getting started and advanced security:
- `auth0-quickstart` - Framework detection and routing
- `auth0-migration` - Migrate from other auth providers
- `auth0-mfa` - Multi-Factor Authentication
- `auth0-cli` - Auth0 CLI management

```bash
/plugin install auth0@auth0-agent-skills
Expand Down Expand Up @@ -154,6 +155,7 @@ cp -r agent-skills/plugins/*/skills/* .claude/skills/
| [auth0-quickstart](./plugins/auth0/skills/auth0-quickstart/SKILL.md) | Framework detector and router | v1.0.0 |
| [auth0-migration](./plugins/auth0/skills/auth0-migration/SKILL.md) | Migrate from other auth providers | v1.0.0 |
| [auth0-mfa](./plugins/auth0/skills/auth0-mfa/SKILL.md) | Multi-Factor Authentication | v1.0.0 |
| [auth0-cli](./plugins/auth0/skills/auth0-cli/SKILL.md) | Auth0 CLI management | v1.0.0 |

### Frontend Framework Skills (auth0-sdks plugin)

Expand Down Expand Up @@ -283,6 +285,12 @@ auth0/agent-skills/
│ │ │ ├── cli.md
│ │ │ ├── concepts.md
│ │ │ └── environments.md
│ │ ├── auth0-cli/
│ │ │ ├── SKILL.md
│ │ │ └── references/
│ │ │ ├── commands.md
│ │ │ ├── workflows.md
│ │ │ └── advanced.md
│ │ ├── auth0-migration/
│ │ │ ├── SKILL.md
│ │ │ └── reference/
Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-angular/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ ng serve
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-express/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Visit `http://localhost:3000` and test the login flow.
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-fastify-api/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ curl http://localhost:3001/api/private \
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-fastify` - For server-rendered Fastify web apps with sessions
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-fastify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Visit `http://localhost:3000` and test the login flow.
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-nextjs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ Visit `http://localhost:3000` and test the login flow.
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-react-native/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ npx react-native run-android
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-react/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ npm start # CRA
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
1 change: 1 addition & 0 deletions plugins/auth0-sdks/skills/auth0-vue/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ npm run dev
- `auth0-quickstart` - Basic Auth0 setup
- `auth0-migration` - Migrate from another auth provider
- `auth0-mfa` - Add Multi-Factor Authentication
- `auth0-cli` - CLI commands for managing Auth0 resources

---

Expand Down
2 changes: 1 addition & 1 deletion plugins/auth0/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "auth0",
"version": "1.0.0",
"description": "Essential Auth0 skills including quickstarts, migration from other providers, and Multi-Factor Authentication (MFA).",
"description": "Essential Auth0 skills including quickstarts, CLI management, migration from other providers, and Multi-Factor Authentication (MFA)."
"author": {
"name": "Auth0",
"email": "support@auth0.com"
Expand Down
160 changes: 160 additions & 0 deletions plugins/auth0/skills/auth0-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
---
name: auth0-cli
description: Use when managing Auth0 resources from the command line - covers installation, authentication, and managing tenants, applications, APIs, users, roles, organizations, actions, logs, domains, email, and more via the auth0 CLI tool. Use this skill whenever the user wants to create, list, update, or delete Auth0 resources, automate Auth0 operations, debug authentication issues with logs, generate Terraform configs, or script Auth0 workflows in CI/CD pipelines.
---

# Auth0 CLI

Manage your Auth0 tenant resources from the command line.

---

## Overview

The Auth0 CLI (`auth0`) lets you create and manage applications, APIs, users, roles, organizations, actions, and other Auth0 resources directly from your terminal. It supports both interactive use for local development and non-interactive mode for CI/CD automation.

---

## Prerequisites

### Installation

**macOS/Linux (Homebrew):**
```bash
brew install auth0/auth0-cli/auth0
```

**macOS/Linux (curl):**
```bash
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh
```

**Windows (Scoop):**
```bash
scoop install auth0
```

**Windows (Chocolatey):**
```bash
choco install auth0-cli
```

**Verify installation:**
```bash
auth0 --version
```

---

## Authentication

Two authentication methods are available. Choose based on your environment:

| Method | Best For | Command |
|--------|----------|---------|
| **Device Authorization** | Local development, interactive use | `auth0 login` |
| **Client Credentials** | CI/CD, servers, non-interactive | `auth0 login --client-id <id> --client-secret <secret> --domain <tenant>.auth0.com` |

Device authorization opens your browser to complete login. Client credentials use a Machine-to-Machine application's credentials and require no browser.

```bash
# Interactive login (opens browser)
auth0 login

# Verify you're authenticated
auth0 tenants list

# Switch tenant
auth0 tenants use <tenant-name>
```

---

## Complementary Skills

This skill handles Auth0 resource management via CLI (creating apps, configuring URLs, managing users, etc.). Use it alongside these skills for a complete workflow:

- **`auth0-quickstart`** - Detects your framework and guides initial setup. Uses CLI commands to create and configure the Auth0 app.
- **`auth0-react`**, **`auth0-nextjs`**, **`auth0-express`**, etc. - SDK code integration. Pair with CLI commands to create and configure the Auth0 app your code connects to.
- **`auth0-migration`** - Bulk user migration from other auth providers
- **`auth0-mfa`** - Multi-Factor Authentication implementation in your application code

---

## Core Command Categories

| Category | Commands | Use Case | Reference |
|----------|----------|----------|-----------|
| **Tenants** | `login`, `logout`, `tenants list/use` | Authentication, switching tenants | [commands.md#authentication--tenants](references/commands.md#authentication--tenants) |
| **Applications** | `apps create/list/show/update/delete` | App registration and configuration | [commands.md#applications](references/commands.md#applications) |
| **APIs** | `apis create/list/show/update/delete` | Resource server management | [commands.md#apis](references/commands.md#apis) |
| **Users** | `users create/search/show/update/delete/import` | User account management | [commands.md#users](references/commands.md#users) |
| **Roles** | `roles create/list/show/update, permissions` | RBAC setup | [commands.md#roles--permissions](references/commands.md#roles--permissions) |
| **Organizations** | `orgs create/list/show, members, invitations` | Multi-tenant B2B management | [commands.md#organizations](references/commands.md#organizations) |
| **Actions** | `actions create/deploy/list/show/diff` | Custom authentication flows | [commands.md#actions](references/commands.md#actions) |
| **Logs** | `logs list/tail`, `logs streams` | Monitoring, debugging, audit | [commands.md#logs--monitoring](references/commands.md#logs--monitoring) |
| **Universal Login** | `universal-login show/update, prompts, templates` | Branding customization | [commands.md#universal-login](references/commands.md#universal-login) |
| **Testing** | `test login/token` | Validate auth flows | [commands.md#testing--debugging](references/commands.md#testing--debugging) |

For the complete command reference with all flags and examples, see [commands.md](references/commands.md).

---

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Using device flow in CI/CD | Use client credentials: `auth0 login --client-id <id> --client-secret <secret> --domain <domain>` |
| Confusing App ID vs Client ID | Use `auth0 apps list --json` to see both; `client_id` is what SDKs need |
| Forgetting callback URLs on app create | Always pass `--callbacks` with your app's redirect URI |
| Secrets visible in debug output | Avoid `--debug` in production scripts; use `--no-color` for clean log output |
| Command hangs waiting for input | Add `--no-input` for non-interactive/scripted usage |
| Wrong application type | SPAs need `--type spa`, server apps need `--type regular`, mobile needs `--type native` |
| Stale tenant context | Run `auth0 tenants list` and `auth0 tenants use <tenant>` to verify/switch |

---

## Security Considerations

- Use **device authorization** for local development, **client credentials** for CI/CD
- Store client credentials in environment variables or secret managers, never in code
- Use `--reveal-secrets` only when you need to retrieve credentials — output contains sensitive data
- Add `--no-input` to scripts to prevent interactive prompts from blocking pipelines
- Avoid `--debug` in production as it can expose tokens and secrets in logs
- When creating apps, set `--metadata "created_by=agent_skills"` for tracking

---

## Reference Documentation

### Complete Command Reference
All commands organized by category with flags and examples:
[commands.md](references/commands.md)

### Common Workflows
Step-by-step recipes for real-world scenarios:
[workflows.md](references/workflows.md)
- Set up a new application for development
- Debug authentication failures with log tailing
- Manage users in bulk (import, roles, blocks)
- Deploy Auth0 Actions to production
- Set up log streaming (Datadog, Splunk, etc.)
- CI/CD automation patterns

### Advanced Features
Deep-dive into complex features and troubleshooting:
[advanced.md](references/advanced.md)
- Terraform code generation
- Attack protection configuration
- Custom domains, email, and phone providers
- Event streams and token exchange
- Troubleshooting common errors

---

## References

- [Auth0 CLI Documentation](https://auth0.github.io/auth0-cli/)
- [Auth0 CLI GitHub](https://github.com/auth0/auth0-cli)
- [Auth0 Management API](https://auth0.com/docs/api/management/v2)
- [Auth0 Documentation](https://auth0.com/docs)
Loading
Loading