• bitcoinBitcoin(BTC)$61,850.005.03%
  • ethereumEthereum(ETH)$1,706.088.04%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$565.853.78%
  • usd-coinUSDC(USDC)$1.000.01%
  • rippleXRP(XRP)$1.116.32%
  • solanaSolana(SOL)$81.578.23%
  • tronTRON(TRX)$0.3179170.47%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.042.18%
  • HyperliquidHyperliquid(HYPE)$65.783.94%
  • dogecoinDogecoin(DOGE)$0.0752224.67%
  • RainRain(RAIN)$0.015559-0.07%
  • USDSUSDS(USDS)$1.000.03%
  • leo-tokenLEO Token(LEO)$9.08-1.49%
  • zcashZcash(ZEC)$447.7410.29%
  • stellarStellar(XLM)$0.2019502.72%
  • whitebitWhiteBIT Coin(WBT)$55.994.16%
  • cardanoCardano(ADA)$0.1619546.40%
  • moneroMonero(XMR)$314.323.37%
  • chainlinkChainlink(LINK)$7.878.60%
  • CantonCanton(CC)$0.140324-3.05%
  • USD1USD1(USD1)$1.00-0.04%
  • daiDai(DAI)$1.000.00%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.698.84%
  • Ethena USDeEthena USDe(USDE)$1.000.02%
  • bitcoin-cashBitcoin Cash(BCH)$217.945.39%
  • litecoinLitecoin(LTC)$43.554.90%
  • hedera-hashgraphHedera(HBAR)$0.0746817.80%
  • Circle USYCCircle USYC(USYC)$1.130.15%
  • suiSui(SUI)$0.756.58%
  • Global DollarGlobal Dollar(USDG)$1.00-0.01%
  • avalanche-2Avalanche(AVAX)$6.863.69%
  • LABLAB(LAB)$9.13-0.84%
  • paypal-usdPayPal USD(PYUSD)$1.000.02%
  • crypto-com-chainCronos(CRO)$0.0569064.90%
  • shiba-inuShiba Inu(SHIB)$0.0000043.00%
  • nearNEAR Protocol(NEAR)$1.948.83%
  • tether-goldTether Gold(XAUT)$4,119.371.26%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • MemeCoreMemeCore(M)$1.6764.72%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.40%
  • BittensorBittensor(TAO)$217.749.77%
  • uniswapUniswap(UNI)$3.1815.24%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.0590621.08%
  • pax-goldPAX Gold(PAXG)$4,120.791.23%
  • AsterAster(ASTER)$0.653.21%
  • okbOKB(OKB)$80.59-0.05%
  • OndoOndo(ONDO)$0.3378918.59%
  • Ripple USDRipple USD(RLUSD)$1.000.03%
  • HTX DAOHTX DAO(HTX)$0.0000022.56%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

The Google Health API Got a CLI: ghealth is an Open-Source Tool for Your Fitbit Air Data

July 2, 2026
in AI & Technology
Reading Time: 14 mins read
A A
The Google Health API Got a CLI: ghealth is an Open-Source Tool for Your Fitbit Air Data
ShareShareShareShareShare

The Google Health API is the official successor to the Fitbit Web API. It targets the Google Health API v4 and moves developers onto Google OAuth 2.0. Now an open-source CLI command-line tool called ghealth wraps that API for terminals and AI agents.

The tool is a single Go binary under the Apache 2.0 license. It exposes 40 verified data types as structured JSON. That design lets you pipe sleep, heart rate, and step data into an agent’s context.

What is ghealth?

ghealth is a wrapper over the Google Health API v4. You build it from source with go build -o ghealth .. It ships as one self-contained binary.

The tool is explicitly agent-first. Every command returns simplified JSON with a stable shape. It also provides deterministic exit codes, a --dry-run flag, and a --raw flag.

The repository ships two Agent Skills as SKILL.md files. One covers auth, setup, and global flags. The other documents all 40 data types, operations, patterns, and gotchas. Agents install them with npx skills add.

The CLI lives under the Google-Health-API GitHub organization. That organization also hosts long-standing Fitbit open-source repositories.

The Data Surface: 40 Verified Types

The 40 types cover most Fitbit and Pixel Watch signals. Examples include steps, heart-rate, sleep, weight, oxygen-saturation, and heart-rate-variability. Clinical types like electrocardiogram require the ecg.readonly scope.

Each type supports a subset of operations. Common ones are list, rollup, daily-rollup, and reconcile. Writable types (exercise, sleep, weight, body-fat, height) add create, update, and delete.

The reconcile operation merges overlapping data points from multiple sources. That mirrors the Reconciled Stream in the v4 API.

Sleep is a good example for pattern analysis. The default list returns a summary. Adding --detail returns stage-by-stage data (awake, deep, REM). That helps you spot patterns week over week.

Setup: What Actually Happens

Setup runs through one command: ghealth setup. A wizard walks you through the GCP project and OAuth. You create a Desktop-type OAuth client in the Google Cloud Console.

