[FR] Passing data about parameters

A number of front ends implement tab autocomplete for gcode commands, if klipper were to make available metadata about what parameters a command accepts, downstream tools could implement more user friendly behavior. This would probably manifest as a new optional argument to register_command that takes info about args, and makes that available over the UDS either as an extension to gcode/help, or as a separate endpoint (to make backwards compat easier)

Not every command uses the PARAM=value format, so this would need to be optional on a per-command basis, and a human-readable explation of the syntax (like the SYNOPSIS style in manpages) would be nice to have, in addition to a machine-parsable structure.

Already being discussed here: gcode: expose status with available commands by pedrolamas · Pull Request #6393 · Klipper3d/klipper · GitHub

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.