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

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