google-health-cli

Query and manage Google Health API data types with deterministic JSON output.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill google-health-cli-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-health-cli
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/google-health-cli
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill google-health-cli-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Accessing personal health data like steps, heart rate, sleep, and weight from Google Health requires writing custom API integration code with OAuth handling, pagination, and aggregation logic. This Skill provides a ready-made CLI that agents and developers can use to read, write, and export 40+ health data types without building that plumbing themselves. ## Core Features & Use Cases - Health Data Reading: Query steps, heart rate, exercise, sleep, weight, SpO2, HRV, blood glucose, and nutrition with list, rollup, and daily-rollup operations returning structured JSON. - Health Data Writing: Create, update, and delete exercise sessions, sleep records, and weight entries through simple CLI commands. - Agent-Friendly Output: Deterministic JSON responses, documented exit codes, dry-run mode, and jq-compatible output for reliable automation. - Use Case: Build a daily health dashboard script that fetches today's step totals via daily-rollup, computes average heart rate, and retrieves the latest weight measurement, all parsed with jq. ## Quick Start Ask the agent to set up ghealth authentication and then fetch your daily step totals for the past week using the Google Health CLI.

Frequently Asked Questions about google-health-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get my daily step count from Google Health API?▼

Use the daily-rollup operation: ghealth data steps daily-rollup --from 2026-03-22 --to 2026-03-29. The plain list command returns time intervals without totals, so daily-rollup is required to get actual countSum values per day.

How to authenticate a CLI with Google Health API?▼

Run ghealth setup for an interactive walkthrough covering GCP project ID, OAuth client secret, and browser login. For CI or headless environments, use ghealth setup with --no-prompt flags or the non-interactive auth login flow with a completion code.

What health data types does Google Health API support?▼

The CLI supports 40+ verified types including steps, heart rate, exercise, sleep, weight, distance, oxygen saturation, heart rate variability, ECG, blood glucose, and nutrition logs. Run ghealth schema types to list all available types and their operations.

Can I export exercise data from Google Health to CSV?▼

Yes, use ghealth data exercise export-tcx --id <id> --output ride.csv --as csv. The CSV includes time, latitude, longitude, altitude, distance, heart rate, cadence, speed, and watts columns, and can stream to stdout for piping.

Why does my Google Health query return empty results?▼

Empty results usually come from wrong date ranges, using list instead of daily-rollup for interval types, missing OAuth scopes, or unsynced device data. Verify scopes with ghealth auth status and check available types with ghealth schema types.

How should missing health data days be handled in averages?▼

Missing dates mean the device was not worn or synced and must be treated as no data, never as zero. Only an explicit countSum of "0" represents a true zero-activity day, and averaging absent days as zeros silently deflates statistics.