Klipper for CNC: initiatives and projects list

Hello everyone! I hope you’re spending a nice holiday season.

I’ve noticed that Klipper is quite specific to 3D-printing (which is reasonable), and is missing some basic features for general CNC (i.e. applications at and beyond 3D-printing).

Some of the common CNC features can be implemented as macros (see KCNC), but some can’t.

There are several notable works on those:



Lasers and Milling

Work offsets


GCODE Comments:


Similar topics/initiatives:

Help grow this list :slight_smile:

I’d like to map these efforts in this thread, and ask if people are interested in creating and developing a full Klipper fork meant for CNC-ing. Having it do the same as GRBL would be really cool.

Otherwise, feel free to share here any Klipper forks, modules and macros implementing CNC features :slight_smile:

Help grow this list by commenting below!

Thanks for the space.


Great initiative, I will follow this :slight_smile:

1 Like

Updates: I’ve managed to implement basic G38.2 and G38.3 commands (not macros). They are at my “homing extruder” fork. I guess it needs a rename now.

Having G38.2 and G38.3 and G38.4 and G38.5 simultaneously seems harder. I don’t know how to invert a pin’s logic on the fly. Is it possible?

EDIT: maybe I could add a few arguments to temporarily invert the pin_value in the low-level endstop_home command. Probably by temporarily inverting self._invert of the probe’s MCU_endstop, used here.

Happy probing (?) Let me know if anyone wishes to test it, it should be easy and have lots of room for improvement.

1 Like

Great bit of work.
Many thanks.
Currently building a small but ridged moving gantry CNC.
Discovered the BTT Octopus Pro and was looking for a way to use as a CNC Control board.


Implemented G38.4 and G38.5 too. I ended up re using a triggered argument found in homing_move, which made things really simple.

Release here: Release Added probing with G38.4 G38.5 - Stop probe move on un-trigger · naikymen/klipper-homing-extruder · GitHub

Thanks for pulling the full list together!

I am hoping that the Klipper 3D community is open to expanding the feature set beyond printing so we can minimize the effort of maintaining two different mainlines by forking. If/when work offsets are accepted into the klipper main code base, I was planning on working with the klipper dev community to integrate G38 probing ( I have a branch with an initial implementation so I’ll compare yours and my implementation to see if we can cover all the use cases ).

1 Like

also, be very careful with reusing the phoming logic. it will reset the machine’s origin state and you’ll lose the min/max axis boundary conditions (aka safety checks!)

Yes, wonderful! I’ll be glad to join efforts.

You’ll find tht I’ve added a lot of comments to the source. Tracking down the individual changes in core klipper may be hard; they are relatively few in comparison.

I’ll try to point them out somehow later today, in case it helps.

Thanks, I’ll check again in case I missed something. Designing and writing a few simple tests could be useful.


I have done a 6-axis response (the pull request one shown above). The pull request I made before had to satisfy all the existing configuration files, so I gave up trying to pass it with the current implementation, and the pull request was closed automatically.
However, I have not given up yet and would like to fix the implementation of all 3 axes common to all mechanisms to make it easier to support all 6 axes. After that I would like to add the 6-axis implementations, which I hope to do in the next few weeks.


Thank you for joining the discussion. Your PR is awesome and I’m glad to learn that you’re still interested in working on it. :slight_smile:

Under the idea of a distinct Klipper version for CNC, I would not mind the strict limitation of your first implementation to Cartesian kinematics.

I had been considering two options: (1) including your work as is and deleting the other kinematics (though I would have probably missed CoreXY), or (2) try implementing a multi-toolhead module, synced to the first one just as extruders are in core Klipper.

I don’t currently have a 6-axis machine to test it out, but please let me know if I can help somehow.

sorry, It was a translation mistake. not a few weeks. I will proceed step by step.

1 Like

Hi all!
Really cool initiative!
I’m not software developer, more engineer hardware designer.

I have 4 axis (XYZ B - rotary) CNC milling machine DSP A18 controlled
Really want to modificate it for 5 axis with autoprobing, ATC, and klipper web functional.

I will gladly throw out his native brains and replace them with your firmware compatible ones.

Ready to be a beta tester

Hello all, I really have no business here as I do not have any proper coding experience. But had to say I really appreciate all the work you have done so far, and in the weeks months or years to come I think klipper would be an excellent CNC firmware! I really appreciate klippers ease of settings changes, It makes 3D printing much more enjoyable I would love to one day have this same capability for my MPCNC!


