Add export command to CLI and support indenting of the JSON