func GetSubCommands() []*cobra.Command {
	var getServicesRoutes = &cobra.Command{
		Use:  "service-routes",
		RunE: actionGetServicesRoutes,
		ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
			project, check := utils.GetProjectID()
			if !check {
				utils.LogDebug("Project not specified in flag", nil)
				return nil, cobra.ShellCompDirectiveDefault
			}
			obj, err := GetServicesRoutes(project, "service-route", map[string]string{})
			if err != nil {
				return nil, cobra.ShellCompDirectiveDefault
			}
			var ids []string
			for _, v := range obj {
				ids = append(ids, v.Meta["id"])
			}
			return ids, cobra.ShellCompDirectiveDefault
		},
	}
	var getServicesRole = &cobra.Command{
		Use:  "service-role",
		RunE: actionGetServicesRole,
		ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
			switch len(args) {
			case 0:
				project, check := utils.GetProjectID()
				if !check {
					utils.LogDebug("Project not specified in flag", nil)
					return nil, cobra.ShellCompDirectiveDefault
				}
				objs, err := GetServicesRole(project, "service-role", map[string]string{})
				if err != nil {
					return nil, cobra.ShellCompDirectiveDefault
				}
				var serviceIds []string
				for _, v := range objs {
					serviceIds = append(serviceIds, v.Meta["serviceId"])
				}
				return serviceIds, cobra.ShellCompDirectiveDefault
			case 1:
				project, check := utils.GetProjectID()
				if !check {
					utils.LogDebug("Project not specified in flag", nil)
					return nil, cobra.ShellCompDirectiveDefault
				}
				objs, err := GetServicesRole(project, "service-role", map[string]string{})
				if err != nil {
					return nil, cobra.ShellCompDirectiveDefault
				}
				var roleID []string
				for _, v := range objs {
					roleID = append(roleID, v.Meta["roleId"])
				}
				return roleID, cobra.ShellCompDirectiveDefault
			}
			return nil, cobra.ShellCompDirectiveDefault
		},
	}
	var getServicesSecrets = &cobra.Command{
		Use:               "secrets",
		RunE:              actionGetServicesSecrets,
		ValidArgsFunction: secretsAutoCompleteFun,
	}
	var getServices = &cobra.Command{
		Use:  "services",
		RunE: actionGetServices,
		ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
			switch len(args) {
			case 0:
				project, check := utils.GetProjectID()
				if !check {
					utils.LogDebug("Project not specified in flag", nil)
					return nil, cobra.ShellCompDirectiveDefault
				}
				objs, err := GetServices(project, "service", map[string]string{})
				if err != nil {
					return nil, cobra.ShellCompDirectiveDefault
				}
				var serviceIds []string
				for _, v := range objs {
					serviceIds = append(serviceIds, v.Meta["serviceId"])
				}
				return serviceIds, cobra.ShellCompDirectiveDefault
			case 1:
				project, check := utils.GetProjectID()
				if !check {
					utils.LogDebug("Project not specified in flag", nil)
					return nil, cobra.ShellCompDirectiveDefault
				}
				objs, err := GetServices(project, "service", map[string]string{})
				if err != nil {
					return nil, cobra.ShellCompDirectiveDefault
				}
				var versions []string
				for _, v := range objs {
					versions = append(versions, v.Meta["version"])
				}
				return versions, cobra.ShellCompDirectiveDefault
			}
			return nil, cobra.ShellCompDirectiveDefault
		},
	}
	return []*cobra.Command{getServicesRoutes, getServicesSecrets, getServices, getServicesRole}
}
GetSubCommands is the list of commands the services module exposes
package services
import (
	"github.com/spf13/cobra"
	"github.com/spaceuptech/space-cloud/space-cli/cmd/utils"
)
func GenerateSubCommands() []*cobra.Command {
	var generateService = &cobra.Command{
		Use:     "service [path to config file]",
		RunE:    actionGenerateService,
		Aliases: []string{"services"},
		Example: "space-cli generate service config.yaml --project myproject --log-level info",
	}
	var generateServiceRoute = &cobra.Command{
		Use:     "service-route [path to config file]",
		RunE:    actionGenerateServiceRoute,
		Aliases: []string{"service-route"},
		Example: "space-cli generate service-route config.yaml --project myproject --log-level info",
	}
	var generateServiceRole = &cobra.Command{
		Use:     "service-role [path to config file]",
		RunE:    actionGenerateServiceRole,
		Aliases: []string{"service-roles"},
		Example: "space-cli generate service-role config.yaml --project myproject",
	}
	return []*cobra.Command{generateService, generateServiceRoute, generateServiceRole}
}