Home/News/Google Health API Gets Open-Source CLI Tool ghealth
MarkTechPost2 min read

Google Health API Gets Open-Source CLI Tool ghealth

An open-source command-line interface (CLI) tool named ghealth has been released to provide access to the Google Health API v4. This API serves as the successor to the Fitbit Web API and requires developers to use Google OAuth 2.0. The ghealth tool, developed as a single Go binary under the Apache 2.0 license, aims to make health data accessible for terminals and AI agents.

ghealth wraps the Google Health API v4, offering structured JSON output for 40 verified data types. This design facilitates the integration of health metrics such as sleep, heart rate, and step data into AI agent contexts. The tool is explicitly designed with AI agents in mind, providing simplified JSON with a stable structure, deterministic exit codes, and flags like `--dry-run` and `--raw`. The project's GitHub repository includes two Agent Skills files, detailing authentication, setup, and all 40 data types and their operations.

The 40 data types encompass a wide range of signals from Fitbit and Pixel Watch devices. Examples include steps, heart-rate, sleep, weight, oxygen-saturation, and heart-rate-variability. Specialized clinical data, such as electrocardiograms, require specific scopes like `ecg.readonly`. Each data type supports various operations, including `list`, `rollup`, `daily-rollup`, and `reconcile`. For certain types like exercise, sleep, and weight, operations such as `create`, `update`, and `delete` are also available. The `reconcile` operation is designed to merge overlapping data points from different sources, mirroring the Reconciled Stream feature in the v4 API.

Original source — read the full reporting at the publisher:

Read on MarkTechPost

Read next