Hevy2whoop

io.github.mselcukozturk由 GitHub 账号 mselcukozturk 发布v1.1.0更新于 Nov 6, 2026

Copy Hevy strength workouts into WHOOP Strength Trainer sets with reps and weight

已验证STDIO仅桌面位置与生活效率与工作流

概览

AI 生成的概览

把 Hevy 的力量训练记录(含次数与重量)复制到 WHOOP Strength Trainer,支持先预览后写入,并提供动作 ID 目录。

可以做什么
  • 同步 Hevy 训练到 WHOOP Strength Trainer:预览最近一次训练或指定日期范围,明确开启后才写入
  • 报告未映射和被跳过的动作,并跳过 WHOOP 中已存在的训练
  • 列出 WHOOP Strength Trainer 的动作 ID 与名称,可按搜索词过滤,用于建立动作映射
适用场景
适合在 Hevy 记录力量训练、又希望这些组数直接出现在 WHOOP Strength Trainer 中而不必在 WHOOP 应用里手动重录的人,可让助手按需执行,也可用定时任务自动同步。
运行要求
以 stdio 在本机运行,需要 Node.js 24 或更高版本。需要 Hevy Pro 账号及其 API 密钥(环境变量 HEVY_API_KEY)、WHOOP 账号,以及另行安装并已登录的 totem MCP 服务器(需在 PATH 中,其 WHOOP 登录约 30 天后过期)。可选设置 HEVY2WHOOP_MAPPING 指向自定义映射文件。
安装前请注意
写入 WHOOP 依赖 totem,而 totem 使用 WHOOP 的私有 iOS API;项目说明 WHOOP 条款不允许这样做,且该接口可能随时变更,请仅用自己的账号并自担风险。同步工具只有在 write: true 时才写入 WHOOP,但助手可以自行传入该参数,建议先查看预览。HEVY_API_KEY 是密钥;项目称该密钥与 WHOOP 令牌只发送给 Hevy 和 WHOOP。内置动作映射中有不少是近似匹配。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hevy2whoop,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

hevy2whoop

Copies strength workouts you log in Hevy into WHOOP Strength Trainer: every exercise and every working set, with reps and weight. WHOOP has no Hevy integration, so without this tool the sets have to be entered in the WHOOP app by hand after each session.

hevy2whoop handles the Hevy side and the exercise mapping. Writing to WHOOP is done by totem, an MCP server by Brian Gao.

Read before use. This project is not affiliated with Hevy or WHOOP. WHOOP does not offer a public API for writing Strength Trainer workouts. totem uses WHOOP's private iOS API, which WHOOP's terms do not permit and which can change without notice. Use it at your own risk and with your own account only. hevy2whoop runs on your computer; your Hevy key and WHOOP tokens are sent only to Hevy and WHOOP.

Setting up with an AI agent

Give your agent (Claude Code, Codex, Cursor, ...) this message:

Install hevy2whoop for me by following https://raw.githubusercontent.com/mselcukozturk/hevy2whoop/main/AGENT_INSTALLATION.md

AGENT_INSTALLATION.md takes the agent through each step with a check, maps your unmapped exercises with you, and registers the MCP server in your client. It tells the agent to leave the WHOOP sign-in to you and to write to WHOOP only after you approve a preview.

What it does

  1. Reads your latest Hevy workout, or every workout in a date range, from the official Hevy API.
  2. Converts each exercise to a WHOOP exercise ID using mapping.json. Warm-up sets are left out. Exercises without a mapping entry are reported and not written.
  3. Checks whether WHOOP already has a Strength Trainer activity that starts and ends within 2 minutes of the Hevy workout. If so, the workout is not written again, so repeated runs are safe.
  4. Shows a preview. With --write, it logs the workout to WHOOP.

It runs as a command-line tool, or as an MCP server so that Claude or another MCP client can run the sync on request ("copy yesterday's workout to WHOOP").

Requirements

  • Node.js 24 or later
  • Hevy Pro (the Hevy API key is available only on Pro): hevy.com/settings?developer
  • A WHOOP account
  • totem, installed and signed in

Installation

bash
git clone https://github.com/mselcukozturk/hevy2whoop.gitcd hevy2whoopnpm install -g @thebriangao/totemtotem auth                      # sign in to WHOOP onceexport HEVY_API_KEY=your-hevy-api-key

hevy2whoop has no npm dependencies. It starts totem start from your PATH. totem's WHOOP sign-in lasts about 30 days; when it expires, run totem auth again.

Usage

bash
node hevy2whoop.mjs sync                                      # preview the latest workoutnode hevy2whoop.mjs sync --write                              # write it to WHOOPnode hevy2whoop.mjs sync --from 2026-09-01 --to 2026-09-30    # preview a date rangenode hevy2whoop.mjs sync --from 2026-09-01 --to 2026-09-30 --writenode hevy2whoop.mjs catalog "lateral raise"                   # find WHOOP exercise IDs

Dates are in your local time zone and both ends are included. Example output:

