Query the wolfram|alpha api from the command line.
If you're unfamiliar with wolfram|alpha, you can read more about it and try it on their website
- curl - for fething data
- jq - for parsing json
You need a free api key form wolfram|alpha.
Put the api key in an env variable named WOLFRAM_APP_ID
or you can use a config file, see config.example.
Download the wac file and put it somewhere in your path and make it executable.
For example:
curl https://raw.githubusercontent.com/Fraasi/wac/main/wac -o ~/.local/bin/wac
and then
chmod +x ~/.local/bin/wac
and you're good to go.
$ wac -h
Usage:
wac [options] <your query>
Options:
-d debug (with -f, dump json to result.json)
-f full query mode (default)
-h show this help
-s spoken mode
-t show tips on how to use
-U update wac
-r result mode
-v show version
-w query the web interface