Read and decrypt your health data from the command line.
HealthExport is an iPhone app for exporting health data from your iPhone and viewing it in formats such as CSV.
HealthExport Remote is an additional service that lets users access the same iPhone health data remotely in a browser, with background sync and end-to-end encryption.
This repository contains the CLI tool for accessing those same records from the terminal. HealthExport CLI fetches encrypted health records from the HealthExport DataStore API and decrypts them locally. Your account key never leaves your machine.
Start at GitHub Releases.
Most people should download from the latest release page:
he_<version>_darwin_arm64.tar.gzfor Apple Silicon Macshe_<version>_darwin_amd64.tar.gzfor Intel Macshe_<version>_linux_arm64.tar.gzorhe_<version>_linux_amd64.tar.gzfor Linux
If you want to use Claude Desktop or Claude Cowork on macOS, also download:
health-export_<version>_darwin_arm64.mcpbfor Apple Silicon Macshealth-export_<version>_darwin_amd64.mcpbfor Intel Macs
Homebrew is also available for the CLI:
brew tap TParizek/healthexport_tap https://github.com/TParizek/healthexport_tap
brew install TParizek/healthexport_tap/he- Download the right
hefile from GitHub Releases. - Extract it and place
hesomewhere on yourPATH. - Open Terminal.
- Run
he auth login. - Paste your account key from https://remote.healthexport.app/settings/sharing
- Test it with
he types.
- Install
hefirst and runhe auth login. - Download the matching
health-export_<version>_darwin_<arch>.mcpbfile from GitHub Releases. - Open Claude Desktop.
- Go to
Settings > Extensions. - Choose
Advanced settings > Install Extension.... - Select the
.mcpbfile. - Ask Claude to run
health_export_status.
Full Claude setup and troubleshooting instructions are in docs/mcp.md.
# Save your account key
he auth login
# List available data types
he types
# Fetch step count for a time range
he data --type step_count --from 2024-01-01 --to 2024-01-07
# Check Claude Desktop extension readiness
he mcp status --format jsonRun he --help or he <command> --help for more details.
Fetch encrypted health records, decrypt them locally, and print structured output.
Key flags:
--type,-t: data type name or numeric ID; repeat for multiple types--from,-f: start date inYYYY-MM-DDor RFC3339--to,-T: end date inYYYY-MM-DDor RFC3339--format:csvorjson--aggregate,-a:day,week,month, oryearfor compatible types--raw: print encrypted API payloads as JSON without local decryption
List available health data types, including canonical names, numeric IDs, and which types support aggregation.
Key flags:
--format:csvorjson--category:aggregated,record, orworkout
Manage your local account key:
he auth login: prompt for and save the account key to local confighe auth status: show the active auth source, masked key, and derived UIDhe auth logout: remove the stored key from config
Inspect and update local CLI configuration:
he config set <key> <value>he config get <key>he config list
Supported keys: format, api_url, account_key
Inspect local MCP integration status for the Claude Desktop extension:
he mcp status: human-readable host readiness summaryhe mcp status --format json: stable machine-readable diagnostics
he completion bash|zsh|fish|powershell: generate shell completionshe versionorhe --version: print build metadata
The CLI supports three ways to provide your account key:
You can view your account key in HealthExport Remote: https://remote.healthexport.app/settings/sharing
- Config file (recommended):
he auth login - Environment variable:
export HEALTHEXPORT_ACCOUNT_KEY=... - Flag:
--account-key "..."
Resolution priority is: --account-key > HEALTHEXPORT_ACCOUNT_KEY >
config file.
The config file is stored at ~/.config/healthexport/config.yaml on typical
macOS and Linux setups, or under XDG_CONFIG_HOME when set.
csv(default): good for spreadsheets,awk,cut, and shell pipelinesjson: good forjq, scripts, and agent/tool integration--raw: prints encrypted server responses as JSON for inspection/debugging
Human-oriented messages go to stderr. Structured data goes to stdout.
For cumulative data types such as steps, distance, and calories, the CLI can aggregate records client-side after decryption:
he data --type step_count --from 2024-01-01 --to 2024-12-31 --aggregate monthSupported periods: day, week, month, year
This CLI is designed to work well with coding agents and other automation:
- Structured output on
stdout(csvorjson) - Human messages on
stderr - Predictable exit codes:
0success,2no auth,3API error,4bad input - Comprehensive
--helpon every command - Shell completions via
he completion ... - One-off auth via
HEALTHEXPORT_ACCOUNT_KEY=xxx he data ...
HealthExport includes a local macOS extension for Claude Desktop and Claude
Cowork. Download the .mcpb file from GitHub Releases, install he, run he auth login, then install the extension in Claude Desktop.
The extension exposes three read-only tools:
health_export_statuslist_health_typesfetch_health_data
Full setup and troubleshooting instructions are in docs/mcp.md.
- Your account key never leaves your machine
- The CLI always fetches from the encrypted API endpoint
- Only the derived UID hash is sent to the API
- Decryption uses ChaCha20 locally in the CLI process
--rawlets you inspect the encrypted payload returned by the server- Config directories are written with
0700permissions and the config file with0600
Minimum local verification:
go build -o he
go build -o he-mcp ./cmd/he-mcp
./he --help
./he --version
go test ./...Backend-derived crypto vectors, manual end-to-end verification notes, and test
asset details live in test/README.md.
MIT