2026-09-06 13:34–14:27  Upper Body  unmapped: Wide Grip Row (template 0b7e5c2a-4d1f-4e8a-9c3b-6f2a1d8e7b90)  skipped by mapping: Warm Up  preview: would write 10 exercises, 20 sets (run with --write to write)

To sync automatically, run node hevy2whoop.mjs sync --write from cron or a systemd timer some time after your workout ends.

MCP server

node hevy2whoop.mjs mcp runs an MCP server over stdio with two tools:

ToolArgumentsEffect
hevy2whoop_syncfrom, to (YYYY-MM-DD, optional), write (default false)Same as sync. Returns one result per workout: preview, written, already_in_whoop, nothing_to_write or error, with unmapped and skipped exercises.
hevy2whoop_catalogsearch (optional)Same as catalog.

The sync tool writes to WHOOP only when it is called with write: true.

Claude Code:

bash
claude mcp add hevy2whoop -e HEVY_API_KEY=your-hevy-api-key -- node /path/to/hevy2whoop/hevy2whoop.mjs mcp

After the npm release, no local clone is needed:

bash
claude mcp add hevy2whoop -e HEVY_API_KEY=your-hevy-api-key -- npx -y hevy2whoop mcp

Claude Desktop, Cursor and other clients (claude_desktop_config.json or the client's MCP settings):

json
{  "mcpServers": {    "hevy2whoop": {      "command": "node",      "args": ["/path/to/hevy2whoop/hevy2whoop.mjs", "mcp"],      "env": { "HEVY_API_KEY": "your-hevy-api-key" }    }  }}

totem must be on the PATH the client gives to the server. If the client cannot find it, add "PATH" to env.

Exercise mapping

mapping.json is keyed by the Hevy exercise_template_id:

json
"DE68C825": {  "hevy": "Single Arm Lateral Raise (Cable)",  "whoop": ["LATERALRAISELEFT_PULLEYMACHINE", "LATERALRAISERIGHT_PULLEYMACHINE"],  "approximate": false,  "note": "the catalog has no two-sided cable lateral raise; every set is written to both sides"}
FieldMeaning
hevyHevy exercise title, for readers of the file
whoopWHOOP exercise IDs. Each working set is written to every ID in the list. An empty list means the exercise is never logged.
approximatetrue when the WHOOP catalog has no exact equivalent and the closest exercise was chosen
noteReason for an approximate or unusual choice

The WHOOP catalog has 372 exercises and Hevy has many more, so a number of entries are approximate. Check the notes and change entries you disagree with.

Adding an exercise

  1. Run sync. Unmapped exercises are listed with their template ID.
  2. Find the WHOOP ID with node hevy2whoop.mjs catalog <search>.
  3. Add an entry to your own mapping file (below), or to mapping.json if the exercise is one of Hevy's built-in exercises and you want to contribute it.

Your own mapping file

Set HEVY2WHOOP_MAPPING to the path of a JSON file in the same format. Its entries are added to mapping.json, and an entry with the same template ID replaces the bundled one. Use it for your custom Hevy exercises and for choices that differ from the bundled mapping; updating the repository then never conflicts with your changes.

bash
export HEVY2WHOOP_MAPPING=~/.config/hevy2whoop/mapping.json

Custom Hevy exercises have UUID template IDs (for example 0b7e5c2a-4d1f-...). They exist only in your account, so keep them in your own file and do not submit them.

Contributing

Pull requests that add or correct entries for Hevy's built-in exercises (8-character template IDs) are welcome. Please set approximate and explain the choice in note when the match is not exact.

Limitations

  • WHOOP stores a duration for each set; Hevy does not. The workout duration is divided equally across the working sets.
  • Drop sets and failure sets are written as ordinary sets.
  • Only workouts WHOOP records as Strength Trainer activities count as already logged. A separate activity recorded by the strap during the same session is left untouched.
  • For one-sided exercises, Hevy counts reps per side, while some WHOOP entries may count the total. See the notes in mapping.json.

Testing

bash
node test/e2e.mjs

Runs the command-line tool and the MCP server end to end against a fake Hevy API and a fake totem server, covering the cases in docs/failure-scenarios.md, and writes the result to artifacts/e2e-result.json. No real account is used.

Credits

  • totem by Brian Gao (MIT) does all communication with WHOOP.
  • hevy2garmin does the same job for Garmin Connect and was a reference for this project.

License

MIT

来源:README.md,提交 bccf837

工具

2

hevy2whoop_sync

Copy Hevy strength workouts into WHOOP Strength Trainer. Without from/to, takes the latest Hevy workout. Without write: true, only previews. With write: true, WRITES the workouts to WHOOP; workouts already in WHOOP are not written again. Reports exercises that have no entry in the exercise mapping.

输入参数tofromwrite

hevy2whoop_catalog

List WHOOP Strength Trainer exercise IDs and names, optionally filtered by a search text. Use it to find IDs for the exercise mapping.

输入参数search

版本历史

1
  1. v1.1.0最新Nov 5, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分