/usr/local/bin/octoprint -s http://octopi.local -k a2WEL2J32LHJ2LJ2LK2J -g "[output_filepath]" When you print, click Save Toolpaths to Disk and save the gcode file ...