Reference

gohealthcli init

Initialise a fresh gohealthcli install: write the config file, create the Health Archive on disk, and run the initial schema migration. After init finishes the binary is ready for connect.

--oauth-client-file points at a Google OAuth Desktop-app client JSON downloaded from the Google Cloud console (see the Install page). --secret-provider and --oauth-client-item are an alternative path that pulls the client from a Secret Provider (for example, 1Password) instead of a file.

init never overwrites an existing Health Archive; rerun with a different --db to create a second archive in a separate location.

#Flags

FlagTypeDefaultDescription
--configstringconfig file path
--dbstringSQLite Health Archive path
--jsonboolfalsewrite stable JSON to stdout
--plainboolfalsewrite plain key/value output to stdout
--no-inputboolfalsenever prompt, never wait for browser input
--oauth-client-filestringOAuth client JSON file reference
--secret-providerstringSecret Provider name for OAuth client setup
--oauth-client-itemstringSecret Provider item name for OAuth client setup