A portable device for in situ metrology of synchrotron X-ray mirrors based on the near-field speckle scanning technique has been developed. Ultra-high angular sensitivity is achieved by scanning a piece of abrasive paper or filter membrane in the X-ray beam. In addition to the compact setup and ease of implementation, a user-friendly graphical user interface has been developed to ensure that optimizing active X-ray mirrors is simple and fast. The functionality and feasibility of this device have been demonstrated by characterizing and optimizing X-ray mirrors.