Google-Health-CLI — CLI Tools tool screenshot
CLI Tools

Google-Health-CLI: Best CLI Tools for Devs in 2026

8 min read·

Google-Health-CLI turns Google Health API v4 into deterministic, script-friendly terminal commands with OAuth, rollups, webhook management, and machine-readable output.

Pricing

Open-Source

Tech Stack

Go, Google Health API v4, OAuth2, JSON/NDJSON/CSV output

Target

developers integrating Google Health data

Category

CLI Tools

What Is Google-Health-CLI?

Google-Health-CLI is an API client CLI built by Rudrankriyam in Go for the Google Health API, and it gives developers a terminal-native way to query health data, manage OAuth, inspect profile settings, and automate webhook subscriber workflows. Google-Health-CLI is one of the best CLI Tools tools for developers integrating Google Health data, and the repository documents coverage for 31 data types and 18 REST methods as of Feb 2026. The point is simple: it exposes a stable command surface for scripts and agents instead of forcing every integration through ad hoc HTTP calls.

Quick Overview

AttributeDetails
TypeCLI Tools
Best Fordevelopers integrating Google Health data
Language/StackGo, Google Health API v4, OAuth2, JSON/NDJSON/CSV output
LicenseN/A
GitHub StarsN/A as of Feb 2026
PricingOpen-Source
Last ReleaseN/A

Who Should Use Google-Health-CLI?

  • Backend engineers building Google Health integrations who want a typed command surface instead of hand-rolling REST wrappers.
  • Data platform teams that need repeatable exports, rollups, and reconciliation jobs for sleep, steps, heart rate, and profile data.
  • AI agent builders who need stable machine-readable context from ghealth agent manifest, ghealth agent capabilities, and schema introspection.
  • Healthcare-facing indie hackers validating product ideas against real API responses before wiring a full service layer.

Not ideal for:

  • Non-technical operators who want a GUI-first workflow and do not want to manage OAuth, scopes, and environment variables.
  • Teams outside the Google Health API surface because Google-Health-CLI is tightly scoped to Google Health v4 and will not replace generic API clients.
  • Users who only need one-off manual inspection and prefer a browser-based tool like Postman over a shell utility.

Key Features of Google-Health-CLI

  • OAuth setup with scoped accessghealth auth login handles the authentication flow, and the CLI defaults to read-only scopes until you explicitly add --write. That matters when a service account or personal token should not be over-privileged on day one.
  • Predictable output formats — Google-Health-CLI emits table, markdown, JSON, NDJSON, and CSV depending on the terminal and flags. When stdout is piped, it switches to JSON-friendly output, which makes it easier to chain into jq, xsv, or a CI job.
  • Typed data access commands — the CLI exposes data list, data reconcile, and rollup daily flows with explicit --from and --to windows. That reduces ambiguity around time ranges and keeps the command line close to the underlying API model.
  • Profile, settings, and identity endpointsghealth profile get, ghealth settings get, and ghealth identity get map directly to user-level reads. That is useful when you need to confirm the current account context before running a data migration or sync.
  • Webhook subscriber management — the subscribers commands cover list, create, patch, and delete operations with explicit resource names. This is the right shape for CI automation because destructive calls require --yes and do not depend on an interactive prompt.
  • Agent-oriented commandsghealth agent manifest, ghealth agent capabilities, ghealth agent schema --type sleep, and ghealth agent context today are designed for downstream tools that need stable machine-readable context. If your workflow feeds an orchestrator like OpenSwarm, these commands reduce parsing glue.
  • Raw API escape hatchghealth api GET /v4/users/me/profile --json gives you a direct path for endpoint coverage gaps or debugging. When you need to compare the CLI response with the underlying transport, pair it with OpenTrace to inspect request behavior at the HTTP layer.

Google-Health-CLI vs Alternatives

ToolBest ForKey DifferentiatorPricing
Google-Health-CLIScriptable Google Health automationTyped subcommands, OAuth helpers, agent output, and stable exit codesOpen-Source
cURLRaw HTTP debuggingLowest-level control with no opinionated command modelFree
PostmanManual API explorationGUI collections, visual auth setup, and request historyFreemium
Google Cloud SDKBroader Google platform workCloud admin tooling beyond the Google Health API surfaceFree

Pick cURL when you want exact control over headers, query strings, and raw request bodies. It is the better choice for protocol debugging, but it leaves all endpoint semantics and output shaping on you.