I also am a hobbyist with a MPCNC, but I did fall in love with Klipper when I was upgrading an old delta and would love to have a Klipper variant that can run GRBL-ish commands and will be beta testing once I get time.

I only stopped by to see how far the CnC side had gotten because I just started another complex CnC job where i have to follow the surface of a complex shape. It would be nice to have Klipper with work offsets and probing with a GRBL-ish response so i could use opensource" solutions and not my hacked together codes. I really do think that is a great end goal because its very definable and would add a good chunk of users.

I don’t think this is brought up enough when arguing “what is the value of Klipper having these G codes” but implementing most of the GRBL commands hooks in the base code and having some sort of translator could open up a lot of other front ends for Klipper like CNC.js, UGS. I imagine it would expand the Klipper user base (good chance a lot of V1/MPCNC and Low riders would join). I already tried the MPCNC with Klipper (Last summer) and liked it and started seeing how much I could replicate with klippy-cnc macros (thanks again), but there was just no real support for things I already had with Marlin/Repetier firmware so I reverted back. I never tried pure GRBL because things seem so hard coded and i have both my axis driven separately and software trammed. When I looked into grbl-HAL while absolutely the right direction for GRBL just seemed too daunting unless I buy a pre-made board for it.

Now if i had probes, work offsets, and Cirromulus laser support as baseline that old Pine64 and my current Ramps board would already be cutting chips with Klipper and I would be ordering a laser.
Based on the fact the plane arc curves made it in and the recent forum activity that might happen. :grinning:

1 Like

Really interesting! :smiley:

I’m running Klipper on my 3D printer and love it. Naturally I would like to use it for my CNC project, but I’m going down a dark deep rabbit hole. I want to build a CNC 4 axis foam cutter that converts to a needle cutter for foam board. It’s my all in one RC plane builder. So I’m going to sit back and see how this progresses as I build up the hardware for the project. Hopefully I can contribute something useful.

1 Like

Thanks everyone for commenting!

I spent the day getting three extra “ABC” axes to work, and achieved basic functionality. :tada:

Here is a GIF of the XYZAB axes moving:



G1 X0 Y0 Z0 A0 B0 F2500
G1 X10 Y10 Z10 A10 B10 F2500
G1 X0 Y0 Z0 A0 F2500
G1 X10 Y10 Z10 B0 F2500
G1 X0 Y0 Z0 A10 F2500
G1 X10 Y10 Z10 B10 F2500
G1 X10 Y0 Z0 A0 B0 F2500
G1 X0 Y0 Z0 A0 B0 F2500
G1 X10 Y10 Z10 A10 B10 F2500

I don’t have a C stepper in my machine to test it at the same time.

I’d be excited to collaborate with you on developing these features for Klipper.

Update: This is ready for testing! Changes have been merged to my primary branch, and the repo has a new name: GitHub - naikymen/klipper-for-cnc: Klipper is a 3d-printer firmware, let's use it for CNC and automation too.


Thank you for this list! Here is a link to my project thread: https://klipper.discourse.group/u/batteau62/ Please respond there. I don’t want to hijack this thread.
I’m researching for a project that will be used in prosthetics. I am building a liquid deposition printer. This is my first try at implementing Klipper as firmware. I have done a little code changing in config.h files for my deltas. Code is not my strength.
Here’s a little info on this project. This is a mod of a RatRig 400mm v-core 3.0 to print condensation cure silicone. It uses a syringe(cold paste) extruder, with a non captive size 23 Haydon Kerk Motion Solutions 57mm stepper motor linear actuator. There will not be a hotend or heated bed. In the past when I have played with “cold” extrusion. The firmware always throws errors in safety protocols for thermal runaway. Like “no thermistor detected, startup cancelled” Any insights on config for this subject?
I haven’t received it yet, but the plan is to use a “Pyr0-piezo” as a tool z-probe for the syringe tip. When the reservoir is changed, the tip location changes.
A BLTouch will be used to level the bed.
Any information, insights, advice is very welcome! A basic config.cfg template for paste extrusion would be beyond helpful!
Thanks in advance!

I published a 5-axis kinematics like machining center called trunnion_bc. github and youtube links are below.

1 Like

Hello everyone, I’m making a 4-axis cnc hotwire foam cutter (mybe 5 in the future with a rotary table added). GRBL is one of the alterrnatives but I like so much using klipper in 3d printing that I hope that is possibile to use also per my scope. Anyone experienced with cnc foam cutter?