Run code from terminal [Linux]

I’m not sure that you can achieve what you want to do with Processing source code, but you might be able to do it with java code. I’ve also seen it done with objc on a Mac. Reference: https://docs.groupdocs.com/viewer/java/how-to-create-minimal-java-app/

This is example code that runs on a mac; you’ll have to try it on Linux:

echo 'public class App {
    public static void main(String[] args) {
      System.out.println("Hello, World!");
    }
}
' > App.java | javac -d . App.java | java -classpath . App