Wish I could expand more but here are some pointers:
"Alpha" aka opacity is effectively channel 3 in G'MIC (channels 0-2 being RGB if we're treating the image as an RGBA, note G'MIC itself makes no distinction about what's in the channels - only that it has them).
You can split the channels of a 3 channel image to separate images using -split[-1] c and rejoin with -append[-3--1] c.
So if we have an image which is RGB and want to make a 4th channel where R=255:
-split[-1] c --eq[-3] 255 -append[-4--1] c
Note there are faster/more memory efficient ways of doing this but best to start simple.
Some other commands which may be relevant to your task (not saying you should be limited to them!):
-gt -lt -inrange -tones -quantize -equalize -select_color