Pick Postman when a GUI is more useful than a terminal and you need to share collections with non-shell users. Google-Health-CLI wins when the output must be piped into scripts, cron jobs, or agent pipelines.

Pick the Google Cloud SDK when your work is mainly about broader Google infrastructure, identity, or project management. It is not a substitute for Google-Health-CLI when the task is specifically Google Health API v4 data access.

If OAuth and machine identity are the main friction points in your stack, consider pairing Google-Health-CLI with MachineAuth. If you need to trace requests while validating data transforms, OpenTrace is the better companion than another generic API client.

How Google-Health-CLI Works

Google-Health-CLI is structured as a Go binary with a subcommand tree that mirrors the Google Health API surface. The design choice is straightforward: map endpoint families to commands, keep authentication local, and make output predictable enough for shell pipelines and agents.

The authentication path uses OAuth setup with explicit client ID and secret configuration, either through ghealth config set or environment variables. Read-only scopes are the default, and --write expands permissions only when you need to create, update, or delete data.

ghealth config set client-id YOUR_CLIENT_ID
ghealth config set client-secret YOUR_CLIENT_SECRET
ghealth auth login
ghealth data list heart-rate --from 2026-05-08T00:00:00Z --to 2026-05-09T00:00:00Z --json

That flow configures credentials, starts the OAuth login, and then requests a deterministic JSON payload for the chosen data type. The important detail is that the command line stays stable even when you switch from interactive exploration to automation, and the --json flag prevents terminal formatting from polluting machine input.

The command model also reflects how the API is consumed in practice. types, endpoints, data, rollup, profile, settings, identity, and subscribers separate concerns so a script can call only the smallest surface it needs, while ghealth api remains available for direct REST access when you need to bypass the typed wrappers.

Pros and Cons of Google-Health-CLI

Pros:

  • Strong scriptability — JSON, NDJSON, CSV, and stable exit codes make Google-Health-CLI usable in CI, cron, and agent pipelines without custom parsers.
  • Good auth ergonomics — local OAuth setup plus environment-variable support keeps secrets out of command history if you configure them correctly.
  • Typed command coverage — the command set maps cleanly to Google Health concepts like data types, rollups, and webhook subscribers.
  • Safe defaults — read-only scopes by default and --yes for destructive actions reduce accidental writes.
  • Useful agent surface — manifest, capabilities, schema, and context commands are built for downstream automation rather than human-only use.
  • Low operational overhead — installation via Homebrew or go install is lightweight, and there is no server to deploy.

Cons:

  • Narrow scope — Google-Health-CLI only solves Google Health API work, so it will not replace general API test tooling.
  • No GUI — teams that depend on visual request building or shared collections will still prefer Postman.
  • License and release metadata are not surfaced in the repo text — you can use the CLI, but the page does not provide a clean stars count or last tagged release in the scraped content.
  • OAuth setup is mandatory — if you do not already have credentials, the first-run path is slower than a public API client.
  • Healthcare data work still requires domain awareness — the CLI does not remove compliance, consent, or retention requirements from your implementation.

Getting Started with Google-Health-CLI

Install Google-Health-CLI with Homebrew or Go, then verify the binary before touching credentials. The first run should confirm that the executable is on your path and that the CLI can reach its local config and command tree.

brew install rudrankriyam/tap/ghealth
# or
 go install github.com/rudrankriyam/Google-Health-CLI@latest

ghealth doctor
ghealth types list
ghealth endpoints list

After installation, configure your OAuth client and log in. Once authenticated, you can query data with --json, inspect schemas with ghealth agent schema, and test a specific family such as sleep or heart-rate without writing any custom HTTP wrapper.

ghealth config set client-id YOUR_CLIENT_ID
ghealth config set client-secret YOUR_CLIENT_SECRET
ghealth auth login

If you need write access, rerun login with --write only for the session or workflow that truly needs it. For pipelines, prefer environment variables so the CLI can run headlessly in CI without hardcoding secrets into shell history.

Verdict

Google-Health-CLI is the strongest option for terminal-first Google Health integration when you need deterministic JSON and scriptable OAuth. Its biggest strength is the typed command surface for data, rollups, and agent context, while the main caveat is its narrow scope and lack of a GUI. Use it when your workflow is code-driven, not click-driven.

Frequently Asked Questions

Looking for alternatives?

Compare Google-Health-CLI with other CLI Tools tools.

See Alternatives →

Related Tools