During the last decade, a new generation of space instruments carried out direct measurements of cosmic-ray phenomena with unprecedented precision, significantly expanding the reach of direct observations and discovering unexpected features in the energy spectra of charged cosmic rays. An brief historical introduction on the pioneering era of direct measurements with balloons in the atmosphere is followed by a concise review of state-of-the-art space missions and of their most relevant recent findings, in the framework of current theoretical models of acceleration and propagation of cosmic rays in our galaxy. A glimpse into the future, with a new generation of space missions being planned or at the conceptual stage, is also offered.