Auth0 CLI
$ auth0 官方出品 高风险Auth0 CLI(auth0)支持在终端中查询与管理租户、应用、API、Actions 与日志。全局一致的 --json、--no-input 和 --no-color 参数使其非常适合自动化 Agent,但租户变更涉及较高身份安全风险。
brew install auth0/auth0-cli/auth0 Auth0 CLI 以单个确定性 Go 二进制提供了完整管理 API 覆盖、本地 auth0 test token 签发与 Action 调试能力。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
跨命令一致支持 --json、--no-input 与 --no-color,Agent 自动化稳定且无交互阻塞。
- Global
--json,--no-input,--no-colorflags - Structured Cobra command hierarchy
支持 M2M 客户端凭据做无头权限隔离,但写入操作直接修改 IAM 状态且无 --dry-run。
- Separate tenant profiles via
auth0 tenants use - Write commands mutate IAM state immediately without dry-run
单 Go 二进制可通过 Homebrew Tap、go install、Docker 与 GitHub Releases 安装。
- Official Homebrew tap and cross-platform binaries
在查询应用、API、Actions、日志与签发测试令牌方面效率极高。
- Includes
auth0 test tokenandauth0 logs tailutilities
由 Auth0 官方仓库(auth0/auth0-cli)以 MIT 协议持续维护。
- Official Auth0 GitHub organization
拥有独立的 GitHub Pages 官方参考站点与详尽的 --help 示例。
- Official docs at auth0.github.io/auth0-cli
安全边界、鉴权与放权指南
将租户刷新令牌保存在 ~/.config/auth0/config.json,也支持通过 AUTH0_DOMAIN、AUTH0_CLIENT_ID 与 AUTH0_CLIENT_SECRET 进行无头 M2M 认证。
CLI 开源免费(MIT);Auth0 为测试租户提供免费开发者套餐。
# Auth0 CLI Agent Rules - Verify `auth0 tenants list` points to a dev/staging tenant before running any write command. - Always pass `--json --no-input` to prevent interactive prompts or ANSI clutter. - Require explicit human approval before modifying production tenants, deleting clients, or revealing client secrets.
Agent 高频安全命令配方
只读查询(安全推荐)
auth0 tenants list --json --no-input
以 JSON 输出本地已配置的所有 Auth0 租户与当前激活租户。
auth0 apps list --json --no-input --no-color
在无交互模式下只读查询应用 Client ID 与类型。
受控写入与预演
auth0 apis create --name "Staging API" --identifier https://staging.example.com --json --no-input
在测试租户中非交互式创建一个新的 API Audience 并返回 JSON。
核心优势
- + 基于 Cobra 构建,全局
--json、--no-input与--no-color一致性强。 - + 通过
AUTH0_DOMAIN、AUTH0_CLIENT_ID与AUTH0_CLIENT_SECRET支持无头 M2M 认证。 - + 内置
auth0 test token可快速辅助本地接口鉴权测试。
注意事项与踩坑点
- ! 虽然
auth0 apps list --json仅返回非敏感元数据,但仍需在 Agent 规则中禁止使用--reveal-secrets,防止密钥泄露进日志。 - !
create与update等变更命令不支持--dry-run预演。