pp-whoop

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/devices/whoop/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See AGENTS.md "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件——请勿编辑。 此文件是library/devices/whoop/SKILL.md的完全镜像, 由tools/generate-skills/在合并后重新生成。此处的手动编辑将在下次重新生成时被静默覆盖。请改为编辑library/源文件。 请参阅AGENTS.md中的“生成产物:registry.json, cli-skills/”。 -->

Whoop — Printing Press CLI

Whoop — Printing Press CLI工具

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
whoop-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install whoop --cli-only
  2. Verify:
    whoop-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails before this CLI has a public-library category, install Node or use the category-specific Go fallback after publish.
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本Skill驱动
whoop-pp-cli
二进制文件。在调用本Skill的任何命令之前,您必须确认CLI已安装。如果未安装,请先进行安装:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install whoop --cli-only
  2. 验证:
    whoop-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    中。
如果在该CLI拥有公共库分类之前
npx
安装失败,请安装Node,或在发布后使用特定分类的Go备用方案。
如果安装后
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。在验证成功之前,请勿继续执行Skill命令。

Command Reference

命令参考

activity — Manage activity
  • whoop-pp-cli activity get-sleep-by-id
    — Get the sleep for the specified ID
  • whoop-pp-cli activity get-sleep-collection
    — Get all sleeps for a user, paginated. Results are sorted by start time in descending order.
  • whoop-pp-cli activity get-workout-by-id
    — Get the workout for the specified ID
  • whoop-pp-cli activity get-workout-collection
    — Get all workouts for a user, paginated. Results are sorted by start time in descending order.
activity-mapping — Manage activity mapping
  • whoop-pp-cli activity-mapping <activityV1Id>
    — Lookup the V2 UUID for a given V1 activity ID
cycle — Manage cycle
  • whoop-pp-cli cycle get-by-id
    — Get the cycle for the specified ID
  • whoop-pp-cli cycle get-collection
    — Get all physiological cycles for a user, paginated. Results are sorted by start time in descending order.
partner — Endpoints for trusted WHOOP partner operations
  • whoop-pp-cli partner add-test-data
    — Generates test user and lab requisition data for partner integration testing. This endpoint is only available in...
  • whoop-pp-cli partner get-lab-requisition-by-id
    — Retrieves a lab requisition with its associated service requests by its unique identifier. The requesting partner...
  • whoop-pp-cli partner get-service-request-by-id
    — Retrieves a service request by its unique identifier. The requesting partner must be an owner of the service request.
  • whoop-pp-cli partner request-token
    — Exchanges partner client credentials for an access token.
  • whoop-pp-cli partner update-service-request-status
    — Updates the business status of a service request task. The requesting partner must be an owner of the service request.
  • whoop-pp-cli partner upload-diagnostic-report-results
    — Creates a diagnostic report with results for a service request. The requesting partner must be an owner of the...
recovery — Manage recovery
  • whoop-pp-cli recovery
    — Get all recoveries for a user, paginated. Results are sorted by start time of the related sleep in descending order.
user — Endpoints for retrieving user profile and measurement data.
  • whoop-pp-cli user get-body-measurement
    — Retrieves the body measurements (height, weight, max heart rate) for the authenticated user.
  • whoop-pp-cli user get-profile-basic
    — Retrieves the basic profile information (name, email) for the authenticated user.
  • whoop-pp-cli user revoke-oauth-access
    — Revoke the access token granted by the user. If the associated OAuth client is configured to receive webhooks, it...
activity — 管理活动数据
  • whoop-pp-cli activity get-sleep-by-id
    — 获取指定ID对应的睡眠数据
  • whoop-pp-cli activity get-sleep-collection
    — 获取用户的所有睡眠数据,支持分页。结果按开始时间降序排列。
  • whoop-pp-cli activity get-workout-by-id
    — 获取指定ID对应的训练数据
  • whoop-pp-cli activity get-workout-collection
    — 获取用户的所有训练数据,支持分页。结果按开始时间降序排列。
activity-mapping — 管理活动映射
  • whoop-pp-cli activity-mapping <activityV1Id>
    — 根据给定的V1活动ID查询对应的V2 UUID
cycle — 管理生理周期
  • whoop-pp-cli cycle get-by-id
    — 获取指定ID对应的生理周期数据
  • whoop-pp-cli cycle get-collection
    — 获取用户的所有生理周期数据,支持分页。结果按开始时间降序排列。
partner — 可信WHOOP合作伙伴操作端点
  • whoop-pp-cli partner add-test-data
    — 为合作伙伴集成测试生成测试用户和实验室申请数据。此端点仅在...可用
  • whoop-pp-cli partner get-lab-requisition-by-id
    — 根据唯一标识符检索实验室申请及其关联的服务请求。发起请求的合作伙伴...
  • whoop-pp-cli partner get-service-request-by-id
    — 根据唯一标识符检索服务请求。发起请求的合作伙伴必须是该服务请求的所有者。
  • whoop-pp-cli partner request-token
    — 使用合作伙伴客户端凭证交换访问令牌。
  • whoop-pp-cli partner update-service-request-status
    — 更新服务请求任务的业务状态。发起请求的合作伙伴必须是该服务请求的所有者。
  • whoop-pp-cli partner upload-diagnostic-report-results
    — 为服务请求创建带有结果的诊断报告。发起请求的合作伙伴必须是该...的所有者。
