package cli import "github.com/spf13/cobra" func newCoreCmd() *cobra.Command { cmd := &cobra.Command{ Use: "core", Short: "Manage scientific-surfing core components", } cmd.AddCommand(newCoreUpdateCmd()) return cmd } func newCoreUpdateCmd() *cobra.Command { var version string var force bool c := &cobra.Command{ Use: "update", Short: "Update scientific-surfing core components", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { m, err := newManagers("", "", "") if err != nil { return err } m.Core.Update(version, force) return nil }, } c.Flags().StringVar(&version, "version", "", "Specific version to download (e.g., v1.18.5). If not specified, downloads latest") c.Flags().BoolVar(&force, "force", false, "Force update even if binary already exists") return c }