Exporting FFT result like GIMP plugin

Yes, actually all filters in the G’MIC plug-in for GIMP are defined by their own G’MIC commands, and these commands are not documented (yet). In the plug-in, you can get the exact command invoked for a specific filter, by setting the option Output messages... to Verbose (layer name), then apply the filter. The layer name of your output image contains the G’MIC command that has been called by the plug-in. It’s easy then to reproduce exactly what the plug-in does.

So, for your first question, yes, the first command argument means direct or inverse transform, in this context.
For your second question : the extra lines added are used to store the value range of the image, so that the invert transform can manage the real floating point values of the FFT, instead of the one stored as a 8bits image.