I don’t know if it’s working with PATH (it’s a shared library or module). This is only to test if it’s worthwhile, so just temporarily replace it in /usr/bin. If it’s working with your script, you probably want to compile a more modified version.
Now, this has limitations, like coordinates are truncated or rounded, and it doesn’t change the symbol libraries. While the code is still there, it has not been tested and might even crash if a new feature of KiCad 6 is used…