I recently wrote about using Klipper to drive my 3D printers ... options and other things you can do in the “Adding a host module” section of the code overview documentation.