diff --git a/internal/cli/actions.go b/internal/cli/actions.go index 5d1d7bfa6..e477fc808 100644 --- a/internal/cli/actions.go +++ b/internal/cli/actions.go @@ -405,6 +405,11 @@ 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 @@ -481,6 +486,11 @@ 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/apis.go b/internal/cli/apis.go index 7d7a474d9..b058d876c 100644 --- a/internal/cli/apis.go +++ b/internal/cli/apis.go @@ -401,6 +401,11 @@ 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 @@ -452,6 +457,11 @@ auth0 apis open `, }, } + cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { + _ = cmd.Flags().MarkHidden("json") + cmd.Parent().HelpFunc()(cmd, args) + }) + return cmd } diff --git a/internal/cli/apps.go b/internal/cli/apps.go index c88e63f10..01f6921c5 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -188,7 +188,13 @@ 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 } @@ -324,6 +330,11 @@ 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 @@ -705,6 +716,11 @@ 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/custom_domains.go b/internal/cli/custom_domains.go index e90deebab..d394974e2 100644 --- a/internal/cli/custom_domains.go +++ b/internal/cli/custom_domains.go @@ -338,6 +338,11 @@ auth0 branding 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 diff --git a/internal/cli/log_streams.go b/internal/cli/log_streams.go index 2408ac1e9..f11316a24 100644 --- a/internal/cli/log_streams.go +++ b/internal/cli/log_streams.go @@ -733,6 +733,11 @@ 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 @@ -764,6 +769,11 @@ 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 c5f7d598a..8814c3495 100644 --- a/internal/cli/login.go +++ b/internal/cli/login.go @@ -33,6 +33,7 @@ func loginCmd(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/logout.go b/internal/cli/logout.go index bfe3ff204..fe921cd6f 100644 --- a/internal/cli/logout.go +++ b/internal/cli/logout.go @@ -57,5 +57,11 @@ 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) + }) + return cmd } diff --git a/internal/cli/organizations.go b/internal/cli/organizations.go index b30f3c961..429312e23 100644 --- a/internal/cli/organizations.go +++ b/internal/cli/organizations.go @@ -429,6 +429,11 @@ 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 @@ -460,6 +465,11 @@ 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 } diff --git a/internal/cli/roles.go b/internal/cli/roles.go index 8f45bc71e..8783b5fe8 100644 --- a/internal/cli/roles.go +++ b/internal/cli/roles.go @@ -302,6 +302,11 @@ 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/rules.go b/internal/cli/rules.go index 4019fa1e0..f114423bf 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -268,6 +268,11 @@ 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 diff --git a/internal/cli/tenants.go b/internal/cli/tenants.go index f199d62c9..092424b2b 100644 --- a/internal/cli/tenants.go +++ b/internal/cli/tenants.go @@ -115,6 +115,11 @@ 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 } @@ -148,6 +153,11 @@ 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/users.go b/internal/cli/users.go index b2eae96ec..108104f28 100644 --- a/internal/cli/users.go +++ b/internal/cli/users.go @@ -346,6 +346,11 @@ 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 @@ -483,6 +488,11 @@ auth0 users open "auth0|xxxxxxxxxx"`, }, } + cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { + _ = cmd.Flags().MarkHidden("json") + cmd.Parent().HelpFunc()(cmd, args) + }) + return cmd } @@ -570,6 +580,11 @@ 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 }