  A robust method for producing half-cycle - few-cycle pulses in mid-infrared
to extreme ultraviolet spectral ranges is proposed. It is based on coherent
undulator radiation of relativistic ultrathin electron layers, which are
produced by microbunching of ultrashort electron bunches by a TW power laser in
a modulator undulator. According to our numerical calculations it is possible
to generate as short as 10 nm long electron layers in a single-period modulator
undulator having an undulator parameter of only K=0.25 and which is
significantly shorter than the resonant period length. By using these electron
layers the production of carrier-envelope-phase stable pulses with up to a few
nJ energy and down to 30 nm wavelength and 70 as duration is predicted.
