As a follow up to this, now I am wondering if there is a way to execute/evaluate a prolog predicate/expression straight from the shell, something like this:
$ swipl --eval "-:pack_install(something)"
Is something like that possible? Like in node.js, you can do:
$ node -e "console.log('hello world');"
And it will load up node, evaluate the expression, and close.
How do you do the equivalent in prolog?