[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80488":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":17,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":14,"starSnapshotCount":14,"syncStatus":12,"lastSyncTime":32,"discoverSource":33},80488,"Google-Health-CLI","rudrankriyam\u002FGoogle-Health-CLI","rudrankriyam","Unofficial Google-Health-CLI for the Google Health API, written in Go",null,"Go",59,2,60,0,1.43,"MIT License",false,"main",[20,21,22,23,24,25,26,27,28],"agents","cli","fitbit","golang","google-health","google-health-api","health-data","oauth2","quantified-self","2026-06-12 02:04:03","# Google-Health-CLI\n\n[![PR Checks](https:\u002F\u002Fgithub.com\u002Frudrankriyam\u002FGoogle-Health-CLI\u002Factions\u002Fworkflows\u002Fpr-checks.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frudrankriyam\u002FGoogle-Health-CLI\u002Factions\u002Fworkflows\u002Fpr-checks.yml)\n[![Release](https:\u002F\u002Fgithub.com\u002Frudrankriyam\u002FGoogle-Health-CLI\u002Factions\u002Fworkflows\u002Frelease.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frudrankriyam\u002FGoogle-Health-CLI\u002Factions\u002Fworkflows\u002Frelease.yml)\n\nUnofficial Google-Health-CLI for the Google Health API, written in Go.\n\nThe CLI ships as `ghealth` and gives you OAuth setup, data queries, rollups, profile and settings access, webhook subscriber management, and predictable JSON for scripts and agents.\n\n## Install\n\n```sh\nbrew install rudrankriyam\u002Ftap\u002Fghealth\n```\n\nOr install with Go:\n\n```sh\ngo install github.com\u002Frudrankriyam\u002FGoogle-Health-CLI@latest\n```\n\nCheck your setup:\n\n```sh\nghealth doctor\n```\n\n## Quick Start\n\n```sh\nghealth types list\nghealth types describe heart-rate-variability\nghealth endpoints list\nghealth agent manifest\n```\n\nTo call Google Health data, configure OAuth first:\n\n```sh\nghealth config set client-id YOUR_CLIENT_ID\nghealth config set client-secret YOUR_CLIENT_SECRET\nghealth auth login\n```\n\nEnvironment variables are supported too:\n\n```sh\nexport GHEALTH_CLIENT_ID=...\nexport GHEALTH_CLIENT_SECRET=...\nghealth auth login\n```\n\nRead-only scopes are requested by default. Use write scopes only when you need to create, update, or delete data:\n\n```sh\nghealth auth login --write\n```\n\n## Examples\n\nList heart-rate data:\n\n```sh\nghealth data list heart-rate \\\n  --from 2026-05-08T00:00:00Z \\\n  --to 2026-05-09T00:00:00Z \\\n  --json\n```\n\nReconcile sleep data:\n\n```sh\nghealth data reconcile sleep \\\n  --from 2026-05-01T00:00:00Z \\\n  --to 2026-05-09T00:00:00Z \\\n  --family users\u002Fme\u002FdataSourceFamilies\u002Fall-sources\n```\n\nRoll up daily steps:\n\n```sh\nghealth rollup daily steps \\\n  --from 2026-05-01 \\\n  --to 2026-05-09 \\\n  --window-days 1\n```\n\nRead profile, settings, and identity:\n\n```sh\nghealth profile get\nghealth settings get\nghealth identity get\n```\n\nManage webhook subscribers:\n\n```sh\nghealth subscribers list --project YOUR_PROJECT_ID\nghealth subscribers create --project YOUR_PROJECT_ID --subscriber-id my-sub --file subscriber.json\nghealth subscribers patch --name projects\u002FYOUR_PROJECT_ID\u002Fsubscribers\u002Fmy-sub --update-mask endpoint_uri --file subscriber.json\nghealth subscribers delete --name projects\u002FYOUR_PROJECT_ID\u002Fsubscribers\u002Fmy-sub --yes\n```\n\nUse the raw API escape hatch:\n\n```sh\nghealth api GET \u002Fv4\u002Fusers\u002Fme\u002Fprofile --json\n```\n\n## Output\n\n`ghealth` uses table output in an interactive terminal and JSON when output is piped. You can force an output format:\n\n```sh\nghealth types list --format table\nghealth types list --format markdown\nghealth data list steps --format ndjson\nghealth data list steps --format csv\nghealth data list steps --json --pretty\n```\n\n## Agent Commands\n\nThese commands are designed for tools that need stable machine-readable context:\n\n```sh\nghealth agent manifest\nghealth agent capabilities\nghealth agent schema --type sleep\nghealth agent context today\n```\n\nDestructive commands require `--yes`. API failures use stable exit codes so automation can branch cleanly.\n\n## API Coverage\n\n`ghealth` tracks the documented Google Health v4 surface:\n\n- 31 data types\n- 18 REST methods\n- profile, settings, identity, data points, rollups, TCX export, and webhook subscribers\n\nSee [Endpoint Coverage](docs\u002Fendpoint-coverage.md).\n\n## Development\n\n```sh\ngo test .\u002F...\ngo build .\u002F...\n```\n\nReleases are tag-driven through GoReleaser:\n\n```sh\ngit tag 1.0.0\ngit push origin 1.0.0\n```\n","Google-Health-CLI 是一个非官方的命令行工具，用于与 Google Health API 交互，使用 Go 语言编写。它提供了包括 OAuth 配置、数据查询和汇总、用户配置文件访问以及 Webhook 订阅管理等核心功能，并支持以 JSON 格式输出结果以便于脚本处理。该工具适合需要从 Google Health 获取或管理健康数据的应用场景，如个人健康管理、研究分析或是开发集成 Google 健康数据的服务。通过简单的命令即可完成复杂的数据操作任务，非常适合开发者快速上手使用。","2026-06-11 04:00:56","CREATED_QUERY"]