We present a new algorithm for precision radial velocity (pRV) measurements, a line-by-line (LBL) approach designed to handle outlying spectral information in a simple but efficient manner. The effectiveness of the LBL method is demonstrated on two data sets, one obtained with SPIRou on Barnard’s star, and the other with the High Accuracy Radial velocity Planet Searcher (HARPS) on Proxima Centauri. In the near-infrared, the LBL provides a framework for meters-per-second-level accuracy in pRV measurements despite the challenges associated with telluric absorption and sky emission lines. We confirm with SPIRou measurements spanning 2.7 yr that the candidate super-Earth on a 233 day orbit around Barnard’s star is an artifact due to a combination of time sampling and activity. The LBL analysis of the Proxima Centauri HARPS post-upgrade data alone easily recovers the Proxima b signal and also provides a 2σ detection of the recently confirmed 5 day Proxima d planet, but argues against the presence of the candidate Proxima c with a period of 1900 days. We provide evidence that the Proxima c signal is associated with small, unaccounted systematic effects affecting the HARPS-TERRA template-matching radial velocity extraction method for long-period signals. Finally, the LBL framework provides a very effective activity indicator, akin to the FWHM derived from the cross-correlation function, from which we infer a rotation period of
92.1
−
3.5
+
4.2
days for Proxima.