package cmdline

import (
	"github.com/spf13/cobra"
	"gitlink.org.cn/cloudream/jcs-pub/client/internal/services"
)

type CommandContext struct {
	svc *services.Service
}

var RootCmd = cobra.Command{}

func GetCmdCtx(cmd *cobra.Command) *CommandContext {
	return cmd.Context().Value("cmdCtx").(*CommandContext)
}

func RootExecute() {
	RootCmd.Execute()
}
