简介
基于 Hevy API 的命令行健身数据管理工具,支持训练历史查询、数据导出与进度分析,助力科学健身追踪。
原始描述
Access and analyze your Hevy fitness data via CLI to view workouts, routines, exercises, export JSON data, and track fitness progress.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
Hevy CLI Skill 是一个纯文档型工具指南,帮助用户通过 hevycli 命令行工具与 Hevy 健身应用的数据进行交互。核心功能分为四类:
- 配置管理:设置 API 密钥 (
hevycli config set-api-key) 和查看当前配置 - 训练记录:列出历史训练 (
workouts list)、查看单次训练详情 (workouts get <id>)、获取总训练次数 (workouts count) - 训练计划:浏览保存的训练计划 (
routines list) 及详情 (routines get <id>) - 动作模板:查看 Hevy 内置的 exercises 数据库 (
exercises list)
输出支持 table(默认)和 json 两种格式,推荐使用 JSON 进行数据分析和导出。支持短 ID(8 位)简化操作,API 分页上限为 10 条。
显著优点
- 纯文档零风险:无可执行代码,仅为使用说明文档,100% 透明可审计
- 数据来源专业:基于 Hevy Pro 的官方 API,数据准确性有保障
- 灵活分析能力:JSON 导出支持自定义分析(训练容量计算、进度追踪、频率统计)
- 效率优化:支持短 ID 快速查询,避免复制冗长 UUID
- 隐私友好:本地 CLI 操作,数据不经过第三方中转
潜在缺点与局限性
- 订阅门槛:必须拥有 Hevy Pro 订阅才能使用 API
- 只读限制:无法创建或修改训练记录,仅支持数据查看和导出
- 技术门槛:需要用户自行安装 Go 编译的 CLI 工具并配置 API 密钥
- 分页限制:单次最多返回 10 条记录,大量历史数据需多次分页
- 单位固定:重量强制为公斤、距离为米,需自行转换习惯单位
- 依赖外部工具:Skill 本身仅为文档,功能完全依赖
hevycli程序的可用性
适合人群
- 已订阅 Hevy Pro 的健身爱好者,希望脱离手机 App 进行数据分析
- 需要将训练数据导入 Excel/Python/R 进行深度统计的进阶用户
- 偏好命令行工作流的开发者和技术用户
- 希望备份个人训练数据的用户
常规风险
- API 密钥安全:用户需自行保管 API 密钥,泄露可能导致他人访问其 Hevy 数据
- 订阅失效风险:Hevy Pro 过期后 API 访问将中断
- 第三方工具依赖:
hevycli为社区开发工具,非 Hevy 官方维护,更新和维护存在不确定性 - 数据解读责任:Skill 提示可计算训练容量等指标,但实际运动科学分析需专业判断
技能正文
Hevy CLI Skill
Description
Access and analyze Hevy fitness tracking data including workouts, routines, and exercise templates via the command line.
When to Use
Use this skill when the user asks to:
- View their workout history or recent workouts
- Get details about a specific workout
- Check their total workout count
- List or view their workout routines
- Browse exercise templates
- Export workout data as JSON
- Analyze their fitness progress over time
Prerequisites
- User must have
hevycliinstalled (go install github.com/nsampre/hevycli@latest) - User must have configured their Hevy API key (
hevycli config set-api-key <key>) - User must have a Hevy Pro subscription
Available Commands
Configuration
# Set API key
hevycli config set-api-key <api-key-uuid>
# View current config
hevycli config show
Workouts
# List recent workouts
hevycli workouts list [--page N] [--page-size N] [--format json|table]
# Get detailed workout information (accepts full UUID or 8-char short ID)
hevycli workouts get <workout-id>
# Get total workout count
hevycli workouts count
Routines
# List routines
hevycli routines list [--page N] [--page-size N] [--format json|table]
# Get routine details (accepts full UUID or 8-char short ID)
hevycli routines get <routine-id>
Exercises
# List exercise templates
hevycli exercises list [--page N] [--page-size N] [--format json|table]
# Get exercise template details
hevycli exercises get <template-id>
Global Flags
--format- Output format:table(default) orjson--debug- Enable debug output for API requests
Usage Examples
Example 1: View Recent Workout History
hevycli workouts list --page-size 5
Example 2: Get Detailed Workout with Sets and Reps
# Using short ID (first 8 characters)
hevycli workouts get f75e9c13
# Or using full UUID
hevycli workouts get f75e9c13-32d7-407d-9715-011f5d5698fa
Example 3: Export Data for Analysis
# Export all workouts as JSON
hevycli workouts list --format json > workouts.json
# Export routines
hevycli routines list --format json > routines.json
Example 4: Check Progress
# View total workouts completed
hevycli workouts count
# List exercise templates to find specific exercise IDs
hevycli exercises list
Tips for Claude
-
Use JSON format for analysis: When helping users analyze their data, use
--format jsonto get structured data that can be parsed and analyzed. -
Short IDs are supported: Users can copy short IDs from
workouts listoutput and use them directly inworkouts getcommands. -
Pagination: API max page size is 10. Use pagination (
--page N) to access older workouts. -
Error handling: If a command fails:
- Check if API key is configured (
hevycli config show) - Verify the user has Hevy Pro subscription
- Check if the ID exists or is valid
- Check if API key is configured (
-
Data insights: After retrieving workout data, you can:
- Calculate training volume (weight × reps × sets)
- Track progression over time
- Identify patterns in workout frequency
- Suggest rest day intervals
Example Interaction
User: "Show me my last 3 workouts"
Claude:
hevycli workouts list --page-size 3
User: "Get details on the first workout"
Claude:
# Using the short ID from the list output
hevycli workouts get f75e9c13
User: "How many total workouts have I completed?"
Claude:
hevycli workouts count
Notes
- The tool reads data only - it does not create or modify workouts
- All timestamps are in ISO 8601 format
- Weights are always displayed in kilograms
- Distances are in meters, durations in seconds
- Table output handles emoji in workout titles (may have minor alignment issues depending on terminal)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。