You bring your own OAuth credentials. The tool holds no shared key. Files are written under ~/.config/ghealth/ with file mode 0600. Tokens refresh automatically.

All Google Health API scopes are classified as Restricted. Google requires a privacy and security review for production access. For personal use, you authorize your own project against your own account. The API returns data from Fitbit, Pixel Watch, and connected third-party sources.

The headless flow uses PKCE with an S256 challenge. It also validates a random state parameter on completion.

Hands-On: Commands and Output

Reading data is consistent across types. Every read returns an object with rows under dataPoints.

# Recent heart rate readings
ghealth data heart-rate list --from today --limit 10

# Daily step totals for a week
ghealth data steps daily-rollup --from 2026-03-22 --to 2026-03-29

# Sleep stages for the last five nights
ghealth data sleep list --limit 5 --detail

Step totals return aggregated JSON:

{
  "dataPoints": [
    {"date": "2026-03-28", "countSum": "9037"},
    {"date": "2026-03-27", "countSum": "2408"}
  ]
}

Output is simplified by default. Use --raw for the original API response. Use --format csv or --format table for other shapes. The -o flag writes a file and prints a schema preview.

Pagination is lossless. A large list returns a nextPageToken. You pass it back with --page-token to fetch the next page.

Use Cases With Examples

  • Feed sleep patterns into an agent: Pull several nights with --detail. Pipe the JSON into a Claude Code or Codex session. Ask the agent to summarize deep-sleep trends over the week.
  • Load workouts into pandas: Run ghealth data exercise export-tcx --id --output ride.csv --as csv. Each row is one trackpoint with heart rate and GPS. Then run pd.read_csv on the file.
  • Build a resting heart-rate view: Query daily-resting-heart-rate over 30 days. Emit CSV with --format csv. Chart it in a notebook or a dashboard.

How ghealth Compares

The table below sets ghealth against the raw API and two other CLIs. The other two CLIs both self-identify as unofficial.

Attribute ghealth (this CLI) Google Health API v4 (direct REST) rudrankriyam/Google-Health-CLI googlehealth-cli (npm)
Install git clone + go build None; call HTTP/gRPC yourself Build from Go source npm i -g googlehealth-cli
Language Go, single binary Any Go Node.js
Auth Your own OAuth client, PKCE S256 Google OAuth 2.0 Your own OAuth client Your own OAuth client
Agent output Simplified JSON, exit codes, SKILL.md Raw JSON / gRPC Predictable JSON Stable --json envelope
Data types 40 verified against live API Full v4 surface Tracks documented v4 surface Subset of types
Official status No; community, in Google-Health-API org Yes; Google No; states unofficial No; states unaffiliated

For raw control, the direct REST API is the ground truth. For terminal and agent use, ghealth reduces auth and formatting boilerplate.

Interactive Explainer


Check out the Repo. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us

YOU MAY ALSO LIKE

Amazon Is Ready To Deploy The Leo Satellite Broadband Service

Using Lift to Turn Research PDFs into Structured JSON with Controlled, Schema-Guided Field-Level Evaluation


Michal Sutter is a data science professional with a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michal excels at transforming complex datasets into actionable insights.

Credit: Source link

ShareTweetSendSharePin

Related Posts

Amazon Is Ready To Deploy The Leo Satellite Broadband Service
AI & Technology

Amazon Is Ready To Deploy The Leo Satellite Broadband Service

July 2, 2026
Using Lift to Turn Research PDFs into Structured JSON with Controlled, Schema-Guided Field-Level Evaluation
AI & Technology

Using Lift to Turn Research PDFs into Structured JSON with Controlled, Schema-Guided Field-Level Evaluation

July 1, 2026
Apple’s Hide My Email May Not Be Hiding Anything
AI & Technology

Apple’s Hide My Email May Not Be Hiding Anything

July 1, 2026
Anthropic Redeploys Claude Fable 5 on July 1 After US Export Controls Lift, Adds New Cybersecurity Classifier
AI & Technology

Anthropic Redeploys Claude Fable 5 on July 1 After US Export Controls Lift, Adds New Cybersecurity Classifier

July 1, 2026
Next Post
Sen. Elizabeth Warren presses Eric Trump for update on Capital One de-banking lawsuit

Sen. Elizabeth Warren presses Eric Trump for update on Capital One de-banking lawsuit

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
6-year-old girl bitten by rabid bat while playing outside her Wisconsin home, family says – NBC News

6-year-old girl bitten by rabid bat while playing outside her Wisconsin home, family says – NBC News

July 1, 2026
Stock Market Today: Nasdaq Slips, Warsh Dodges Questions on July Rate Decision — Live Updates – WSJ

Stock Market Today: Nasdaq Slips, Warsh Dodges Questions on July Rate Decision — Live Updates – WSJ

July 1, 2026
F1 Austrian GP: George Russell avoids investigation to take pole after Max Verstappen crash – Motorsport.com

F1 Austrian GP: George Russell avoids investigation to take pole after Max Verstappen crash – Motorsport.com

June 27, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!