Reference

gohealthcli export

Render one of the curated normalised datasets (daily-steps, heart-rate-samples, resting-heart-rate-by-day, sleep-sessions, exercise-sessions, weight-samples, and many more) from the Health Archive. Exports are read-only; nothing in the archive is mutated.

Run gohealthcli export --help to see the full list of supported datasets, sorted alphabetically. If you pass a name that does not exist, the error message includes the closest matches (Levenshtein ≤ 3, top 3) and a pointer back to export --help.

Exactly one of --output PATH or --stdout must be supplied — the explicit destination prevents an accidental terminal dump of a long export.

--json is a Common Flag Set synonym for --format jsonl; --plain is a synonym for --format csv. Passing a synonym alongside a contradictory --format value (--json --format csv, --plain --format jsonl) fails with a --<synonym> conflicts with --format <value> error. --plain --json together fails with the documented mutual-exclusion error from the Common Flag Set seam.

#Usage

gohealthcli export <dataset>

#Flags

FlagTypeDefaultDescription
--configstringconfig file path
--dbstringSQLite Health Archive path
--jsonboolfalsesynonym for --format jsonl
--plainboolfalsesynonym for --format csv
--no-inputboolfalseaccepted for uniformity; export does no prompting
--formatstringcsvexport format: csv or jsonl (synonyms: --json → jsonl, --plain → csv)
--outputstringwrite export to path
--stdoutboolfalsewrite export data to stdout