You can start ST/X without a graphical user interface in a Read-Eval-Print-Loop (REPL) textual mode with the "-R" command line argument.

Many more scripting options are available and described in the Getting Started document.