How to use gimp_gmic filters in gmic?

Using Ubuntu.
I have the gimp plugin. Everything works. I want to understand how some of the filters work.
I have gmic installed. Run some of the tutorial scripts.
But I wanted to run the scripts in the gimp filters.
I tried running gimp in a terminal and looking at output, but the commands are not recognised by gmic.
Eg filter brushify.
gmic -input img_1.png -fx_brushify 8,0.25,4,64,25,12,0,2,4,0.2,0.5,30,1,1,1,5,0,0,0.2,0 -d
or
gmic -input img_1.png -fx_brushify_preview 8,0.25,4,64,25,12,0,2,4,0.2,0.5,30,1,1,1,5,0,0,0.2,0 -d
yield
[gmic]-1./ *** Error *** Unknown command or filename ‘-fx_brushify’.

The output from gimp is (partially)
-v -99 -fx_brushify_preview 8,0.25,4,64,25,12,0,2,4,0.2,0.5,30,1,1,1,5,0,0.2,0

Alternatively, it would be nice to find the .gmic files for some of the filters, but I can’t find a link anywhere.

What am I missing?

To understand what commands do, ask on the forum or consult:

Maybe there is something wrong with your installation because the first command works for me. Commands that contain _preview are meant for GIMP, not command line G’MIC. See resultant image and output below:

gmic -sp tiger -fx_brushify 8,0.25,4,64,25,12,0,2,4,0.2,0.5,30,1,1,1,5,0,0,0.2,0

[gmic]-0./ Start G'MIC interpreter.
[gmic]-1./sp/_sample/ Input sample image 'tiger' (1 image 750x500x1x3).
[gmic]-1./fx_brushify/_fx_brushify/ Set local variable N='57.600000000000001'.
[gmic]-1./fx_brushify/_fx_brushify/*if/ Input black image at position 1 (1 image 64x64x1x1).
[gmic]-1./fx_brushify/_fx_brushify/*if/ Draw centered gaussian on image [1] with standard deviations (30%,30%) and angle 0 deg.
[gmic]-1./fx_brushify/_fx_brushify/ Compute pointwise euclidean norm of vectors, in image [1].
[gmic]-2./fx_brushify/_fx_brushify/ Resize image [1] to 100%x25%x1x1, with moving average interpolation, dirichlet boundary conditions and alignment (0,0,0,0).
[gmic]-2./fx_brushify/_fx_brushify/ Resize image [1] to 64x64x1x1, with no interpolation, dirichlet boundary conditions and alignment (0.5,0.5,0,0).
[gmic]-1./fx_brushify/_fx_brushify/ Spread pixel of image [1] randomly, with amplitudes (0,0,0).
[gmic]-2./fx_brushify/_fx_brushify/ Blur image [1] with standard deviation 2%, neumann boundary conditions and quasi-gaussian kernel.
[gmic]-2./fx_brushify/_fx_brushify/ Normalize image [1] in range [0,1].
[gmic]-2./fx_brushify/ Set local variable s0='0--3'.
[gmic]-2./fx_brushify/ Set local variable s1='1--2'.
[gmic]-2./fx_brushify/ Set local variable s2='0--2'.
[gmic]-1./fx_brushify/*local/ Brushify image [0], with brush ..
[gmic]-2./fx_brushify/*local/ Remove image [1] (1 image left).
[gmic]-1./ Display image [0] = 'tiger'.
[0] = 'tiger':
  size = (750,500,1,4) [5859 Kio of floats].
  data = (162.51,166.351,167.407,167.93,168.714,169.23,169.829,170.767,167.301,161.532,159.862,159.697,(...),255,255,255,255,255,255,255,255,255,255,255,255).
  min = 0.812372, max = 255, mean = 137.056, std = 77.8583, coords_min = (712,329,0,2), coords_max = (465,98,0,3).

Maybe your version of gmic does not match the version of the plug-in ?
Try $ gmic --version to see the version number, and compare it with the one displayed in the GIMP plug-in title bar.
Otherwise, I guess this should work.

Major version difference was what spooked me at first. Now I know better :slight_smile:

Finally resolved the problem after looking at gmic_stdlib.gmic
I tried: gmic -h brushify
And got brushify unknown

So I found update and ran gmic -up
Next time, gmic -h brushify worked as expected.

Perhaps in the documentation for gmic as a standalone, you highlight the need to run update.
I do not know why I did not get the full library from the start.

Yes that is strange, there is a copy of the latest G’MIC stdlib in the gmic executable (including command -brushify), so it should be available without an update.
Maybe you have compiled gmic by yourself, and the gmic_stdlib.h file was not updated ?
It is recommended to do a make clean before trying to compile, so to get the latest versions of the files CImg.h and gmic_stdlib.h.

I think I installed on Ubuntu using synaptic (or apt install, can’t remember which). Installed version is 1.6.8-3 (I’ve updated to 2.0.1 for gimp plugin).
The Ubuntu distribution separates gimp-gmic, gmic, gmic-zart

So I think it is probably an Ubuntu distribution artifact. Which means you just need to add a note about running update to the Ubuntu instructions