From b4e5552e609b3a6aea5f5d4e42be320b0ca23456 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 11:56:30 -0300 Subject: [PATCH 01/10] fix clients wording --- internal/cli/actions.go | 48 ++++++++++++++++++++--------------------- internal/cli/clients.go | 22 +++++++++---------- internal/cli/login.go | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/internal/cli/actions.go b/internal/cli/actions.go index f87b33e97..5213f054b 100644 --- a/internal/cli/actions.go +++ b/internal/cli/actions.go @@ -17,7 +17,7 @@ import ( func actionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "actions", - Short: "manage resources for actions.", + Short: "Manage resources for actions", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -35,7 +35,7 @@ func actionsCmd(cli *cli) *cobra.Command { func triggersCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "triggers", - Short: "manage resources for action triggers.", + Short: "Manage resources for action triggers", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -49,11 +49,11 @@ func triggersCmd(cli *cli) *cobra.Command { func listActionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Lists your existing actions", - Long: `$ auth0 actions list + Short: "List your existing actions", + Long: `auth0 actions list Lists your existing actions. To create one try: - $ auth0 actions create + auth0 actions create `, RunE: func(cmd *cobra.Command, args []string) error { list, err := cli.api.Action.List() @@ -100,7 +100,7 @@ func testActionCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "test", Short: "Test an action draft against a payload", - Long: `$ auth0 actions test --name --file `, + Long: `auth0 actions test --name --file `, RunE: func(cmd *cobra.Command, args []string) error { err := readJsonFile(payloadFile, &payload) if err != nil { @@ -122,7 +122,7 @@ func testActionCmd(cli *cli) *cobra.Command { }, } - cmd.Flags().StringVar(&actionId, "name", "", "Action ID to to test") + cmd.Flags().StringVarP(&actionId, "name", "n", "", "Action ID to to test") cmd.Flags().StringVarP(&payloadFile, "file", "f", "", "File containing the payload for the test") cmd.Flags().StringVarP(&versionId, "version", "v", "draft", "Version ID of the action to test") @@ -137,8 +137,8 @@ func deployActionCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "deploy", - Short: "Deploys the action version", - Long: `$ auth0 actions deploy --name --version `, + Short: "Deploy the action version", + Long: `auth0 actions deploy --name --version `, RunE: func(cmd *cobra.Command, args []string) error { var version *management.ActionVersion err := ansi.Spinner(fmt.Sprintf("Deploying action: %s, version: %s", actionId, versionId), func() (err error) { @@ -156,7 +156,7 @@ func deployActionCmd(cli *cli) *cobra.Command { }, } - cmd.Flags().StringVar(&actionId, "name", "", "Action ID to deploy") + cmd.Flags().StringVarP(&actionId, "name", "n", "", "Action ID to deploy") cmd.Flags().StringVarP(&versionId, "version", "v", "draft", "Version ID of the action to deploy") mustRequireFlags(cmd, "name") @@ -172,7 +172,7 @@ func downloadActionCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "download", Short: "Download the action version", - Long: `$ auth0 actions download --name --version `, + Long: `auth0 actions download --name --version `, RunE: func(cmd *cobra.Command, args []string) error { cli.renderer.Infof("It will overwrite files in %s", path) if confirmed := prompt.Confirm("Do you wish to proceed?"); !confirmed { @@ -215,7 +215,7 @@ func downloadActionCmd(cli *cli) *cobra.Command { }, } - cmd.Flags().StringVar(&actionId, "name", "", "Action ID to deploy") + cmd.Flags().StringVarP(&actionId, "name", "n", "", "Action ID to deploy") cmd.Flags().StringVarP(&versionId, "version", "v", "draft", "Version ID of the action to deploy or draft, default: draft") cmd.Flags().StringVarP(&path, "path", "p", "./", "Path to save the action content") @@ -229,8 +229,8 @@ func listActionVersionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "versions", - Short: "Lists the action versions", - Long: `$ auth0 actions versions --name `, + Short: "List the action versions", + Long: `auth0 actions versions --name `, RunE: func(cmd *cobra.Command, args []string) error { var list *management.ActionVersionList err := ansi.Spinner(fmt.Sprintf("Loading versions for action: %s", actionId), func() (err error) { @@ -248,7 +248,7 @@ func listActionVersionsCmd(cli *cli) *cobra.Command { }, } - cmd.Flags().StringVar(&actionId, "name", "", "Action ID to show versions") + cmd.Flags().StringVarP(&actionId, "name", "n", "", "Action ID to show versions") mustRequireFlags(cmd, "name") @@ -258,11 +258,11 @@ func listActionVersionsCmd(cli *cli) *cobra.Command { func createActionCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "create", - Short: "Creates a new action", - Long: `$ auth0 actions create -Creates a new action: + Short: "Create a new action", + Long: `auth0 actions create +Create a new action: - $ auth0 actions create my-action --trigger post-login + auth0 actions create my-action --trigger post-login `, Args: func(cmd *cobra.Command, args []string) error { if err := validators.ExactArgs("name")(cmd, args); err != nil { @@ -317,7 +317,7 @@ func showTriggerCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "show", Short: "Show actions by trigger", - Long: `$ auth0 actions triggers show --trigger post-login`, + Long: `auth0 actions triggers show --trigger post-login`, RunE: func(cmd *cobra.Command, args []string) error { if err := validators.TriggerID(trigger); err != nil { return err @@ -351,8 +351,8 @@ func reorderTriggerCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "reorder", - Short: "Reorders actions by trigger", - Long: `$ auth0 actions triggers reorder --trigger --file `, + Short: "Reorder actions by trigger", + Long: `auth0 actions triggers reorder --trigger --file `, RunE: func(cmd *cobra.Command, args []string) error { if err := validators.TriggerID(trigger); err != nil { return err @@ -398,7 +398,7 @@ func createTriggerCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "create", Short: "Bind an action to a trigger", - Long: `$ auth0 actions triggers create --trigger --name `, + Long: `auth0 actions triggers create --trigger --name `, RunE: func(cmd *cobra.Command, args []string) error { if err := validators.TriggerID(trigger); err != nil { return err @@ -444,7 +444,7 @@ func createTriggerCmd(cli *cli) *cobra.Command { } cmd.Flags().StringVarP(&trigger, "trigger", "t", string(management.PostLogin), "Trigger type for action.") - cmd.Flags().StringVar(&actionId, "name", "", "Action ID to to test") + cmd.Flags().StringVarP(&actionId, "name", "n", "", "Action ID to to test") return cmd } diff --git a/internal/cli/clients.go b/internal/cli/clients.go index 34fef721f..a65fa38d7 100644 --- a/internal/cli/clients.go +++ b/internal/cli/clients.go @@ -13,7 +13,7 @@ import ( func clientsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "clients", - Short: "manage resources for clients.", + Short: "Manage resources for clients", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -26,11 +26,11 @@ func clientsCmd(cli *cli) *cobra.Command { func clientsListCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Lists your existing clients", - Long: `$ auth0 client list + Short: "List your existing clients", + Long: `auth0 client list Lists your existing clients. To create one try: - $ auth0 clients create + auth0 clients create `, RunE: func(cmd *cobra.Command, args []string) error { var list *management.ClientList @@ -63,16 +63,12 @@ func clientsCreateCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "create", Short: "Create a new client (also know as application)", - Long: `Creates a new client (or application): + Long: `Create a new client (or application): auth0 clients create --name myapp --type [native|spa|regular|m2m] - supported application type: - - native: mobile, desktop, CLI and smart device apps running natively. - - spa (single page application): a JavaScript front-end app that uses an API. - - regular: Traditional web app using redirects. - - m2m (machine to machine): CLIs, daemons or services running on your backend. -`, + `, RunE: func(cmd *cobra.Command, args []string) error { // todo(jfatta) on non-interactive the cmd should fail on missing mandatory args (name, type) if !cmd.Flags().Changed("name") { @@ -152,7 +148,11 @@ auth0 clients create --name myapp --type [native|spa|regular|m2m] }, } cmd.Flags().StringVarP(&flags.Name, "name", "n", "", "Name of the client.") - cmd.Flags().StringVarP(&flags.AppType, "type", "t", "", "Type of the client: native, spa, regular, or m2m.") + cmd.Flags().StringVarP(&flags.AppType, "type", "t", "", "Type of the client:\n"+ + "- native: mobile, desktop, CLI and smart device apps running natively.\n"+ + "- spa (single page application): a JavaScript front-end app that uses an API.\n"+ + "- regular: Traditional web app using redirects.\n"+ + "- m2m (machine to machine): CLIs, daemons or services running on your backend.") cmd.Flags().StringVarP(&flags.Description, "description", "d", "", "A free text description of the application. Max character count is 140.") cmd.Flags().StringSliceVarP(&flags.Callbacks, "callbacks", "c", nil, "After the user authenticates we will only call back to any of these URLs. You can specify multiple valid URLs by comma-separating them (typically to handle different environments like QA or testing). Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native clients, all callbacks should use protocol https://.") diff --git a/internal/cli/login.go b/internal/cli/login.go index ae25c13f2..b3ead4cb2 100644 --- a/internal/cli/login.go +++ b/internal/cli/login.go @@ -13,7 +13,7 @@ import ( func loginCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "login", - Short: "authenticate the Auth0 CLI.", + Short: "Authenticate the Auth0 CLI", Long: "sign in to your Auth0 account and authorize the CLI to access the API", RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() From 58cf7f111076e1b06e8041a6c90c5843a987554d Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:15:32 -0300 Subject: [PATCH 02/10] apis wording --- internal/cli/apis.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/cli/apis.go b/internal/cli/apis.go index c190051e5..1e963b33d 100644 --- a/internal/cli/apis.go +++ b/internal/cli/apis.go @@ -16,7 +16,7 @@ const ( func apisCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "apis", - Short: "manage resources for APIs.", + Short: "Manage resources for APIs", Aliases: []string{"resource-servers"}, } @@ -33,11 +33,11 @@ func apisCmd(cli *cli) *cobra.Command { func listApisCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Lists your existing APIs", - Long: `$ auth0 apis list + Short: "List your existing APIs", + Long: `auth0 apis list Lists your existing APIs. To create one try: - $ auth0 apis create + auth0 apis create `, RunE: func(cmd *cobra.Command, args []string) error { var list *management.ResourceServerList @@ -68,7 +68,7 @@ func showApiCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "show", Short: "Show an API", - Long: `Shows an API: + Long: `Show an API: auth0 apis show --id id `, @@ -116,7 +116,7 @@ func createApiCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "create", Short: "Create a new API", - Long: `Creates a new API: + Long: `Create a new API: auth0 apis create --name myapi --identifier http://my-api `, @@ -182,7 +182,7 @@ func updateApiCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "update", Short: "Update an API", - Long: `Updates an API: + Long: `Update an API: auth0 apis update --id id --name myapi `, @@ -236,7 +236,7 @@ func deleteApiCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "delete", Short: "Delete an API", - Long: `Deletes an API: + Long: `Delete an API: auth0 apis delete --id id `, From 92fc53ba536ec1c22ce1b3fa66d772788bee7665 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:17:25 -0300 Subject: [PATCH 03/10] fix try wording --- internal/cli/try_login.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/try_login.go b/internal/cli/try_login.go index 1ce26d58d..50206baec 100644 --- a/internal/cli/try_login.go +++ b/internal/cli/try_login.go @@ -31,8 +31,8 @@ func tryLoginCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "try-login", - Short: "try out your universal login box.", - Long: `$ auth0 try-login + Short: "Try out your universal login box", + Long: `auth0 try-login Launch a browser to try out your universal login box for the given client. `, RunE: func(cmd *cobra.Command, args []string) error { From bc645ab7771dc42a25231c9587b460e94928b978 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:19:07 -0300 Subject: [PATCH 04/10] logs doc --- internal/cli/logs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/logs.go b/internal/cli/logs.go index 898d510cd..4a2f850eb 100644 --- a/internal/cli/logs.go +++ b/internal/cli/logs.go @@ -32,8 +32,8 @@ func logsCmd(cli *cli) *cobra.Command { var noColor bool cmd := &cobra.Command{ Use: "logs", - Short: "show the tenant logs", - Long: `$ auth0 logs + Short: "Show the tenant logs", + Long: `auth0 logs Show the tenant logs. `, RunE: func(cmd *cobra.Command, args []string) error { From c02033bd370c25ffc5087542169c1690c686375a Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:22:33 -0300 Subject: [PATCH 05/10] rules wording --- internal/cli/rules.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cli/rules.go b/internal/cli/rules.go index f7fc98b0b..9cbbe17bf 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -22,7 +22,7 @@ const ( func rulesCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "rules", - Short: "manage rules for clients.", + Short: "Manage rules for clients", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -38,8 +38,8 @@ func rulesCmd(cli *cli) *cobra.Command { func listRulesCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Lists your rules", - Long: `Lists the rules in your current tenant.`, + Short: "List rules", + Long: `List the rules in the current tenant`, RunE: func(cmd *cobra.Command, args []string) error { var rules *management.RuleList err := ansi.Spinner("Loading rules", func() error { From 7d42d045f98359d620f7df657b1d75a37dac388f Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:25:31 -0300 Subject: [PATCH 06/10] actions wording --- internal/cli/actions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/actions.go b/internal/cli/actions.go index 5213f054b..483cd753c 100644 --- a/internal/cli/actions.go +++ b/internal/cli/actions.go @@ -49,9 +49,9 @@ func triggersCmd(cli *cli) *cobra.Command { func listActionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "List your existing actions", + Short: "List existing actions", Long: `auth0 actions list -Lists your existing actions. To create one try: +List existing actions. To create one try: auth0 actions create `, From 1a76e055ef0a79f1e0a59bc5b9b8b36ff6e52cb3 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:28:33 -0300 Subject: [PATCH 07/10] connections wording --- internal/cli/connections.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cli/connections.go b/internal/cli/connections.go index 44c405bc8..fe44dd34f 100644 --- a/internal/cli/connections.go +++ b/internal/cli/connections.go @@ -9,7 +9,7 @@ import ( func connectionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "connections", - Short: "manage resources for connections.", + Short: "Manage resources for connections", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -21,11 +21,11 @@ func connectionsCmd(cli *cli) *cobra.Command { func listConnectionsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Lists your existing connections", - Long: `$ auth0 connections list + Short: "List existing connections", + Long: `auth0 connections list Lists your existing connections. To create one try: - $ auth0 connections create + auth0 connections create `, RunE: func(cmd *cobra.Command, args []string) error { var list *management.ConnectionList From 0d1e3aa2140f07be31689596c4e7ffd5e49bda76 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:41:20 -0300 Subject: [PATCH 08/10] more minor changes in favor of consistency --- internal/cli/completion.go | 2 +- internal/cli/custom_domains.go | 14 +++++++------- internal/cli/roles.go | 12 ++++++------ internal/cli/root.go | 8 ++++++-- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/internal/cli/completion.go b/internal/cli/completion.go index f4a554b9f..4de0aabb2 100644 --- a/internal/cli/completion.go +++ b/internal/cli/completion.go @@ -9,7 +9,7 @@ import ( func completionCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", - Short: "generate completion script", + Short: "Setup autocomplete features for this CLI on your terminal", Long: `To load completions: Bash: diff --git a/internal/cli/custom_domains.go b/internal/cli/custom_domains.go index 910dfdf1d..32881ffd6 100644 --- a/internal/cli/custom_domains.go +++ b/internal/cli/custom_domains.go @@ -11,7 +11,7 @@ import ( func customDomainsCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "custom-domains", - Short: "manage resources for custom-domains.", + Short: "Manage resources for custom-domains", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -27,11 +27,11 @@ func customDomainsCmd(cli *cli) *cobra.Command { func customDomainsListCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "Get custom domains configurations", + Short: "List custom domains configurations", Long: ` Retrieve details on custom domains. - $ auth0 custom-domains list + auth0 custom-domains list `, RunE: func(cmd *cobra.Command, args []string) error { @@ -68,7 +68,7 @@ Create a new custom domain. Note: The custom domain will need to be verified before it will accept requests. - $ auth0 custom-domain create --domain example.org --type auth0_managed_certs --type txt + auth0 custom-domain create --domain example.org --type auth0_managed_certs --type txt `, RunE: func(cmd *cobra.Command, args []string) error { @@ -124,7 +124,7 @@ func customDomainsDeleteCmd(cli *cli) *cobra.Command { Long: ` Delete a custom domain and stop serving requests for it. - $ auth0 custom-domains delete --custom-domain-id myCustomDomainID + auth0 custom-domains delete --custom-domain-id myCustomDomainID `, RunE: func(cmd *cobra.Command, args []string) error { @@ -165,7 +165,7 @@ func customDomainsGetCmd(cli *cli) *cobra.Command { Long: ` Retrieve a custom domain configuration and status. - $ auth0 custom-domain get --custom-domain-id myCustomDomainID + auth0 custom-domain get --custom-domain-id myCustomDomainID `, RunE: func(cmd *cobra.Command, args []string) error { @@ -225,7 +225,7 @@ Learn more about verifying custom domains that use Auth0 Managed certificates: Learn more about verifying custom domains that use Self Managed certificates: - https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership - $ auth0 custom-domain verify --custom-domain-id myCustomDomainID + auth0 custom-domain verify --custom-domain-id myCustomDomainID `, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/internal/cli/roles.go b/internal/cli/roles.go index de3cebd47..d73f4e778 100644 --- a/internal/cli/roles.go +++ b/internal/cli/roles.go @@ -11,7 +11,7 @@ import ( func rolesCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "roles", - Short: "manage resources for roles.", + Short: "Manage resources for roles", } cmd.SetUsageTemplate(resourceUsageTemplate()) @@ -28,7 +28,7 @@ func rolesListCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", Short: "List all roles", - Long: `$ auth0 roles list + Long: `auth0 roles list Retrieve filtered list of roles that can be assigned to users or groups `, @@ -59,7 +59,7 @@ func rolesGetCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "get", Short: "Get a role", - Long: `$ auth0 roles get --role-id myRoleID + Long: `auth0 roles get --role-id myRoleID Get a role `, @@ -109,7 +109,7 @@ func rolesDeleteCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "delete", Short: "Delete a role", - Long: `$ auth0 roles delete --role-id myRoleID + Long: `auth0 roles delete --role-id myRoleID Delete a role. `, @@ -151,7 +151,7 @@ func rolesUpdateCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "update", Short: "Update a role", - Long: `$ auth0 roles update --role-id myRoleID --name myName --description myDescription + Long: `auth0 roles update --role-id myRoleID --name myName --description myDescription Update a role. `, @@ -210,7 +210,7 @@ func rolesCreateCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "create", Short: "Create a role", - Long: `$ auth0 roles create --name myName --description myDescription + Long: `auth0 roles create --name myName --description myDescription Create a new role. `, diff --git a/internal/cli/root.go b/internal/cli/root.go index efe4ce838..f8f8f9940 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -52,10 +52,12 @@ func Execute() { rootCmd.PersistentFlags().BoolVar(&cli.force, "force", false, "Skip confirmation.") - + rootCmd.PersistentFlags().BoolVar(&cli.noInput, "no-input", false, "Disable interactivity.") + // order of the comamnds here matters + // so add new commands in a place that reflect its relevance or relation with other commands: rootCmd.AddCommand(loginCmd(cli)) rootCmd.AddCommand(clientsCmd(cli)) rootCmd.AddCommand(apisCmd(cli)) @@ -64,10 +66,12 @@ func Execute() { rootCmd.AddCommand(rulesCmd(cli)) rootCmd.AddCommand(actionsCmd(cli)) rootCmd.AddCommand(connectionsCmd(cli)) - rootCmd.AddCommand(completionCmd(cli)) rootCmd.AddCommand(rolesCmd(cli)) rootCmd.AddCommand(customDomainsCmd(cli)) + // keep completion at the bottom: + rootCmd.AddCommand(completionCmd(cli)) + // TODO(cyx): backport this later on using latest auth0/v5. // rootCmd.AddCommand(actionsCmd(cli)) // rootCmd.AddCommand(triggersCmd(cli)) From bb141cfe21b8944a869106270cb3da8ca0ed1473 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 12:55:50 -0300 Subject: [PATCH 09/10] fix merge --- internal/cli/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/actions.go b/internal/cli/actions.go index f4090742d..c24b6d8a2 100644 --- a/internal/cli/actions.go +++ b/internal/cli/actions.go @@ -99,7 +99,7 @@ func testActionCmd(cli *cli) *cobra.Command { var payload = make(management.Object) cmd := &cobra.Command{ - Use: "test" + Use: "test", Short: "Test an action draft against a payload", Long: `auth0 actions test --name --file `, RunE: func(cmd *cobra.Command, args []string) error { From 0a94c7dcd3301d8b7cd52c215dd2d02c580507da Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Wed, 27 Jan 2021 14:36:58 -0300 Subject: [PATCH 10/10] solve merge conflicts --- internal/cli/rules.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/rules.go b/internal/cli/rules.go index e61f66819..4794fea3d 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -39,8 +39,8 @@ func rulesCmd(cli *cli) *cobra.Command { func listRulesCmd(cli *cli) *cobra.Command { cmd := &cobra.Command{ Use: "list", - Short: "List rules", - Long: `List the rules in the current tenant`, + Short: "List your rules", + Long: `List the rules in your current tenant.`, RunE: func(cmd *cobra.Command, args []string) error { var rules *management.RuleList err := ansi.Spinner("Loading rules", func() error {