MCPcopy Create free account
hub / github.com/auth0/auth0-cli / openAppCmd

Function openAppCmd

internal/cli/apps.go:939–967  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

937}
938
939func openAppCmd(cli *cli) *cobra.Command {
940 var inputs struct {
941 ID string
942 }
943
944 cmd := &cobra.Command{
945 Use: "open",
946 Args: cobra.MaximumNArgs(1),
947 Short: "Open the settings page of an application",
948 Long: "Open an application's settings page in the Auth0 Dashboard.",
949 Example: ` auth0 apps open
950 auth0 apps open <app-id>`,
951 RunE: func(cmd *cobra.Command, args []string) error {
952 if len(args) == 0 {
953 if err := appID.Pick(cmd, &inputs.ID, cli.appPickerOptions()); err != nil {
954 return err
955 }
956 } else {
957 inputs.ID = args[0]
958 }
959
960 openManageURL(cli, cli.Config.DefaultTenant, formatAppSettingsPath(inputs.ID))
961
962 return nil
963 },
964 }
965
966 return cmd
967}
968
969func formatAppSettingsPath(id string) string {
970 if len(id) == 0 {

Callers 1

appsCmdFunction · 0.85

Calls 4

openManageURLFunction · 0.85
formatAppSettingsPathFunction · 0.85
appPickerOptionsMethod · 0.80
PickMethod · 0.45

Tested by

no test coverage detected