Found out Wolfram Engine is available for private use and available on
homebrew for installation.
On first run of
wolframscript, I saw this error:
$ wolframscript A WolframKernel location could not be determined. Use -configure to set WOLFRAMSCRIPT_KERNELPATH. Alternatively, export WolframKernel=/yourpath/WolframKernel. If you have no Wolfram product currently installed, the free Wolfram Engine for developers can be downloaded at https://www.wolfram.com/engine/.
I put these two lines into a file named
#!/usr/bin/env wolframscript Print[2+2]
I Set the Kernel path, and tried to execute the file -
~ export WolframKernel="/Applications/Wolfram Engine.app/Contents/MacOS/WolframKernel" ➜ ~ wolframscript file.wls Your Wolfram Engine installation is not activated or is experiencing a license-related problem. Please run wolframscript with the -activate option, and then try your original wolframscript command again.
It appears I had not activated the Wolfram engine. Launching “Wolfram Engine” from the MacOS Spotlight search, i was prompted to enter the worlfram id. I visited https://wolfram.com/engine/free-license to get a license
After this I had to enter my worlfran username (my email), and password to activate the license:
Getting back to writing a script:
$ wolframscript file.wls 4
This page - https://www.wolfram.com/wolframscript/ is a starting point to learn more about wolframscript.
-cloudargument to the script to execute the program in wolfram cloud. The wolfram basic account gives you 200 credit. This page service-credits tells you how the credits are used. On the same page, you can also see how much credits cost (eg: 500 credits for $3). Novel (to me) model of charging for “cloud computing”.
See also: Stephen Wolfram