recovery — 恢复数据管理
  • whoop-pp-cli recovery
    — 获取用户的所有恢复数据,支持分页。结果按相关睡眠的开始时间降序排列。
user — 检索用户资料和测量数据的端点
  • whoop-pp-cli user get-body-measurement
    — 检索已认证用户的身体测量数据(身高、体重、最大心率)。
  • whoop-pp-cli user get-profile-basic
    — 检索已认证用户的基本资料信息(姓名、邮箱)。
  • whoop-pp-cli user revoke-oauth-access
    — 撤销用户授予的访问令牌。如果关联的OAuth客户端配置为接收Webhook,则它...

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
whoop-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当您知道要执行的操作但不确定对应命令时,可直接询问CLI:
bash
whoop-pp-cli which "<用您自己的语言描述的功能>"
which
命令会将自然语言的功能查询解析为与CLI精选功能索引最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示没有确定的匹配项——请改用
--help
或缩小查询范围。

Auth Setup

认证设置

Store your access token:
bash
whoop-pp-cli auth set-token YOUR_TOKEN_HERE
Or set
WHOOP_OAUTH
as an environment variable.
Run
whoop-pp-cli doctor
to verify setup.
存储您的访问令牌:
bash
whoop-pp-cli auth set-token YOUR_TOKEN_HERE
或者将
WHOOP_OAUTH
设置为环境变量。
运行
whoop-pp-cli doctor
以验证设置是否正确。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    whoop-pp-cli activity-mapping mock-value --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Explicit retries — use
    --idempotent
    only when an already-existing create should count as success, and
    --ignore-missing
    only when a missing delete target should count as success
在任意命令后添加
--agent
参数。该参数等价于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON格式,错误信息输出到标准错误流
  • 可过滤
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组会遍历每个元素。对于冗长的API,这是缩小上下文范围的关键:
    bash
    whoop-pp-cli activity-mapping mock-value --agent --select id,name,status
  • 可预览
    --dry-run
    参数显示请求内容但不发送
  • 离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
  • 非交互式 — 从不提示输入,所有输入均通过标志参数提供
  • 显式重试 — 仅当已存在的创建操作应被视为成功时使用
    --idempotent
    ,仅当缺失的删除目标应被视为成功时使用
    --ignore-missing

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,通过
.meta.source
判断数据是实时的还是本地的。仅当标准输出为终端时,才会将人类可读的
N results (live)
摘要打印到标准错误流——管道/Agent消费者会在标准输出获取纯JSON格式内容。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
whoop-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
whoop-pp-cli feedback --stdin < notes.txt
whoop-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.whoop-pp-cli/feedback.jsonl
. They are never POSTed unless
WHOOP_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
WHOOP_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现此CLI存在问题时,记录反馈:
whoop-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
whoop-pp-cli feedback --stdin < notes.txt
whoop-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.whoop-pp-cli/feedback.jsonl
文件中。除非设置了
WHOOP_FEEDBACK_ENDPOINT
且传递了
--send
参数或
WHOOP_FEEDBACK_AUTO_SEND=true
,否则反馈内容绝不会被POST发送。默认行为仅存储在本地。
请写下让您感到意外的点,而非bug报告。简短、具体、一句话即可:这才是有价值的部分。

Output Delivery

输出传递

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都支持
--deliver <sink>
参数。输出会除了(或代替)标准输出外发送到指定的sink,以便Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅写入标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出主体POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
未知的协议会被拒绝,并返回结构化错误信息,列出支持的协议集。Webhook失败时会返回非零退出码,并在标准错误流中记录URL和HTTP状态码。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
whoop-pp-cli profile save briefing --json
whoop-pp-cli --profile briefing activity-mapping mock-value
whoop-pp-cli profile list --json
whoop-pp-cli profile show briefing
whoop-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时,可使用此功能——即HeyGen的“Beacon”模式。
whoop-pp-cli profile save briefing --json
whoop-pp-cli --profile briefing activity-mapping mock-value
whoop-pp-cli profile list --json
whoop-pp-cli profile show briefing
whoop-pp-cli profile delete briefing --yes
显式标志始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,以便自省Agent在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
4Authentication required
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
4需要认证
5API错误(上游问题)
7速率限制(等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    whoop-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
  1. 为空、
    help
    --help
    → 显示
    whoop-pp-cli --help
    输出
  2. install
    开头
    → 以
    mcp
    结尾 → MCP安装;否则 → 参见上方的前提条件
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:
bash
claude mcp add whoop-pp-mcp -- whoop-pp-mcp
Verify:
claude mcp list
从本CLI已发布的公共库条目或预构建版本中安装MCP二进制文件,然后注册:
bash
claude mcp add whoop-pp-mcp -- whoop-pp-mcp
验证:
claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which whoop-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    whoop-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    whoop-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which whoop-pp-cli
    如果未找到,提供安装选项(参见顶部的前提条件)。
  2. 将用户查询与上述独特功能和命令参考中的最佳命令匹配。
  3. 添加
    --agent
    参数执行:
    bash
    whoop-pp-cli <command> [subcommand] [args] --agent
  4. 如果存在歧义,查看子命令帮助:
    whoop-pp-cli <command> --help