add comments to a gcode file

I’ve just written a new command-line tool (CLI), this time in NodeJS/JavaScript but as usual, it’s open-source. The program will create a new version of your 3D printer’s GCODE file, adding comments along the way which describe what each command does.


I would suggest that it’s best to install it somewhere in your path and then you should be able to just invoke it easily in your working directory where the GCODE file(s) live:


$ gcode-comments file.gcode

;Generated with Cura_SteamEngine 2.3.1
M104 S205            ; Set extruder temperature
M109 S205            ; Set extruder temperature and wait (blocking)
M107                 ; Turn off fan
M205 X10             ; Adjust jerk speed
G1 F2400 E-1         ; Move and/or extrude to the indicated point

Input:  file.gcode
Output: file_commented.gcode