whoop-morning
Morning WHOOP check-in:
- - fetches your latest WHOOP data (Recovery, Sleep, Cycle/Strain)
- generates a short set of suggestions for the day
Setup
1) Create WHOOP OAuth credentials
You already have:
Store these in ~/.clawdbot/.env.
2) Authorize once (get refresh token)
Run:
CODEBLOCK0
This prints an authorization URL.
Open it in your browser, approve, and paste the code back into the terminal.
The script will exchange it for tokens and write WHOOP_REFRESH_TOKEN=... to ~/.clawdbot/.env.
3) Run the morning report
CODEBLOCK1
Automation
Recommended: schedule with Gateway cron (daily, morning).
The cron job should run whoop-morning and send its output as a message.
Notes
- - This skill uses WHOOP OAuth2:
- auth URL:
https://api.prod.whoop.com/oauth/oauth2/auth
- token URL:
https://api.prod.whoop.com/oauth/oauth2/token
- - WHOOP rotates refresh tokens; avoid running multiple refreshes in parallel.
- API availability/fields can change; if WHOOP returns 401/400 during token refresh, re-run
whoop-auth.
whoop-morning
早晨WHOOP签到:
- - 获取最新的WHOOP数据(恢复、睡眠、周期/负荷)
- 生成当日简短建议
设置
1) 创建WHOOP OAuth凭证
您已拥有:
- - WHOOPCLIENTID
- WHOOPCLIENTSECRET
将这些信息存储在~/.clawdbot/.env中。
2) 一次性授权(获取刷新令牌)
运行:
bash
/home/claw/clawd/skills/whoop-morning/bin/whoop-auth --scopes offline read:recovery read:sleep read:cycles read:profile
这将打印一个授权URL。
在浏览器中打开该URL,批准授权,然后将code粘贴回终端。
脚本将用该代码交换令牌,并将WHOOPREFRESHTOKEN=...写入~/.clawdbot/.env。
3) 运行晨间报告
bash
/home/claw/clawd/skills/whoop-morning/bin/whoop-morning
自动化
建议:使用Gateway定时任务(每日早晨)进行调度。
定时任务应运行whoop-morning并将其输出作为消息发送。
备注
- 授权URL:https://api.prod.whoop.com/oauth/oauth2/auth
- 令牌URL:https://api.prod.whoop.com/oauth/oauth2/token
- - WHOOP会轮换刷新令牌;避免同时运行多个刷新操作。
- API可用性/字段可能发生变化;如果WHOOP在令牌刷新期间返回401/400错误,请重新运行whoop-auth。