An electrochemical cell for in operando studies of lithium/sodium batteries using a conventional x-ray powder diffractometer.