Command line compiler

Is there anyway to compile code from the command line, I see the 12 year old feedback request asking for it and it got to rank 7. I don’t mind loading the IDE in the background to compile a program, is this possible. It does not need to be headless?

yes
using IDE scripting
Phillipe Casgrain has done a talk on this
There may be other resources mentioned on that case