Coronal mass ejections (CMEs) are the largest-scale eruptive phenomena in the solar system. Associated with enormous plasma ejections and energy releases, CMEs have an important impact on the solar–terrestrial environment. Accurate predictions of the arrival times of CMEs at the Earth depend on precise measurements of their 3D velocities, which can be achieved by using simultaneous line-of-sight (LOS) and plane-of-sky (POS) observations. Besides the POS information from routine coronagraph and extreme-ultraviolet (EUV) imaging observations, spectroscopic observations could unveil the physical properties of CMEs, including their LOS velocities. We propose that spectral line asymmetries measured by Sun-as-a-star spectrographs can be used for routine detections of CMEs and estimations of their LOS velocities during their early propagation phases. Such observations can also provide important clues for the detection of CMEs on other solar-like stars. However, few studies have concentrated on whether we can detect CME signals and accurately diagnose CME properties through Sun-as-a-star spectral observations. In this work, we construct a geometric CME model and derive the analytical expressions for full disk-integrated EUV line profiles during CMEs. For different CME properties and instrumental configurations, the full disk-integrated line profiles are synthesized. We further evaluate the detectability and diagnostic potential of CMEs from the synthetic line profiles. Our investigations provide important constraints on the future design of Sun-as-a-star spectrographs for CME detections through EUV line asymmetries.