Last summer I built a small CNC controlled machine (ShapeOko2) for my prototypes. The software that is controlling the machine is GRBL which runs on an Arduino UNO. Download and open sketch from GitHub and load to your Arduino, nothing to be configured. Before building my machine I had that software running on my Baby-O as this has the same processor.
For sending instructions to the Arduino UNO I use Universal Gcode Sender, this also has a manual interface where you can order the machine to move a certain number of steps. You need to set the number of steps per inch in this interface.
The stepper output is connected to the Pololu DRV8825 which handles the power to your stepper motor. Follow the Pololu instructions carefully.
If you have only one axis to control you can make a couple of loops with delay_ms and a fixed number of steps in a specific direction. Something like:
if button A is pushed, then 10 steps forward
if button B is pushed, then 20 steps forward
if button C is pushed, then 30 steps backward