npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openpets/whoop

v1.0.0

Published

Complete WHOOP API integration for accessing workout, sleep, recovery, and physiological data

Readme

WHOOP Plugin

Complete WHOOP API integration for accessing workout, sleep, recovery, and physiological data from your WHOOP wearable.

Quick Start

1. Get Your WHOOP Access Token

  1. Go to the WHOOP Developer Dashboard
  2. Create a new OAuth application
  3. Use the authorization code flow to obtain an access token
  4. Required scopes:
    • read:recovery - Recovery data (HRV, resting heart rate)
    • read:cycles - Physiological cycles and strain
    • read:workout - Workout data
    • read:sleep - Sleep data
    • read:profile - User profile
    • read:body_measurement - Height, weight, max heart rate

2. Configure Environment

Create a .env file:

WHOOP_ACCESS_TOKEN=your_access_token_here

3. Test Connection

opencode run "test whoop connection"

Available Tools

User & Profile

| Tool | Description | |------|-------------| | whoop-test-connection | Test API connection and configuration | | whoop-get-profile-basic | Get user profile (name, email) | | whoop-get-body-measurement | Get body measurements (height, weight, max HR) |

Recovery

| Tool | Description | |------|-------------| | whoop-get-recovery-collection | Get all recoveries (paginated) | | whoop-get-recovery-for-cycle | Get recovery for a specific cycle |

Sleep

| Tool | Description | |------|-------------| | whoop-get-sleep-collection | Get all sleep records (paginated) | | whoop-get-sleep-by-id | Get specific sleep by ID | | whoop-get-sleep-for-cycle | Get sleep for a specific cycle |

Workouts

| Tool | Description | |------|-------------| | whoop-get-workout-collection | Get all workouts (paginated) | | whoop-get-workout-by-id | Get specific workout by ID |

Physiological Cycles

| Tool | Description | |------|-------------| | whoop-get-cycle-collection | Get all cycles (paginated) | | whoop-get-cycle-by-id | Get specific cycle by ID |

Utilities

| Tool | Description | |------|-------------| | whoop-get-activity-mapping | Convert v1 activity ID to v2 UUID | | whoop-revoke-user-oauth-access | Revoke OAuth access token |

Example Queries

# Get your recovery score
opencode run "get my whoop recovery score"

# Get recent sleep data
opencode run "show my whoop sleep data for the last week"

# Get workout history
opencode run "list my whoop workouts"

# Get physiological cycles
opencode run "get my whoop cycles for the past month"

# Check body measurements
opencode run "what are my whoop body measurements"

Data Filtering

Most collection endpoints support filtering:

  • limit - Number of results (max 25)
  • start - Start time (ISO 8601 format)
  • end - End time (ISO 8601 format)
  • nextToken - Pagination token for next page

Example:

opencode run "get my whoop sleep data from 2024-01-01 to 2024-01-31"

Response Data

Recovery Score

  • recovery_score - Recovery percentage (0-100)
  • resting_heart_rate - Resting HR in BPM
  • hrv_rmssd_milli - Heart rate variability in ms
  • spo2_percentage - Blood oxygen percentage
  • skin_temp_celsius - Skin temperature

Sleep Data

  • sleep_performance_percentage - Sleep performance (0-100)
  • sleep_efficiency_percentage - Time asleep vs in bed
  • stage_summary - Breakdown by sleep stage (light, deep, REM)
  • respiratory_rate - Breaths per minute

Workout Data

  • strain - Workout strain score
  • average_heart_rate - Average HR during workout
  • max_heart_rate - Max HR during workout
  • kilojoule - Energy burned
  • distance_meter - Distance (if applicable)
  • zone_durations - Time in each HR zone

FAQ

Q: How do I get a WHOOP access token? A: Visit the WHOOP Developer Dashboard, create an OAuth app, and use the authorization code flow.

Q: What's the difference between v1 and v2 API? A: v2 uses UUIDs instead of integer IDs, has improved data models, and will receive all new features. v1 is deprecated.

Q: Can I convert v1 IDs to v2 UUIDs? A: Yes, use the whoop-get-activity-mapping tool for one-time migration.

Q: What are the rate limits? A: WHOOP API has rate limiting. If you receive a 429 error, wait before making more requests.

Links