JSON output
Most commands accept --json: list, info, usb, test, inspect, bench, rescue,
repair, capacity, format, wipe, selftest and upload -from. It is the interface
SmartDisk for Mac uses.
smartdisk list --json # {"schema":1,"disks":[…]}smartdisk info --json disk0 # {"schema":1,"reports":[…]}sudo smartdisk usb --json disk4 # one event per line: step …, resultsudo smartdisk test --json disk4 -full # progress … (at most 4 per second), resultsmartdisk upload --json -from report.json # {"schema":1,"id":"HA-…","state":"stored",…}- JSON mode never prompts: no disk picker, no upload question. Commands that write take their
confirmation as
-confirm <disk>instead. - Exit codes stay the same (
3BAD,4CAUTION,130interrupted). See Exit codes. - Long-running commands write newline-delimited events:
step,progress, thenresultorerror. - The format is versioned (
"schema": 1). Fields are only ever added.
Every report in info --json (and in the results of usb and selftest) carries capture, the
complete report file. See PDF and JSON reports.