more CLI options, better JSON output