Command line to run queries on a graph

For some automation scenarios, be able to run a command line datascript query against a graph (a path as input) will allow some interesting things.
I have in mind generating a list of next events to be exported.
Also, if plugins can be integrated with command line it will open more powerful uses.