Recent advances in semiconductor lasers and nonlinear optical materials permit construction of compact sensors that can measure trace air contaminants with high precision in real time, without sampling. A portable prototype sensor was built and tested in laboratory and field environments. This spectroscopic instrument measures carbon monoxide (CO) at concentrations between 0.1 and 10 ppm in air with 0.001 ppm precision, and 10-second response time. It uses 4.6-μm difference-frequency generation in periodically-poled lithium niobate (PPLN), pumped by two compact solid-state lasers. The sensor was used to measure the CO concentration profiles in chamber air during the Lunar-Mars Life Support Test Project (LMLSTP) Phase IIA test at NASA JSC. It is proposed to modify the instrument to measure several gases simultaneously, including formaldehyde. Projected use of fiber-coupled diode lasers and waveguide PPLN will permit development of a commercially viable, field-ready instrument.