cli: add --format flag to facilitate JSON output
0.3.5