Command-line query tool added, not tested