From dea640d0ff1ae0839d5ae0f1d93f236c87c46c96 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:50:31 +0100 Subject: [PATCH] DXCDT-271: Fix generated docs (#563) * Rename build_doc to doc-gen * Downgrade json flag from persistent to local * Update doc pages --- Makefile | 2 +- cmd/{build_doc => doc-gen}/main.go | 7 ++- docs/auth0_actions.md | 1 - docs/auth0_actions_create.md | 2 +- docs/auth0_actions_delete.md | 1 - docs/auth0_actions_deploy.md | 2 +- docs/auth0_actions_list.md | 2 +- docs/auth0_actions_open.md | 1 - docs/auth0_actions_show.md | 2 +- docs/auth0_actions_update.md | 2 +- docs/auth0_api.md | 1 - docs/auth0_apis.md | 1 - docs/auth0_apis_create.md | 2 +- docs/auth0_apis_delete.md | 1 - docs/auth0_apis_list.md | 2 +- docs/auth0_apis_open.md | 1 - docs/auth0_apis_scopes.md | 1 - docs/auth0_apis_scopes_list.md | 2 +- docs/auth0_apis_show.md | 2 +- docs/auth0_apis_update.md | 2 +- docs/auth0_apps.md | 1 - docs/auth0_apps_create.md | 2 +- docs/auth0_apps_delete.md | 1 - docs/auth0_apps_list.md | 2 +- docs/auth0_apps_open.md | 1 - docs/auth0_apps_show.md | 2 +- docs/auth0_apps_update.md | 2 +- docs/auth0_apps_use.md | 1 - docs/auth0_completion.md | 1 - docs/auth0_domains.md | 1 - docs/auth0_domains_create.md | 2 +- docs/auth0_domains_delete.md | 1 - docs/auth0_domains_list.md | 2 +- docs/auth0_domains_show.md | 2 +- docs/auth0_domains_update.md | 2 +- docs/auth0_domains_verify.md | 2 +- docs/auth0_email.md | 1 - docs/auth0_email_templates.md | 1 - docs/auth0_email_templates_show.md | 2 +- docs/auth0_email_templates_update.md | 2 +- docs/auth0_ips.md | 1 - docs/auth0_ips_check.md | 1 - docs/auth0_ips_unblock.md | 1 - docs/auth0_login.md | 1 - docs/auth0_logout.md | 1 - docs/auth0_logs.md | 1 - docs/auth0_logs_list.md | 2 +- docs/auth0_logs_streams.md | 1 - docs/auth0_logs_streams_create.md | 2 +- docs/auth0_logs_streams_delete.md | 1 - docs/auth0_logs_streams_list.md | 2 +- docs/auth0_logs_streams_open.md | 1 - docs/auth0_logs_streams_show.md | 2 +- docs/auth0_logs_streams_update.md | 2 +- docs/auth0_logs_tail.md | 2 +- docs/auth0_orgs.md | 1 - docs/auth0_orgs_create.md | 2 +- docs/auth0_orgs_delete.md | 1 - docs/auth0_orgs_list.md | 2 +- docs/auth0_orgs_members.md | 1 - docs/auth0_orgs_members_list.md | 2 +- docs/auth0_orgs_open.md | 1 - docs/auth0_orgs_roles.md | 1 - docs/auth0_orgs_roles_list.md | 2 +- docs/auth0_orgs_roles_members.md | 1 - docs/auth0_orgs_roles_members_list.md | 2 +- docs/auth0_orgs_show.md | 2 +- docs/auth0_orgs_update.md | 2 +- docs/auth0_protection.md | 1 - ..._protection_breached-password-detection.md | 1 - ...ection_breached-password-detection_show.md | 2 +- ...tion_breached-password-detection_update.md | 2 +- ...auth0_protection_brute-force-protection.md | 1 - ..._protection_brute-force-protection_show.md | 2 +- ...rotection_brute-force-protection_update.md | 2 +- ...th0_protection_suspicious-ip-throttling.md | 1 - ...rotection_suspicious-ip-throttling_show.md | 2 +- ...tection_suspicious-ip-throttling_update.md | 2 +- docs/auth0_quickstarts.md | 1 - docs/auth0_quickstarts_download.md | 1 - docs/auth0_quickstarts_list.md | 2 +- docs/auth0_roles.md | 1 - docs/auth0_roles_create.md | 2 +- docs/auth0_roles_delete.md | 1 - docs/auth0_roles_list.md | 2 +- docs/auth0_roles_permissions.md | 1 - docs/auth0_roles_permissions_add.md | 1 - docs/auth0_roles_permissions_list.md | 2 +- docs/auth0_roles_permissions_remove.md | 1 - docs/auth0_roles_show.md | 2 +- docs/auth0_roles_update.md | 2 +- docs/auth0_rules.md | 1 - docs/auth0_rules_create.md | 2 +- docs/auth0_rules_delete.md | 1 - docs/auth0_rules_disable.md | 2 +- docs/auth0_rules_enable.md | 2 +- docs/auth0_rules_list.md | 2 +- docs/auth0_rules_show.md | 2 +- docs/auth0_rules_update.md | 2 +- docs/auth0_tenants.md | 1 - docs/auth0_tenants_list.md | 1 - docs/auth0_tenants_open.md | 1 - docs/auth0_tenants_use.md | 1 - docs/auth0_test.md | 1 - docs/auth0_test_login.md | 2 +- docs/auth0_test_token.md | 2 +- docs/auth0_universal-login.md | 1 - docs/auth0_universal-login_prompts.md | 1 - docs/auth0_universal-login_prompts_show.md | 1 - docs/auth0_universal-login_prompts_update.md | 1 - docs/auth0_universal-login_show.md | 2 +- docs/auth0_universal-login_templates.md | 1 - docs/auth0_universal-login_templates_show.md | 2 +- .../auth0_universal-login_templates_update.md | 1 - docs/auth0_universal-login_update.md | 2 +- docs/auth0_users.md | 1 - docs/auth0_users_blocks.md | 1 - docs/auth0_users_blocks_list.md | 2 +- docs/auth0_users_create.md | 2 +- docs/auth0_users_delete.md | 1 - docs/auth0_users_import.md | 1 - docs/auth0_users_open.md | 1 - docs/auth0_users_search.md | 2 +- docs/auth0_users_show.md | 2 +- docs/auth0_users_unblock.md | 1 - docs/auth0_users_update.md | 2 +- docs/index.md | 1 - internal/cli/actions.go | 22 +++---- internal/cli/actions_embed.go | 2 +- internal/cli/api.go | 5 -- internal/cli/apis.go | 20 +++---- internal/cli/apps.go | 24 +++----- ..._protection_breached_password_detection.go | 8 ++- ...ttack_protection_brute_force_protection.go | 8 ++- ...ack_protection_suspicious_ip_throttling.go | 8 ++- internal/cli/build_doc.go | 55 ------------------ internal/cli/custom_domains.go | 15 +++-- internal/cli/doc-gen.go | 57 +++++++++++++++++++ internal/cli/email_templates.go | 4 ++ internal/cli/log_streams.go | 18 +++--- internal/cli/login.go | 1 - internal/cli/logout.go | 1 - internal/cli/logs.go | 6 ++ internal/cli/organizations.go | 32 +++++++---- internal/cli/quickstarts.go | 2 + internal/cli/roles.go | 13 +++-- internal/cli/roles_permissions.go | 4 ++ internal/cli/root.go | 7 +-- internal/cli/rules.go | 17 ++++-- internal/cli/tenants.go | 10 ---- internal/cli/test.go | 2 + internal/cli/universal_login.go | 8 ++- internal/cli/users.go | 25 ++++---- 153 files changed, 273 insertions(+), 297 deletions(-) rename cmd/{build_doc => doc-gen}/main.go (56%) delete mode 100644 internal/cli/build_doc.go create mode 100644 internal/cli/doc-gen.go diff --git a/Makefile b/Makefile index 827be27e8..8642502a4 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ $(GO_BIN)/auth0: .PHONY: docs docs-start docs-clean docs: docs-clean ## Build the documentation - @go run ./cmd/build_doc + @go run ./cmd/doc-gen @mv ./docs/auth0.md ./docs/index.md docs-start: ## Start the doc site locally for testing purposes diff --git a/cmd/build_doc/main.go b/cmd/doc-gen/main.go similarity index 56% rename from cmd/build_doc/main.go rename to cmd/doc-gen/main.go index 564ecb716..60e6fa778 100644 --- a/cmd/build_doc/main.go +++ b/cmd/doc-gen/main.go @@ -1,12 +1,13 @@ package main import ( + "log" + "github.com/auth0/auth0-cli/internal/cli" ) func main() { - err := cli.BuildDoc() - if err != nil { - panic(err) + if err := cli.GenerateDocs(); err != nil { + log.Fatal(err) } } diff --git a/docs/auth0_actions.md b/docs/auth0_actions.md index cc9c39393..4a071dc39 100644 --- a/docs/auth0_actions.md +++ b/docs/auth0_actions.md @@ -19,7 +19,6 @@ Manage resources for actions. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_create.md b/docs/auth0_actions_create.md index 1550d2a75..dbadd7c38 100644 --- a/docs/auth0_actions_create.md +++ b/docs/auth0_actions_create.md @@ -29,6 +29,7 @@ auth0 actions create -n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=val -c, --code string Code content for the action. -d, --dependency stringToString Third party npm module, and it version, that the action depends on. (default []) -h, --help help for create + --json Output in json format. -n, --name string Name of the action. -s, --secret stringToString Secret to be used in the action. (default []) -t, --trigger string Trigger of the action. At this time, an action can only target a single trigger at a time. @@ -38,7 +39,6 @@ auth0 actions create -n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=val ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_delete.md b/docs/auth0_actions_delete.md index 59c3a3419..775cd57d8 100644 --- a/docs/auth0_actions_delete.md +++ b/docs/auth0_actions_delete.md @@ -31,7 +31,6 @@ auth0 actions delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_deploy.md b/docs/auth0_actions_deploy.md index dd354cb4c..c406097da 100644 --- a/docs/auth0_actions_deploy.md +++ b/docs/auth0_actions_deploy.md @@ -24,13 +24,13 @@ auth0 actions deploy ``` -h, --help help for deploy + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_list.md b/docs/auth0_actions_list.md index 3e7084126..7e272c8bc 100644 --- a/docs/auth0_actions_list.md +++ b/docs/auth0_actions_list.md @@ -25,13 +25,13 @@ auth0 actions ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_open.md b/docs/auth0_actions_open.md index c242090d5..d857d955a 100644 --- a/docs/auth0_actions_open.md +++ b/docs/auth0_actions_open.md @@ -29,7 +29,6 @@ auth0 actions open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_show.md b/docs/auth0_actions_show.md index 0092e54bc..55bcc2bd9 100644 --- a/docs/auth0_actions_show.md +++ b/docs/auth0_actions_show.md @@ -24,13 +24,13 @@ auth0 actions show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_actions_update.md b/docs/auth0_actions_update.md index d7272963c..eecd6d0f4 100644 --- a/docs/auth0_actions_update.md +++ b/docs/auth0_actions_update.md @@ -29,6 +29,7 @@ auth0 actions update -n myaction -t post-login -d "lodash=4.0.0" -s "API_KE -c, --code string Code content for the action. -d, --dependency stringToString Third party npm module, and it version, that the action depends on. (default []) -h, --help help for update + --json Output in json format. -n, --name string Name of the action. -s, --secret stringToString Secret to be used in the action. (default []) -t, --trigger string Trigger of the action. At this time, an action can only target a single trigger at a time. @@ -38,7 +39,6 @@ auth0 actions update -n myaction -t post-login -d "lodash=4.0.0" -s "API_KE ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_api.md b/docs/auth0_api.md index d8b1fe70a..056eede0f 100644 --- a/docs/auth0_api.md +++ b/docs/auth0_api.md @@ -43,7 +43,6 @@ cat data.json | auth0 api post clients ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis.md b/docs/auth0_apis.md index 73ba67ffc..704c3f7de 100644 --- a/docs/auth0_apis.md +++ b/docs/auth0_apis.md @@ -19,7 +19,6 @@ Manage resources for APIs. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_create.md b/docs/auth0_apis_create.md index 029f4ea62..8373d7bc3 100644 --- a/docs/auth0_apis_create.md +++ b/docs/auth0_apis_create.md @@ -28,6 +28,7 @@ auth0 apis create -n myapi -e 6100 --offline-access=true ``` -h, --help help for create -i, --identifier string Identifier of the API. Cannot be changed once set. + --json Output in json format. -n, --name string Name of the API. -o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false). -s, --scopes strings Comma-separated list of scopes (permissions). @@ -38,7 +39,6 @@ auth0 apis create -n myapi -e 6100 --offline-access=true ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_delete.md b/docs/auth0_apis_delete.md index 1a6febdca..607b11c05 100644 --- a/docs/auth0_apis_delete.md +++ b/docs/auth0_apis_delete.md @@ -31,7 +31,6 @@ auth0 apis delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_list.md b/docs/auth0_apis_list.md index c1e87c6cb..002fca904 100644 --- a/docs/auth0_apis_list.md +++ b/docs/auth0_apis_list.md @@ -26,6 +26,7 @@ auth0 apis ls -n 100 ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) ``` @@ -33,7 +34,6 @@ auth0 apis ls -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_open.md b/docs/auth0_apis_open.md index 9f427f82e..ff8f74d12 100644 --- a/docs/auth0_apis_open.md +++ b/docs/auth0_apis_open.md @@ -30,7 +30,6 @@ auth0 apis open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_scopes.md b/docs/auth0_apis_scopes.md index fb96b9c22..49e9e9a6e 100644 --- a/docs/auth0_apis_scopes.md +++ b/docs/auth0_apis_scopes.md @@ -19,7 +19,6 @@ Manage resources for API scopes. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_scopes_list.md b/docs/auth0_apis_scopes_list.md index 609b3a1ab..dc2441a81 100644 --- a/docs/auth0_apis_scopes_list.md +++ b/docs/auth0_apis_scopes_list.md @@ -24,13 +24,13 @@ auth0 apis scopes ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_show.md b/docs/auth0_apis_show.md index 12dd65b4b..021e9951b 100644 --- a/docs/auth0_apis_show.md +++ b/docs/auth0_apis_show.md @@ -24,13 +24,13 @@ auth0 apis show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apis_update.md b/docs/auth0_apis_update.md index 99ab35edc..d2e44c9ce 100644 --- a/docs/auth0_apis_update.md +++ b/docs/auth0_apis_update.md @@ -27,6 +27,7 @@ auth0 apis update -n myapi -e 6100 --offline-access=true ``` -h, --help help for update + --json Output in json format. -n, --name string Name of the API. -o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false). -s, --scopes strings Comma-separated list of scopes (permissions). @@ -37,7 +38,6 @@ auth0 apis update -n myapi -e 6100 --offline-access=true ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps.md b/docs/auth0_apps.md index a6685d1ad..d22ccbcc0 100644 --- a/docs/auth0_apps.md +++ b/docs/auth0_apps.md @@ -19,7 +19,6 @@ Manage resources for applications. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_create.md b/docs/auth0_apps_create.md index 8c00cd249..cf8b73b2b 100644 --- a/docs/auth0_apps_create.md +++ b/docs/auth0_apps_create.md @@ -30,6 +30,7 @@ auth0 apps create -n myapp -t [native|spa|regular|m2m] --description ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_list.md b/docs/auth0_apps_list.md index 060f62d99..d5f403935 100644 --- a/docs/auth0_apps_list.md +++ b/docs/auth0_apps_list.md @@ -26,6 +26,7 @@ auth0 apps ls -n 100 ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) -r, --reveal Display the Client Secret as part of the command output. ``` @@ -34,7 +35,6 @@ auth0 apps ls -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_open.md b/docs/auth0_apps_open.md index 060a048e6..a20249793 100644 --- a/docs/auth0_apps_open.md +++ b/docs/auth0_apps_open.md @@ -29,7 +29,6 @@ auth0 apps open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_show.md b/docs/auth0_apps_show.md index 2ccfc7d25..8d7ab3401 100644 --- a/docs/auth0_apps_show.md +++ b/docs/auth0_apps_show.md @@ -24,6 +24,7 @@ auth0 apps show ``` -h, --help help for show + --json Output in json format. -r, --reveal Display the Client Secret as part of the command output. ``` @@ -31,7 +32,6 @@ auth0 apps show ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_update.md b/docs/auth0_apps_update.md index acd7c17b2..d11e1dfbb 100644 --- a/docs/auth0_apps_update.md +++ b/docs/auth0_apps_update.md @@ -29,6 +29,7 @@ auth0 apps update -n myapp --type [native|spa|regular|m2m] -d, --description string Description of the application. Max character count is 140. -g, --grants strings List of grant types supported for this application. Can include code, implicit, refresh-token, credentials, password, password-realm, mfa-oob, mfa-otp, mfa-recovery-code, and device-code. -h, --help help for update + --json Output in json format. -l, --logout-urls strings Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. -n, --name string Name of the application. -o, --origins strings Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. @@ -45,7 +46,6 @@ auth0 apps update -n myapp --type [native|spa|regular|m2m] ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_apps_use.md b/docs/auth0_apps_use.md index 9de7e3e9a..d5e89b31e 100644 --- a/docs/auth0_apps_use.md +++ b/docs/auth0_apps_use.md @@ -30,7 +30,6 @@ auth0 apps use ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_completion.md b/docs/auth0_completion.md index 5506ebb8c..483d985f1 100644 --- a/docs/auth0_completion.md +++ b/docs/auth0_completion.md @@ -63,7 +63,6 @@ auth0 completion ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains.md b/docs/auth0_domains.md index 591d7ea18..fff6186ad 100644 --- a/docs/auth0_domains.md +++ b/docs/auth0_domains.md @@ -19,7 +19,6 @@ Manage custom domains. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_create.md b/docs/auth0_domains_create.md index 8637dec19..cff022a6c 100644 --- a/docs/auth0_domains_create.md +++ b/docs/auth0_domains_create.md @@ -26,6 +26,7 @@ auth0 domains create -d, --domain string Domain name. -h, --help help for create -i, --ip-header string The HTTP header to fetch the client's IP address. + --json Output in json format. -p, --policy string The TLS version policy. Can be either 'compatible' or 'recommended'. -t, --type string Custom domain provisioning type. Must be 'auth0' for Auth0-managed certs or 'self' for self-managed certs. -v, --verification string Custom domain verification method. Must be 'txt'. @@ -35,7 +36,6 @@ auth0 domains create ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_delete.md b/docs/auth0_domains_delete.md index b4bbf21ca..8f22d860f 100644 --- a/docs/auth0_domains_delete.md +++ b/docs/auth0_domains_delete.md @@ -31,7 +31,6 @@ auth0 domains delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_list.md b/docs/auth0_domains_list.md index d9fa0c8ab..bc8580dc4 100644 --- a/docs/auth0_domains_list.md +++ b/docs/auth0_domains_list.md @@ -25,13 +25,13 @@ auth0 domains ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_show.md b/docs/auth0_domains_show.md index 826a52ae6..a363fd6be 100644 --- a/docs/auth0_domains_show.md +++ b/docs/auth0_domains_show.md @@ -24,13 +24,13 @@ auth0 domains show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_update.md b/docs/auth0_domains_update.md index fd240ef37..40a72f105 100644 --- a/docs/auth0_domains_update.md +++ b/docs/auth0_domains_update.md @@ -26,6 +26,7 @@ auth0 domains update -p compatible --ip-header "cf-connecting-ip" ``` -h, --help help for update -i, --ip-header string The HTTP header to fetch the client's IP address. + --json Output in json format. -p, --policy string The TLS version policy. Can be either 'compatible' or 'recommended'. ``` @@ -33,7 +34,6 @@ auth0 domains update -p compatible --ip-header "cf-connecting-ip" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_domains_verify.md b/docs/auth0_domains_verify.md index a7d0faf6a..db435a3b1 100644 --- a/docs/auth0_domains_verify.md +++ b/docs/auth0_domains_verify.md @@ -24,13 +24,13 @@ auth0 domains verify ``` -h, --help help for verify + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_email.md b/docs/auth0_email.md index ee0ffcf53..d92edc06c 100644 --- a/docs/auth0_email.md +++ b/docs/auth0_email.md @@ -19,7 +19,6 @@ Manage email settings. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_email_templates.md b/docs/auth0_email_templates.md index 839afc707..08384f266 100644 --- a/docs/auth0_email_templates.md +++ b/docs/auth0_email_templates.md @@ -19,7 +19,6 @@ Manage custom email templates. This requires a custom email provider to be confi ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_email_templates_show.md b/docs/auth0_email_templates_show.md index 3c8f6698d..975212cb5 100644 --- a/docs/auth0_email_templates_show.md +++ b/docs/auth0_email_templates_show.md @@ -24,13 +24,13 @@ auth0 email templates show welcome ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_email_templates_update.md b/docs/auth0_email_templates_update.md index 5648c6bc7..5762e3c8b 100644 --- a/docs/auth0_email_templates_update.md +++ b/docs/auth0_email_templates_update.md @@ -27,6 +27,7 @@ auth0 email templates update welcome -e, --enabled Whether the template is enabled (true) or disabled (false). (default true) -f, --from string Sender's 'from' email address. -h, --help help for update + --json Output in json format. -l, --lifetime int Lifetime in seconds that the link within the email will be valid for. -s, --subject string Subject line of the email. -u, --url string URL to redirect the user to after a successful action. @@ -36,7 +37,6 @@ auth0 email templates update welcome ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_ips.md b/docs/auth0_ips.md index 29b9eab04..7a5573542 100644 --- a/docs/auth0_ips.md +++ b/docs/auth0_ips.md @@ -19,7 +19,6 @@ Manage blocked IP addresses. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_ips_check.md b/docs/auth0_ips_check.md index ab1dbcc32..72db98ec6 100644 --- a/docs/auth0_ips_check.md +++ b/docs/auth0_ips_check.md @@ -29,7 +29,6 @@ auth0 ips check ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_ips_unblock.md b/docs/auth0_ips_unblock.md index e2c1c3783..97650edb5 100644 --- a/docs/auth0_ips_unblock.md +++ b/docs/auth0_ips_unblock.md @@ -29,7 +29,6 @@ auth0 ips unblock ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_login.md b/docs/auth0_login.md index dd1ae31a4..f9d6aa620 100644 --- a/docs/auth0_login.md +++ b/docs/auth0_login.md @@ -35,7 +35,6 @@ auth0 login --scopes "read:client_grants,create:client_grants" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logout.md b/docs/auth0_logout.md index e5b98fe74..236694e65 100644 --- a/docs/auth0_logout.md +++ b/docs/auth0_logout.md @@ -29,7 +29,6 @@ auth0 logout ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs.md b/docs/auth0_logs.md index 9c7a3ec0c..6c3dc4c76 100644 --- a/docs/auth0_logs.md +++ b/docs/auth0_logs.md @@ -19,7 +19,6 @@ View tenant logs. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_list.md b/docs/auth0_logs_list.md index 3d80f4265..7726c0697 100644 --- a/docs/auth0_logs_list.md +++ b/docs/auth0_logs_list.md @@ -31,6 +31,7 @@ auth0 logs ls -n 100 ``` -f, --filter string Filter in Lucene query syntax. See https://auth0.com/docs/logs/log-search-query-syntax for more details. -h, --help help for list + --json Output in json format. -n, --number int Number of log entries to show. (default 100) ``` @@ -38,7 +39,6 @@ auth0 logs ls -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams.md b/docs/auth0_logs_streams.md index f4bf35c22..5a3c27d53 100644 --- a/docs/auth0_logs_streams.md +++ b/docs/auth0_logs_streams.md @@ -19,7 +19,6 @@ manage resources for log streams. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_create.md b/docs/auth0_logs_streams_create.md index b066647c0..c7c0c1a87 100644 --- a/docs/auth0_logs_streams_create.md +++ b/docs/auth0_logs_streams_create.md @@ -39,6 +39,7 @@ auth0 logs streams create -n test-splunk -t splunk --splunk-domain demo.splunk.c --http-endpoint string HTTP endpoint. --http-format string HTTP Content-Format header. Possible values: jsonlines, jsonarray, jsonobject. --http-type string HTTP Content-Type header. Possible values: application/json. + --json Output in json format. -n, --name string Name of the log stream. --splunk-domain string The domain name of the splunk instance. --splunk-port string The port of the HTTP event collector. @@ -52,7 +53,6 @@ auth0 logs streams create -n test-splunk -t splunk --splunk-domain demo.splunk.c ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_delete.md b/docs/auth0_logs_streams_delete.md index b7ec56996..a9281ce62 100644 --- a/docs/auth0_logs_streams_delete.md +++ b/docs/auth0_logs_streams_delete.md @@ -31,7 +31,6 @@ auth0 logs streams delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_list.md b/docs/auth0_logs_streams_list.md index 02486c88a..c7472c50f 100644 --- a/docs/auth0_logs_streams_list.md +++ b/docs/auth0_logs_streams_list.md @@ -25,13 +25,13 @@ auth0 logs streams ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_open.md b/docs/auth0_logs_streams_open.md index aa16f353b..03ec71c20 100644 --- a/docs/auth0_logs_streams_open.md +++ b/docs/auth0_logs_streams_open.md @@ -29,7 +29,6 @@ auth0 logs streams open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_show.md b/docs/auth0_logs_streams_show.md index 0c61e6804..03fb0de25 100644 --- a/docs/auth0_logs_streams_show.md +++ b/docs/auth0_logs_streams_show.md @@ -24,13 +24,13 @@ auth0 logs streams show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_streams_update.md b/docs/auth0_logs_streams_update.md index 21e74d604..ac2e8763f 100644 --- a/docs/auth0_logs_streams_update.md +++ b/docs/auth0_logs_streams_update.md @@ -35,6 +35,7 @@ auth0 logs streams update -n myeventbridge -t eventbridge --http-endpoint string HTTP endpoint. --http-format string HTTP Content-Format header. Possible values: jsonlines, jsonarray, jsonobject. --http-type string HTTP Content-Type header. Possible values: application/json. + --json Output in json format. -n, --name string Name of the log stream. --splunk-domain string The domain name of the splunk instance. --splunk-port string The port of the HTTP event collector. @@ -48,7 +49,6 @@ auth0 logs streams update -n myeventbridge -t eventbridge ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_logs_tail.md b/docs/auth0_logs_tail.md index 36e675589..2e0859feb 100644 --- a/docs/auth0_logs_tail.md +++ b/docs/auth0_logs_tail.md @@ -31,6 +31,7 @@ auth0 logs tail -n 100 ``` -f, --filter string Filter in Lucene query syntax. See https://auth0.com/docs/logs/log-search-query-syntax for more details. -h, --help help for tail + --json Output in json format. -n, --number int Number of log entries to show. (default 100) ``` @@ -38,7 +39,6 @@ auth0 logs tail -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs.md b/docs/auth0_orgs.md index 8e00b3e7c..e428363c5 100644 --- a/docs/auth0_orgs.md +++ b/docs/auth0_orgs.md @@ -19,7 +19,6 @@ Manage resources for organizations. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_create.md b/docs/auth0_orgs_create.md index 677cf0072..f0da1c8fe 100644 --- a/docs/auth0_orgs_create.md +++ b/docs/auth0_orgs_create.md @@ -30,6 +30,7 @@ auth0 orgs create -n myorganization -d "My Organization" -m "KEY=value" -m "OTHE -b, --background string Background color used to customize the login pages. -d, --display string Friendly name of the organization. -h, --help help for create + --json Output in json format. -l, --logo string URL of the logo to be displayed on the login page. -m, --metadata stringToString Metadata associated with the organization (max 255 chars). Maximum of 10 metadata properties allowed. (default []) -n, --name string Name of the organization. @@ -39,7 +40,6 @@ auth0 orgs create -n myorganization -d "My Organization" -m "KEY=value" -m "OTHE ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_delete.md b/docs/auth0_orgs_delete.md index 83511a5f5..1976b65c7 100644 --- a/docs/auth0_orgs_delete.md +++ b/docs/auth0_orgs_delete.md @@ -31,7 +31,6 @@ auth0 orgs delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_list.md b/docs/auth0_orgs_list.md index b07767566..af99f5940 100644 --- a/docs/auth0_orgs_list.md +++ b/docs/auth0_orgs_list.md @@ -26,6 +26,7 @@ auth0 orgs ls -n 100 ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) ``` @@ -33,7 +34,6 @@ auth0 orgs ls -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_members.md b/docs/auth0_orgs_members.md index 5d4af6760..fcca74384 100644 --- a/docs/auth0_orgs_members.md +++ b/docs/auth0_orgs_members.md @@ -19,7 +19,6 @@ Manage members of an organization. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_members_list.md b/docs/auth0_orgs_members_list.md index f676ae991..1c25ba1b8 100644 --- a/docs/auth0_orgs_members_list.md +++ b/docs/auth0_orgs_members_list.md @@ -24,6 +24,7 @@ auth0 orgs members ls ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) ``` @@ -31,7 +32,6 @@ auth0 orgs members ls ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_open.md b/docs/auth0_orgs_open.md index 9710ace3a..e3e428f13 100644 --- a/docs/auth0_orgs_open.md +++ b/docs/auth0_orgs_open.md @@ -29,7 +29,6 @@ auth0 orgs open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_roles.md b/docs/auth0_orgs_roles.md index 6b4a6c302..c9785820a 100644 --- a/docs/auth0_orgs_roles.md +++ b/docs/auth0_orgs_roles.md @@ -19,7 +19,6 @@ Manage roles of an organization. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_roles_list.md b/docs/auth0_orgs_roles_list.md index 3ad6810e2..2ce09438a 100644 --- a/docs/auth0_orgs_roles_list.md +++ b/docs/auth0_orgs_roles_list.md @@ -24,6 +24,7 @@ auth0 orgs roles ls ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) ``` @@ -31,7 +32,6 @@ auth0 orgs roles ls ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_roles_members.md b/docs/auth0_orgs_roles_members.md index fb0f8fb71..aa47eb238 100644 --- a/docs/auth0_orgs_roles_members.md +++ b/docs/auth0_orgs_roles_members.md @@ -19,7 +19,6 @@ Manage roles assigned to members of an organization. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_roles_members_list.md b/docs/auth0_orgs_roles_members_list.md index 275c569a8..6d447a700 100644 --- a/docs/auth0_orgs_roles_members_list.md +++ b/docs/auth0_orgs_roles_members_list.md @@ -24,6 +24,7 @@ auth0 orgs roles members list --role-id role ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) -r, --role-id string Role Identifier. ``` @@ -32,7 +33,6 @@ auth0 orgs roles members list --role-id role ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_show.md b/docs/auth0_orgs_show.md index a0bcf6bfd..0aa4ee812 100644 --- a/docs/auth0_orgs_show.md +++ b/docs/auth0_orgs_show.md @@ -24,13 +24,13 @@ auth0 orgs show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_orgs_update.md b/docs/auth0_orgs_update.md index b96cf1736..570b35866 100644 --- a/docs/auth0_orgs_update.md +++ b/docs/auth0_orgs_update.md @@ -29,6 +29,7 @@ auth0 orgs update -d "My Organization" -m "KEY=value" -m "OTHER_KEY=other_v -b, --background string Background color used to customize the login pages. -d, --display string Friendly name of the organization. -h, --help help for update + --json Output in json format. -l, --logo string URL of the logo to be displayed on the login page. -m, --metadata stringToString Metadata associated with the organization (max 255 chars). Maximum of 10 metadata properties allowed. (default []) ``` @@ -37,7 +38,6 @@ auth0 orgs update -d "My Organization" -m "KEY=value" -m "OTHER_KEY=other_v ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection.md b/docs/auth0_protection.md index c292b11f8..85ccb8f97 100644 --- a/docs/auth0_protection.md +++ b/docs/auth0_protection.md @@ -19,7 +19,6 @@ Manage resources for attack protection. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_breached-password-detection.md b/docs/auth0_protection_breached-password-detection.md index d18416123..9e6eade47 100644 --- a/docs/auth0_protection_breached-password-detection.md +++ b/docs/auth0_protection_breached-password-detection.md @@ -19,7 +19,6 @@ Manage breached password detection settings. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_breached-password-detection_show.md b/docs/auth0_protection_breached-password-detection_show.md index 1f90af49d..ed9ca0641 100644 --- a/docs/auth0_protection_breached-password-detection_show.md +++ b/docs/auth0_protection_breached-password-detection_show.md @@ -23,13 +23,13 @@ auth0 protection breached-password-detection show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_breached-password-detection_update.md b/docs/auth0_protection_breached-password-detection_update.md index 5bb8ebc38..85da30e45 100644 --- a/docs/auth0_protection_breached-password-detection_update.md +++ b/docs/auth0_protection_breached-password-detection_update.md @@ -25,6 +25,7 @@ auth0 protection breached-password-detection update -f, --admin-notification-frequency strings When "admin_notification" is enabled, determines how often email notifications are sent. Possible values: immediately, daily, weekly, monthly. Comma-separated. -e, --enabled Enable (or disable) breached password detection. -h, --help help for update + --json Output in json format. -m, --method string The subscription level for breached password detection methods. Use "enhanced" to enable Credential Guard. Possible values: standard, enhanced. -s, --shields strings Action to take when a breached password is detected. Possible values: block, user_notification, admin_notification. Comma-separated. ``` @@ -33,7 +34,6 @@ auth0 protection breached-password-detection update ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_brute-force-protection.md b/docs/auth0_protection_brute-force-protection.md index 01308bc84..cfb339387 100644 --- a/docs/auth0_protection_brute-force-protection.md +++ b/docs/auth0_protection_brute-force-protection.md @@ -19,7 +19,6 @@ Manage brute force protection settings. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_brute-force-protection_show.md b/docs/auth0_protection_brute-force-protection_show.md index ba9be12d7..7187c138c 100644 --- a/docs/auth0_protection_brute-force-protection_show.md +++ b/docs/auth0_protection_brute-force-protection_show.md @@ -23,13 +23,13 @@ auth0 protection brute-force-protection show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_brute-force-protection_update.md b/docs/auth0_protection_brute-force-protection_update.md index e5efe5484..8a7dbc971 100644 --- a/docs/auth0_protection_brute-force-protection_update.md +++ b/docs/auth0_protection_brute-force-protection_update.md @@ -25,6 +25,7 @@ auth0 protection brute-force-protection update -l, --allowlist strings List of trusted IP addresses that will not have attack protection enforced against them. Comma-separated. -e, --enabled Enable (or disable) brute force protection. -h, --help help for update + --json Output in json format. -a, --max-attempts int Maximum number of unsuccessful attempts. (default 1) -m, --mode string Account Lockout: Determines whether or not IP address is used when counting failed attempts. Possible values: count_per_identifier_and_ip, count_per_identifier. -s, --shields strings Action to take when a brute force protection threshold is violated. Possible values: block, user_notification. Comma-separated. @@ -34,7 +35,6 @@ auth0 protection brute-force-protection update ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_suspicious-ip-throttling.md b/docs/auth0_protection_suspicious-ip-throttling.md index 4dbc70024..48f9eeffe 100644 --- a/docs/auth0_protection_suspicious-ip-throttling.md +++ b/docs/auth0_protection_suspicious-ip-throttling.md @@ -19,7 +19,6 @@ Manage suspicious ip throttling settings. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_suspicious-ip-throttling_show.md b/docs/auth0_protection_suspicious-ip-throttling_show.md index d460759df..f2139a20b 100644 --- a/docs/auth0_protection_suspicious-ip-throttling_show.md +++ b/docs/auth0_protection_suspicious-ip-throttling_show.md @@ -23,13 +23,13 @@ auth0 protection suspicious-ip-throttling show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_protection_suspicious-ip-throttling_update.md b/docs/auth0_protection_suspicious-ip-throttling_update.md index 28172c9d2..e26e346c2 100644 --- a/docs/auth0_protection_suspicious-ip-throttling_update.md +++ b/docs/auth0_protection_suspicious-ip-throttling_update.md @@ -25,6 +25,7 @@ auth0 protection suspicious-ip-throttling update -l, --allowlist strings List of trusted IP addresses that will not have attack protection enforced against them. Comma-separated. -e, --enabled Enable (or disable) suspicious ip throttling. -h, --help help for update + --json Output in json format. --pre-login-max int Configuration options that apply before every login attempt. Total number of attempts allowed per day. (default 1) --pre-login-rate int Configuration options that apply before every login attempt. Interval of time, given in milliseconds, at which new attempts are granted. (default 34560) --pre-registration-max int Configuration options that apply before every user registration attempt. Total number of attempts allowed. (default 1) @@ -36,7 +37,6 @@ auth0 protection suspicious-ip-throttling update ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_quickstarts.md b/docs/auth0_quickstarts.md index 0d8c73923..b88195a4e 100644 --- a/docs/auth0_quickstarts.md +++ b/docs/auth0_quickstarts.md @@ -19,7 +19,6 @@ Step-by-step guides to quickly integrate Auth0 into your application. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_quickstarts_download.md b/docs/auth0_quickstarts_download.md index 1ec24399f..2892dcbd5 100644 --- a/docs/auth0_quickstarts_download.md +++ b/docs/auth0_quickstarts_download.md @@ -32,7 +32,6 @@ auth0 qs download --stack ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_quickstarts_list.md b/docs/auth0_quickstarts_list.md index 1d41af33a..90c046cc4 100644 --- a/docs/auth0_quickstarts_list.md +++ b/docs/auth0_quickstarts_list.md @@ -26,13 +26,13 @@ auth0 qs ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles.md b/docs/auth0_roles.md index 7bfcfbd38..e15340c3b 100644 --- a/docs/auth0_roles.md +++ b/docs/auth0_roles.md @@ -19,7 +19,6 @@ Manage resources for roles. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_create.md b/docs/auth0_roles_create.md index 926e64421..7558ccf49 100644 --- a/docs/auth0_roles_create.md +++ b/docs/auth0_roles_create.md @@ -26,6 +26,7 @@ auth0 roles create -n myrole --description "awesome role" ``` -d, --description string Description of the role. -h, --help help for create + --json Output in json format. -n, --name string Name of the role. ``` @@ -33,7 +34,6 @@ auth0 roles create -n myrole --description "awesome role" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_delete.md b/docs/auth0_roles_delete.md index 7c5b53f8f..1c0134400 100644 --- a/docs/auth0_roles_delete.md +++ b/docs/auth0_roles_delete.md @@ -31,7 +31,6 @@ auth0 roles delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_list.md b/docs/auth0_roles_list.md index b06ac4ac1..7c3c16d0b 100644 --- a/docs/auth0_roles_list.md +++ b/docs/auth0_roles_list.md @@ -26,6 +26,7 @@ auth0 roles ls -n 100 ``` -h, --help help for list + --json Output in json format. -n, --number int Number of apps to retrieve (default 50) ``` @@ -33,7 +34,6 @@ auth0 roles ls -n 100 ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_permissions.md b/docs/auth0_roles_permissions.md index 92d14ff04..601cf2899 100644 --- a/docs/auth0_roles_permissions.md +++ b/docs/auth0_roles_permissions.md @@ -19,7 +19,6 @@ Manage permissions within the role resource. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_permissions_add.md b/docs/auth0_roles_permissions_add.md index e4356b638..1e4597ab5 100644 --- a/docs/auth0_roles_permissions_add.md +++ b/docs/auth0_roles_permissions_add.md @@ -35,7 +35,6 @@ auth0 roles permissions add ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_permissions_list.md b/docs/auth0_roles_permissions_list.md index 11a87fc02..056f092b0 100644 --- a/docs/auth0_roles_permissions_list.md +++ b/docs/auth0_roles_permissions_list.md @@ -25,13 +25,13 @@ auth0 roles permissions ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_permissions_remove.md b/docs/auth0_roles_permissions_remove.md index 1544d1674..8be511c6e 100644 --- a/docs/auth0_roles_permissions_remove.md +++ b/docs/auth0_roles_permissions_remove.md @@ -35,7 +35,6 @@ auth0 roles permissions rm ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_show.md b/docs/auth0_roles_show.md index b3ead0438..30e48adce 100644 --- a/docs/auth0_roles_show.md +++ b/docs/auth0_roles_show.md @@ -24,13 +24,13 @@ auth0 roles show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_roles_update.md b/docs/auth0_roles_update.md index 37f369b7a..a7c8e0312 100644 --- a/docs/auth0_roles_update.md +++ b/docs/auth0_roles_update.md @@ -26,6 +26,7 @@ auth0 roles update -n myrole --description "awesome role" ``` -d, --description string Description of the role. -h, --help help for update + --json Output in json format. -n, --name string Name of the role. ``` @@ -33,7 +34,6 @@ auth0 roles update -n myrole --description "awesome role" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules.md b/docs/auth0_rules.md index 1e727ec3f..bce10afbe 100644 --- a/docs/auth0_rules.md +++ b/docs/auth0_rules.md @@ -19,7 +19,6 @@ Manage resources for rules. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_create.md b/docs/auth0_rules_create.md index 6955d9c3a..721c9da94 100644 --- a/docs/auth0_rules_create.md +++ b/docs/auth0_rules_create.md @@ -27,6 +27,7 @@ auth0 rules create -n "My Rule" -t "Empty rule" --enabled=false ``` -e, --enabled Enable (or disable) a rule. (default true) -h, --help help for create + --json Output in json format. -n, --name string Name of the rule. -t, --template string Template to use for the rule. ``` @@ -35,7 +36,6 @@ auth0 rules create -n "My Rule" -t "Empty rule" --enabled=false ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_delete.md b/docs/auth0_rules_delete.md index 0fe41ba5a..b37ac5c00 100644 --- a/docs/auth0_rules_delete.md +++ b/docs/auth0_rules_delete.md @@ -31,7 +31,6 @@ auth0 rules delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_disable.md b/docs/auth0_rules_disable.md index 1ca768d53..d7cce7499 100644 --- a/docs/auth0_rules_disable.md +++ b/docs/auth0_rules_disable.md @@ -23,13 +23,13 @@ auth0 rules disable ``` -h, --help help for disable + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_enable.md b/docs/auth0_rules_enable.md index 30f58ada1..2229b5a62 100644 --- a/docs/auth0_rules_enable.md +++ b/docs/auth0_rules_enable.md @@ -23,13 +23,13 @@ auth0 rules enable ``` -h, --help help for enable + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_list.md b/docs/auth0_rules_list.md index bbb0a8bd4..3de6d78a3 100644 --- a/docs/auth0_rules_list.md +++ b/docs/auth0_rules_list.md @@ -25,13 +25,13 @@ auth0 rules ls ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_show.md b/docs/auth0_rules_show.md index 837d32f46..a8e382c5b 100644 --- a/docs/auth0_rules_show.md +++ b/docs/auth0_rules_show.md @@ -24,13 +24,13 @@ auth0 rules show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_rules_update.md b/docs/auth0_rules_update.md index e638bf115..09b231429 100644 --- a/docs/auth0_rules_update.md +++ b/docs/auth0_rules_update.md @@ -26,6 +26,7 @@ auth0 rules update -n "My Updated Rule" --enabled=false ``` -e, --enabled Enable (or disable) a rule. (default true) -h, --help help for update + --json Output in json format. -n, --name string Name of the rule. ``` @@ -33,7 +34,6 @@ auth0 rules update -n "My Updated Rule" --enabled=false ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_tenants.md b/docs/auth0_tenants.md index 34b51b17b..af330cb4e 100644 --- a/docs/auth0_tenants.md +++ b/docs/auth0_tenants.md @@ -19,7 +19,6 @@ Manage configured tenants. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_tenants_list.md b/docs/auth0_tenants_list.md index c41482cba..198d2565d 100644 --- a/docs/auth0_tenants_list.md +++ b/docs/auth0_tenants_list.md @@ -29,7 +29,6 @@ auth0 tenants list ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_tenants_open.md b/docs/auth0_tenants_open.md index 8451a99dc..2f07a682f 100644 --- a/docs/auth0_tenants_open.md +++ b/docs/auth0_tenants_open.md @@ -29,7 +29,6 @@ auth0 tenants open ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_tenants_use.md b/docs/auth0_tenants_use.md index f6aa59b85..dd62697ba 100644 --- a/docs/auth0_tenants_use.md +++ b/docs/auth0_tenants_use.md @@ -29,7 +29,6 @@ auth0 tenants use ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_test.md b/docs/auth0_test.md index b098939e3..49f93072f 100644 --- a/docs/auth0_test.md +++ b/docs/auth0_test.md @@ -19,7 +19,6 @@ Try your Universal Login box or get a token. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_test_login.md b/docs/auth0_test_login.md index 5646aa7d7..63a5ed4fa 100644 --- a/docs/auth0_test_login.md +++ b/docs/auth0_test_login.md @@ -29,6 +29,7 @@ auth0 test login --connection -d, --domain string One of your custom domains. --force Skip confirmation. -h, --help help for login + --json Output in json format. -s, --scopes strings The list of scopes you want to use. (default [openid,profile]) ``` @@ -36,7 +37,6 @@ auth0 test login --connection ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_test_token.md b/docs/auth0_test_token.md index d5754eee1..c449e0960 100644 --- a/docs/auth0_test_token.md +++ b/docs/auth0_test_token.md @@ -29,6 +29,7 @@ auth0 test token --client-id --audience --scopes -c, --client-id string Client Id of an Auth0 application. --force Skip confirmation. -h, --help help for token + --json Output in json format. -s, --scopes strings The list of scopes you want to use. ``` @@ -36,7 +37,6 @@ auth0 test token --client-id --audience --scopes ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login.md b/docs/auth0_universal-login.md index 155dfc1c5..bb8a97b02 100644 --- a/docs/auth0_universal-login.md +++ b/docs/auth0_universal-login.md @@ -19,7 +19,6 @@ Manage a consistent, branded Universal Login experience that can handle all of y ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_prompts.md b/docs/auth0_universal-login_prompts.md index a2751e18d..6be896eb0 100644 --- a/docs/auth0_universal-login_prompts.md +++ b/docs/auth0_universal-login_prompts.md @@ -19,7 +19,6 @@ Manage custom [text for prompts](https://auth0.com/docs/customize/universal-logi ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_prompts_show.md b/docs/auth0_universal-login_prompts_show.md index 4c74c47f0..296950ac4 100644 --- a/docs/auth0_universal-login_prompts_show.md +++ b/docs/auth0_universal-login_prompts_show.md @@ -32,7 +32,6 @@ auth0 universal-login prompts show -l es ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_prompts_update.md b/docs/auth0_universal-login_prompts_update.md index 759c19645..10633ac20 100644 --- a/docs/auth0_universal-login_prompts_update.md +++ b/docs/auth0_universal-login_prompts_update.md @@ -32,7 +32,6 @@ auth0 universal-login prompts update -l es ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_show.md b/docs/auth0_universal-login_show.md index 19fcae514..7d848f40a 100644 --- a/docs/auth0_universal-login_show.md +++ b/docs/auth0_universal-login_show.md @@ -23,13 +23,13 @@ auth0 universal-login show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_templates.md b/docs/auth0_universal-login_templates.md index 84c3e4bfc..51eafa52b 100644 --- a/docs/auth0_universal-login_templates.md +++ b/docs/auth0_universal-login_templates.md @@ -34,7 +34,6 @@ Once you close the window, you’ll be asked if you want to save the template. I ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_templates_show.md b/docs/auth0_universal-login_templates_show.md index 6ae20a96a..34549a2b3 100644 --- a/docs/auth0_universal-login_templates_show.md +++ b/docs/auth0_universal-login_templates_show.md @@ -23,13 +23,13 @@ auth0 universal-login templates show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_templates_update.md b/docs/auth0_universal-login_templates_update.md index 7989f6784..03c0f0239 100644 --- a/docs/auth0_universal-login_templates_update.md +++ b/docs/auth0_universal-login_templates_update.md @@ -29,7 +29,6 @@ auth0 universal-login templates update ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_universal-login_update.md b/docs/auth0_universal-login_update.md index 18caed560..a12ca7dbb 100644 --- a/docs/auth0_universal-login_update.md +++ b/docs/auth0_universal-login_update.md @@ -29,6 +29,7 @@ auth0 universal-login update -a "#FF4F40" -b "#2A2E35" --logo "https://example.c -f, --favicon string URL for the favicon. Must use HTTPS. -c, --font string URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS. -h, --help help for update + --json Output in json format. -l, --logo string URL for the logo. Must use HTTPS. ``` @@ -36,7 +37,6 @@ auth0 universal-login update -a "#FF4F40" -b "#2A2E35" --logo "https://example.c ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users.md b/docs/auth0_users.md index cf367c234..62c6e5c8a 100644 --- a/docs/auth0_users.md +++ b/docs/auth0_users.md @@ -19,7 +19,6 @@ Manage resources for users. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_blocks.md b/docs/auth0_users_blocks.md index 06046c121..ed9752814 100644 --- a/docs/auth0_users_blocks.md +++ b/docs/auth0_users_blocks.md @@ -19,7 +19,6 @@ Manage brute-force protection user blocks. ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_blocks_list.md b/docs/auth0_users_blocks_list.md index a56065fb7..b9da583b0 100644 --- a/docs/auth0_users_blocks_list.md +++ b/docs/auth0_users_blocks_list.md @@ -23,13 +23,13 @@ auth0 users blocks list ``` -h, --help help for list + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_create.md b/docs/auth0_users_create.md index be6eeaaf6..522ae91c0 100644 --- a/docs/auth0_users_create.md +++ b/docs/auth0_users_create.md @@ -28,6 +28,7 @@ auth0 users create -n "John Doe" -e john@example.com --connection "Username-Pass -c, --connection string Name of the database connection this user should be created in. -e, --email string The user's email. -h, --help help for create + --json Output in json format. -n, --name string The user's full name. -p, --password string Initial password for this user (mandatory for non-SMS connections). -u, --username string The user's username. Only valid if the connection requires a username. @@ -37,7 +38,6 @@ auth0 users create -n "John Doe" -e john@example.com --connection "Username-Pass ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_delete.md b/docs/auth0_users_delete.md index 925c277df..fb39b1064 100644 --- a/docs/auth0_users_delete.md +++ b/docs/auth0_users_delete.md @@ -31,7 +31,6 @@ auth0 users delete ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_import.md b/docs/auth0_users_import.md index 8d7199bb8..98c559181 100644 --- a/docs/auth0_users_import.md +++ b/docs/auth0_users_import.md @@ -38,7 +38,6 @@ auth0 users import -c "Username-Password-Authentication" -t "Basic Example" --up ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_open.md b/docs/auth0_users_open.md index 1c089025a..eb8d63fd4 100644 --- a/docs/auth0_users_open.md +++ b/docs/auth0_users_open.md @@ -30,7 +30,6 @@ auth0 users open "auth0|xxxxxxxxxx" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_search.md b/docs/auth0_users_search.md index 2473e1ea7..50b61199a 100644 --- a/docs/auth0_users_search.md +++ b/docs/auth0_users_search.md @@ -27,6 +27,7 @@ auth0 users search -q name -s "name:1" ``` -h, --help help for search + --json Output in json format. -q, --query string Query in Lucene query syntax. See https://auth0.com/docs/users/user-search/user-search-query-syntax for more details. -s, --sort string Field to sort by. Use 'field:order' where 'order' is '1' for ascending and '-1' for descending. e.g. 'created_at:1'. ``` @@ -35,7 +36,6 @@ auth0 users search -q name -s "name:1" ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_show.md b/docs/auth0_users_show.md index 5b8150452..d05b5451b 100644 --- a/docs/auth0_users_show.md +++ b/docs/auth0_users_show.md @@ -24,13 +24,13 @@ auth0 users show ``` -h, --help help for show + --json Output in json format. ``` ### Options inherited from parent commands ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_unblock.md b/docs/auth0_users_unblock.md index 1e289e77e..3c72f9b1d 100644 --- a/docs/auth0_users_unblock.md +++ b/docs/auth0_users_unblock.md @@ -29,7 +29,6 @@ auth0 users unblock ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/auth0_users_update.md b/docs/auth0_users_update.md index 890865edd..b3dcde682 100644 --- a/docs/auth0_users_update.md +++ b/docs/auth0_users_update.md @@ -28,6 +28,7 @@ auth0 users update -n John Doe --email john.doe@example.com -c, --connection string Name of the database connection this user should be created in. -e, --email string The user's email. -h, --help help for update + --json Output in json format. -n, --name string The user's full name. -p, --password string Initial password for this user (mandatory for non-SMS connections). ``` @@ -36,7 +37,6 @@ auth0 users update -n John Doe --email john.doe@example.com ``` --debug Enable debug mode. - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/docs/index.md b/docs/index.md index 2d3fe9e56..f18de95d3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,7 +10,6 @@ Supercharge your development workflow. ``` --debug Enable debug mode. -h, --help help for auth0 - --json Output in json format. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. diff --git a/internal/cli/actions.go b/internal/cli/actions.go index e477fc808..b9745e6e9 100644 --- a/internal/cli/actions.go +++ b/internal/cli/actions.go @@ -58,7 +58,7 @@ var ( actionTemplates = map[string]string{ "post-login": actionTemplatePostLogin, - "credentials-exchange": actionTemplateCredentialsEchange, + "credentials-exchange": actionTemplateCredentialsExchange, "pre-user-registration": actionTemplatePreUserRegistration, "post-user-registration": actionTemplatePostUserRegistration, "post-change-password": actionTemplatePostChangePassword, @@ -111,6 +111,8 @@ auth0 actions ls`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -151,6 +153,8 @@ auth0 actions show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -230,6 +234,8 @@ auth0 actions create -n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=val actionDependency.RegisterStringMap(cmd, &inputs.Dependencies, nil) actionSecret.RegisterStringMap(cmd, &inputs.Secrets, nil) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -362,6 +368,8 @@ auth0 actions update -n myaction -t post-login -d "lodash=4.0.0" -s "API_KE actionDependency.RegisterStringMapU(cmd, &inputs.Dependencies, nil) actionSecret.RegisterStringMapU(cmd, &inputs.Secrets, nil) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -405,11 +413,6 @@ auth0 actions delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -457,6 +460,8 @@ auth0 actions deploy `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -486,11 +491,6 @@ func openActionCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } diff --git a/internal/cli/actions_embed.go b/internal/cli/actions_embed.go index 7b42eba01..6147d548e 100644 --- a/internal/cli/actions_embed.go +++ b/internal/cli/actions_embed.go @@ -9,7 +9,7 @@ var ( actionTemplatePostLogin string //go:embed data/action-template-credentials-exchange.js - actionTemplateCredentialsEchange string + actionTemplateCredentialsExchange string //go:embed data/action-template-pre-user-registration.js actionTemplatePreUserRegistration string diff --git a/internal/cli/api.go b/internal/cli/api.go index 960cc59ab..2bc693878 100644 --- a/internal/cli/api.go +++ b/internal/cli/api.go @@ -93,11 +93,6 @@ cat data.json | auth0 api post clients`, RunE: apiCmdRun(cli, &inputs), } - cmd.SetHelpFunc(func(command *cobra.Command, strings []string) { - command.Flags().MarkHidden("json") - command.Parent().HelpFunc()(command, strings) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation when using the delete method.") apiFlags.Data.RegisterString(cmd, &inputs.RawData, "") diff --git a/internal/cli/apis.go b/internal/cli/apis.go index b058d876c..e9d422326 100644 --- a/internal/cli/apis.go +++ b/internal/cli/apis.go @@ -138,6 +138,8 @@ auth0 apis ls -n 100`, number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -178,6 +180,8 @@ auth0 apis show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -257,6 +261,8 @@ auth0 apis create -n myapi -e 6100 --offline-access=true`, apiOfflineAccess.RegisterBool(cmd, &inputs.AllowOfflineAccess, false) apiTokenLifetime.RegisterInt(cmd, &inputs.TokenLifetime, 0) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -358,6 +364,8 @@ auth0 apis update -n myapi -e 6100 --offline-access=true`, apiOfflineAccess.RegisterBoolU(cmd, &inputs.AllowOfflineAccess, false) apiTokenLifetime.RegisterIntU(cmd, &inputs.TokenLifetime, 0) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -401,11 +409,6 @@ auth0 apis delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -457,11 +460,6 @@ auth0 apis open `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } @@ -503,6 +501,8 @@ auth0 apis scopes ls `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/apps.go b/internal/cli/apps.go index 01f6921c5..546beb37f 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -188,11 +188,6 @@ func useAppCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - appNone.RegisterBool(cmd, &inputs.None, false) return cmd @@ -244,6 +239,8 @@ auth0 apps ls -n 100`, reveal.RegisterBool(cmd, &inputs.Reveal, false) number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -287,6 +284,8 @@ auth0 apps show `, reveal.RegisterBool(cmd, &inputs.Reveal, false) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -330,11 +329,6 @@ auth0 apps delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -485,6 +479,8 @@ auth0 apps create -n myapp -t [native|spa|regular|m2m] --description -n myapp --type [native|spa|regular|m2m]`, appAuthMethod.RegisterStringU(cmd, &inputs.AuthMethod, "") appGrants.RegisterStringSliceU(cmd, &inputs.Grants, nil) reveal.RegisterBool(cmd, &inputs.Reveal, false) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -716,11 +715,6 @@ func openAppCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } diff --git a/internal/cli/attack_protection_breached_password_detection.go b/internal/cli/attack_protection_breached_password_detection.go index 16e9cd25a..23c64ce40 100644 --- a/internal/cli/attack_protection_breached_password_detection.go +++ b/internal/cli/attack_protection_breached_password_detection.go @@ -75,7 +75,7 @@ func breachedPasswordDetectionCmd(cli *cli) *cobra.Command { } func showBreachedPasswordDetectionCmd(cli *cli) *cobra.Command { - return &cobra.Command{ + cmd := &cobra.Command{ Use: "show", Args: cobra.NoArgs, Short: "Show breached password detection settings", @@ -83,6 +83,10 @@ func showBreachedPasswordDetectionCmd(cli *cli) *cobra.Command { Example: `auth0 protection breached-password-detection show`, RunE: showBreachedPasswordDetectionCmdRun(cli), } + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + + return cmd } func updateBreachedPasswordDetectionCmd(cli *cli) *cobra.Command { @@ -102,6 +106,8 @@ func updateBreachedPasswordDetectionCmd(cli *cli) *cobra.Command { bpdFlags.AdminNotificationFrequency.RegisterStringSliceU(cmd, &inputs.AdminNotificationFrequency, []string{}) bpdFlags.Method.RegisterString(cmd, &inputs.Method, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/attack_protection_brute_force_protection.go b/internal/cli/attack_protection_brute_force_protection.go index 82466380d..d25ee1502 100644 --- a/internal/cli/attack_protection_brute_force_protection.go +++ b/internal/cli/attack_protection_brute_force_protection.go @@ -87,7 +87,7 @@ func bruteForceProtectionCmd(cli *cli) *cobra.Command { } func showBruteForceProtectionCmd(cli *cli) *cobra.Command { - return &cobra.Command{ + cmd := &cobra.Command{ Use: "show", Args: cobra.NoArgs, Short: "Show brute force protection settings", @@ -95,6 +95,10 @@ func showBruteForceProtectionCmd(cli *cli) *cobra.Command { Example: `auth0 protection brute-force-protection show`, RunE: showBruteForceProtectionCmdRun(cli), } + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + + return cmd } func updateBruteForceProtectionCmd(cli *cli) *cobra.Command { @@ -115,6 +119,8 @@ func updateBruteForceProtectionCmd(cli *cli) *cobra.Command { bfpFlags.Mode.RegisterString(cmd, &inputs.Mode, "") bfpFlags.MaxAttempts.RegisterIntU(cmd, &inputs.MaxAttempts, 1) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/attack_protection_suspicious_ip_throttling.go b/internal/cli/attack_protection_suspicious_ip_throttling.go index 3edc5b702..5447719fa 100644 --- a/internal/cli/attack_protection_suspicious_ip_throttling.go +++ b/internal/cli/attack_protection_suspicious_ip_throttling.go @@ -104,7 +104,7 @@ func suspiciousIPThrottlingCmd(cli *cli) *cobra.Command { } func showSuspiciousIPThrottlingCmd(cli *cli) *cobra.Command { - return &cobra.Command{ + cmd := &cobra.Command{ Use: "show", Args: cobra.NoArgs, Short: "Show suspicious ip throttling settings", @@ -112,6 +112,10 @@ func showSuspiciousIPThrottlingCmd(cli *cli) *cobra.Command { Example: `auth0 protection suspicious-ip-throttling show`, RunE: showSuspiciousIPThrottlingCmdRun(cli), } + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + + return cmd } func updateSuspiciousIPThrottlingCmd(cli *cli) *cobra.Command { @@ -134,6 +138,8 @@ func updateSuspiciousIPThrottlingCmd(cli *cli) *cobra.Command { sitFlags.StagePreUserRegistrationMaxAttempts.RegisterIntU(cmd, &inputs.StagePreUserRegistrationMaxAttempts, 1) sitFlags.StagePreUserRegistrationRate.RegisterIntU(cmd, &inputs.StagePreUserRegistrationRate, 1200) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/build_doc.go b/internal/cli/build_doc.go deleted file mode 100644 index e27e0674b..000000000 --- a/internal/cli/build_doc.go +++ /dev/null @@ -1,55 +0,0 @@ -package cli - -import ( - "strings" - - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" -) - -func BuildDoc() error { - cli := &cli{} - - rootCmd := &cobra.Command{ - Use: "auth0", - Short: rootShort, - DisableAutoGenTag: true, - } - - rootCmd.SetUsageTemplate(namespaceUsageTemplate()) - addPersistentFlags(rootCmd, cli) - addSubcommands(rootCmd, cli) - - docsPath := "./docs/" - - err := doc.GenMarkdownTreeCustom(rootCmd, - docsPath, - func(fileName string) string { - // prepend to the generated markdown - if strings.HasSuffix(fileName, "auth0.md") { - return `--- -layout: home ---- -` - } - - return `--- -layout: default ---- -` - }, - func(fileName string) string { - // return same value, we're not changing the internal link - if strings.HasSuffix(fileName, "auth0.md") { - return "/auth0-cli/" - } - - return fileName - }) - - if err != nil { - return err - } - - return nil -} diff --git a/internal/cli/custom_domains.go b/internal/cli/custom_domains.go index f7057e131..aaccb5e27 100644 --- a/internal/cli/custom_domains.go +++ b/internal/cli/custom_domains.go @@ -114,6 +114,8 @@ auth0 domains ls`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -154,6 +156,8 @@ auth0 domains show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -217,6 +221,8 @@ auth0 domains create `, customDomainPolicy.RegisterString(cmd, &inputs.TLSPolicy, "") customDomainIPHeader.RegisterString(cmd, &inputs.CustomClientIPHeader, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -295,6 +301,8 @@ auth0 domains update -p compatible --ip-header "cf-connecting-ip"`, customDomainPolicy.RegisterStringU(cmd, &inputs.TLSPolicy, "") customDomainIPHeader.RegisterStringU(cmd, &inputs.CustomClientIPHeader, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -338,11 +346,6 @@ auth0 domains delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -385,6 +388,8 @@ auth0 domains verify `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/doc-gen.go b/internal/cli/doc-gen.go new file mode 100644 index 000000000..7c63c3a50 --- /dev/null +++ b/internal/cli/doc-gen.go @@ -0,0 +1,57 @@ +package cli + +import ( + "strings" + + "github.com/spf13/cobra" + "github.com/spf13/cobra/doc" +) + +const ( + docsPath = "./docs/" + homeLayout = `--- +layout: home +--- +` + defaultLayout = `--- +layout: default +--- +` +) + +// GenerateDocs will generate the documentation +// for all the commands under the ./docs folder. +func GenerateDocs() error { + baseCmd := &cobra.Command{ + Use: "auth0", + Short: rootShort, + DisableAutoGenTag: true, + } + baseCmd.SetUsageTemplate(namespaceUsageTemplate()) + + cli := &cli{} + addPersistentFlags(baseCmd, cli) + addSubCommands(baseCmd, cli) + + return doc.GenMarkdownTreeCustom(baseCmd, docsPath, prependToFiles, handleLinks) +} + +func prependToFiles(fileName string) string { + if isIndexFile(fileName) { + return homeLayout + } + + return defaultLayout +} + +func handleLinks(fileName string) string { + if isIndexFile(fileName) { + return "/auth0-cli/" + } + + return fileName +} + +func isIndexFile(fileName string) bool { + return strings.HasSuffix(fileName, "auth0.md") +} diff --git a/internal/cli/email_templates.go b/internal/cli/email_templates.go index ab05228f0..8db2acea6 100644 --- a/internal/cli/email_templates.go +++ b/internal/cli/email_templates.go @@ -146,6 +146,8 @@ auth0 email templates show welcome`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -273,6 +275,8 @@ auth0 email templates update welcome`, emailTemplateURL.RegisterStringU(cmd, &inputs.ResultURL, "") emailTemplateLifetime.RegisterIntU(cmd, &inputs.ResultURLLifetime, 0) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/log_streams.go b/internal/cli/log_streams.go index f11316a24..f4d40ab75 100644 --- a/internal/cli/log_streams.go +++ b/internal/cli/log_streams.go @@ -190,6 +190,8 @@ auth0 logs streams ls`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -230,6 +232,8 @@ auth0 logs streams show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -437,6 +441,8 @@ auth0 logs streams create -n test-splunk -t splunk --splunk-domain demo.splunk.c azureRegion.RegisterString(cmd, &inputs.AzureRegion, "") azureResourceGroup.RegisterString(cmd, &inputs.AzureResourceGroup, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -690,6 +696,8 @@ auth0 logs streams update -n myeventbridge -t eventbridge`, datadogApiKey.RegisterStringU(cmd, &inputs.DatadogAPIKey, "") datadogRegion.RegisterStringU(cmd, &inputs.DatadogRegion, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -733,11 +741,6 @@ auth0 logs streams delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -769,11 +772,6 @@ func openLogStreamsCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } diff --git a/internal/cli/login.go b/internal/cli/login.go index 0ac82ad8c..b66aaf1cf 100644 --- a/internal/cli/login.go +++ b/internal/cli/login.go @@ -135,7 +135,6 @@ auth0 login --scopes "read:client_grants,create:client_grants"`, cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { _ = cmd.Flags().MarkHidden("tenant") - _ = cmd.Flags().MarkHidden("json") cmd.Parent().HelpFunc()(cmd, args) }) diff --git a/internal/cli/logout.go b/internal/cli/logout.go index fe921cd6f..d2342f780 100644 --- a/internal/cli/logout.go +++ b/internal/cli/logout.go @@ -59,7 +59,6 @@ func logoutCmd(cli *cli) *cobra.Command { cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { _ = cmd.Flags().MarkHidden("tenant") - _ = cmd.Flags().MarkHidden("json") cmd.Parent().HelpFunc()(cmd, args) }) diff --git a/internal/cli/logs.go b/internal/cli/logs.go index 8515df9f5..767e0ef2f 100644 --- a/internal/cli/logs.go +++ b/internal/cli/logs.go @@ -74,6 +74,9 @@ auth0 logs ls -n 100`, logsFilter.RegisterString(cmd, &inputs.Filter, "") logsNum.RegisterInt(cmd, &inputs.Num, 100) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -158,6 +161,9 @@ auth0 logs tail -n 100`, logsFilter.RegisterString(cmd, &inputs.Filter, "") logsNum.RegisterInt(cmd, &inputs.Num, 100) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/organizations.go b/internal/cli/organizations.go index 429312e23..5b8039d07 100644 --- a/internal/cli/organizations.go +++ b/internal/cli/organizations.go @@ -146,7 +146,11 @@ auth0 orgs ls -n 100`, return nil }, } + number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -187,6 +191,8 @@ auth0 orgs show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -270,6 +276,8 @@ auth0 orgs create -n myorganization -d "My Organization" -m "KEY=value" -m "OTHE organizationBackground.RegisterString(cmd, &inputs.BackgroundColor, "") organizationMetadata.RegisterStringMap(cmd, &inputs.Metadata, nil) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -386,6 +394,8 @@ auth0 orgs update -d "My Organization" -m "KEY=value" -m "OTHER_KEY=other_v organizationBackground.RegisterStringU(cmd, &inputs.BackgroundColor, "") organizationMetadata.RegisterStringMapU(cmd, &inputs.Metadata, nil) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -429,11 +439,6 @@ auth0 orgs delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -465,11 +470,6 @@ func openOrganizationCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } @@ -519,7 +519,11 @@ auth0 orgs members ls `, return nil }, } + number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -574,7 +578,11 @@ auth0 orgs roles ls `, return nil }, } + number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -635,8 +643,12 @@ auth0 orgs roles members list --role-id role`, return nil }, } + roleIdentifier.RegisterString(cmd, &inputs.RoleID, "") number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/quickstarts.go b/internal/cli/quickstarts.go index ab9cd1ff1..ad2ece8cf 100644 --- a/internal/cli/quickstarts.go +++ b/internal/cli/quickstarts.go @@ -83,6 +83,8 @@ auth0 qs ls`, RunE: listQuickstarts(cli), } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/roles.go b/internal/cli/roles.go index 8783b5fe8..95518a4ba 100644 --- a/internal/cli/roles.go +++ b/internal/cli/roles.go @@ -102,6 +102,8 @@ auth0 roles ls -n 100`, number.RegisterInt(cmd, &inputs.Number, defaultPageSize) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -142,6 +144,8 @@ auth0 roles show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -192,6 +196,8 @@ auth0 roles create -n myrole --description "awesome role"`, roleName.RegisterString(cmd, &inputs.Name, "") roleDescription.RegisterString(cmd, &inputs.Description, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -259,6 +265,8 @@ auth0 roles update -n myrole --description "awesome role"`, roleName.RegisterStringU(cmd, &inputs.Name, "") roleDescription.RegisterStringU(cmd, &inputs.Description, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -302,11 +310,6 @@ auth0 roles delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd diff --git a/internal/cli/roles_permissions.go b/internal/cli/roles_permissions.go index c28f9d08e..1cb989de2 100644 --- a/internal/cli/roles_permissions.go +++ b/internal/cli/roles_permissions.go @@ -85,6 +85,8 @@ auth0 roles permissions ls`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -149,6 +151,7 @@ auth0 roles permissions add`, roleAPIIdentifier.RegisterString(cmd, &inputs.APIIdentifier, "") roleAPIPermissions.RegisterStringSlice(cmd, &inputs.Permissions, nil) + return cmd } @@ -214,6 +217,7 @@ auth0 roles permissions rm`, roleAPIIdentifier.RegisterString(cmd, &inputs.APIIdentifier, "") roleAPIPermissions.RegisterStringSlice(cmd, &inputs.Permissions, nil) + return cmd } diff --git a/internal/cli/root.go b/internal/cli/root.go index 218d62336..f3df231fb 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -30,7 +30,7 @@ func Execute() { rootCmd.SetUsageTemplate(namespaceUsageTemplate()) addPersistentFlags(rootCmd, cli) - addSubcommands(rootCmd, cli) + addSubCommands(rootCmd, cli) // TODO(cyx): backport this later on using latest auth0/v5. // rootCmd.AddCommand(actionsCmd(cli)) @@ -142,9 +142,6 @@ func addPersistentFlags(rootCmd *cobra.Command, cli *cli) { rootCmd.PersistentFlags().BoolVar(&cli.debug, "debug", false, "Enable debug mode.") - rootCmd.PersistentFlags().BoolVar(&cli.json, - "json", false, "Output in json format.") - rootCmd.PersistentFlags().BoolVar(&cli.noInput, "no-input", false, "Disable interactivity.") @@ -152,7 +149,7 @@ func addPersistentFlags(rootCmd *cobra.Command, cli *cli) { "no-color", false, "Disable colors.") } -func addSubcommands(rootCmd *cobra.Command, cli *cli) { +func addSubCommands(rootCmd *cobra.Command, cli *cli) { // The order of the commands here matters. // Add new commands in a place that reflect its // relevance or relation with other commands: diff --git a/internal/cli/rules.go b/internal/cli/rules.go index f114423bf..b04e0ee63 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -110,6 +110,8 @@ auth0 rules ls`, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -183,6 +185,8 @@ auth0 rules create -n "My Rule" -t "Empty rule" --enabled=false`, ruleTemplate.RegisterString(cmd, &inputs.Template, "") ruleEnabled.RegisterBool(cmd, &inputs.Enabled, true) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -225,6 +229,8 @@ auth0 rules show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -268,11 +274,6 @@ auth0 rules delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -383,6 +384,8 @@ auth0 rules update -n "My Updated Rule" --enabled=false`, ruleName.RegisterStringU(cmd, &inputs.Name, "") ruleEnabled.RegisterBool(cmd, &inputs.Enabled, true) + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -435,6 +438,8 @@ func enableRuleCmd(cli *cli) *cobra.Command { }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -487,6 +492,8 @@ func disableRuleCmd(cli *cli) *cobra.Command { }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/tenants.go b/internal/cli/tenants.go index c11859adc..071ea99bc 100644 --- a/internal/cli/tenants.go +++ b/internal/cli/tenants.go @@ -90,11 +90,6 @@ func useTenantCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } @@ -133,11 +128,6 @@ func openTenantCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } diff --git a/internal/cli/test.go b/internal/cli/test.go index 4678e7b3c..38ce40bb4 100644 --- a/internal/cli/test.go +++ b/internal/cli/test.go @@ -197,6 +197,7 @@ auth0 test login --connection `, cmd.SetUsageTemplate(resourceUsageTemplate()) cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") testAudience.RegisterString(cmd, &inputs.Audience, "") testScopes.RegisterStringSlice(cmd, &inputs.Scopes, cliLoginTestingScopes) @@ -296,6 +297,7 @@ auth0 test token --client-id --audience --scopes cmd.SetUsageTemplate(resourceUsageTemplate()) cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") testClientID.RegisterString(cmd, &inputs.ClientID, "") testAudienceRequired.RegisterString(cmd, &inputs.Audience, "") diff --git a/internal/cli/universal_login.go b/internal/cli/universal_login.go index 10a30706a..272318bfb 100644 --- a/internal/cli/universal_login.go +++ b/internal/cli/universal_login.go @@ -143,6 +143,8 @@ func showUniversalLoginCmd(cli *cli) *cobra.Command { }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -251,6 +253,8 @@ auth0 universal-login update -a "#FF4F40" -b "#2A2E35" --logo "https://example.c brandingFavicon.RegisterStringU(cmd, &inputs.FaviconURL, "") brandingFont.RegisterStringU(cmd, &inputs.CustomFontURL, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -273,12 +277,14 @@ func showBrandingTemplateCmd(cli *cli) *cobra.Command { } cli.renderer.Heading("template") - fmt.Println(*template.Body) + fmt.Println(template.GetBody()) return nil }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } diff --git a/internal/cli/users.go b/internal/cli/users.go index 108104f28..252162694 100644 --- a/internal/cli/users.go +++ b/internal/cli/users.go @@ -175,6 +175,8 @@ auth0 users search -q name -s "name:1"`, userQuery.RegisterString(cmd, &inputs.query, "") userSort.RegisterString(cmd, &inputs.sort, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -257,6 +259,8 @@ auth0 users create -n "John Doe" -e john@example.com --connection "Username-Pass userEmail.RegisterString(cmd, &inputs.Email, "") userUsername.RegisterString(cmd, &inputs.Username, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -304,6 +308,8 @@ auth0 users show `, }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -346,11 +352,6 @@ auth0 users delete `, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - cmd.Flags().BoolVar(&cli.force, "force", false, "Skip confirmation.") return cmd @@ -459,6 +460,8 @@ auth0 users update -n John Doe --email john.doe@example.com`, userPassword.RegisterStringU(cmd, &inputs.Password, "") userEmail.RegisterStringU(cmd, &inputs.Email, "") + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -488,11 +491,6 @@ auth0 users open "auth0|xxxxxxxxxx"`, }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd } @@ -545,6 +543,8 @@ func listUserBlocksCmd(cli *cli) *cobra.Command { }, } + cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.") + return cmd } @@ -580,11 +580,6 @@ func deleteUserBlocksCmd(cli *cli) *cobra.Command { }, } - cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { - _ = cmd.Flags().MarkHidden("json") - cmd.Parent().HelpFunc()(cmd, args) - }) - return cmd }