home / skills / openclaw / skills / fitbit-health

fitbit-health skill

/skills/pb3975/fitbit-health

This skill retrieves Fitbit health data via CLI, helping you monitor steps, sleep, heart rate, and weight from your account.

npx playbooks add skill openclaw/skills --skill fitbit-health

Review the files below or copy the command above to add this skill to your agents.

Files (21)
SKILL.md
1.7 KB
---
name: fitbit
description: Query Fitbit health data (activity, sleep, heart rate, weight) via CLI. Use when answering health/fitness questions that require Fitbit data, or when the user asks about their steps, sleep, heart rate, or weight from Fitbit.
metadata: {"clawdbot":{"emoji":"πŸ’ͺ","requires":{"bins":["fitbit"]}}}
---

# Fitbit CLI

Retrieve health and fitness data from Fitbit's Web API.

## Setup

1. Register an app at https://dev.fitbit.com/apps
   - OAuth 2.0 Application Type: **Personal**
   - Callback URL: `http://localhost:18787/callback`
2. Run `fitbit configure` and enter your Client ID
3. Run `fitbit login` to authorize

## Quick Reference

```bash
# Setup & auth
fitbit configure              # Set client ID (first time)
fitbit login                  # Authorize via browser
fitbit logout                 # Sign out
fitbit status                 # Check auth status

# Data
fitbit profile                # User profile info
fitbit activity [date]        # Daily activity summary
fitbit activity steps [date]  # Just steps
fitbit summary [date]         # Full daily summary
fitbit today                  # Today's summary (shortcut)
```

## Options

All commands support:
- `--json` β€” JSON output
- `--no-color` β€” Plain text output
- `--verbose` β€” Debug/HTTP details
- `--tz <zone>` β€” Override timezone (e.g., `America/Chicago`)

## Examples

```bash
# Get today's step count
fitbit activity steps

# Get yesterday's full summary as JSON
fitbit summary 2026-01-25 --json

# Check if authenticated
fitbit status
```

## Notes

- Dates default to today if omitted
- Date format: `YYYY-MM-DD` or `today`
- Tokens are stored in `~/.config/fitbit-cli/tokens.json` (chmod 600)
- Token refresh is automatic

Overview

This skill provides a command-line interface to query Fitbit health data including activity, sleep, heart rate, and weight. It helps retrieve daily summaries, specific metrics (like steps or heart rate), and profile information after a one-time OAuth setup. Use it to integrate Fitbit data into workflows, scripts, or quick lookups without opening the Fitbit app.

How this skill works

After registering a personal app on Fitbit and running the interactive configure/login flow, the CLI stores OAuth tokens locally and refreshes them automatically. Commands request data from Fitbit's Web API and return plain text or JSON. Common commands include profile, activity, summary, and today, with options for timezone override, verbosity, and JSON output.

When to use it

  • You need quick access to your Fitbit steps, sleep, heart rate, or weight from the terminal.
  • Building scripts or cron jobs that pull daily summaries or metrics for logging or reporting.
  • Answering user questions that require up-to-date Fitbit data during conversations.
  • Debugging or auditing Fitbit authentication and token status.
  • Extracting JSON data for integration with other tools or dashboards.

Best practices

  • Register a personal Fitbit app and set the callback to http://localhost:18787/callback before running configure.
  • Run fitbit login in a secure environment and keep tokens file (~/.config/fitbit-cli/tokens.json) permissioned (chmod 600).
  • Use --json for structured output when piping results into scripts or analytics tools.
  • Pass explicit dates in YYYY-MM-DD format to ensure reproducible queries; default is today.
  • Use --tz to override timezone when querying data for a different locale.

Example use cases

  • Get today's step count: fitbit activity steps
  • Retrieve yesterday's full daily summary as JSON for ingestion: fitbit summary 2026-01-25 --json
  • Check authentication status and token validity: fitbit status
  • Automate nightly exports of sleep and heart rate for long-term trend analysis in a cron job
  • Quickly view profile information or weight history from the terminal

FAQ

How do I authenticate the CLI with my Fitbit account?

Register a personal app on dev.fitbit.com, run fitbit configure to add your Client ID, then run fitbit login to authorize in the browser.

Where are my tokens stored and are they safe?

Tokens are saved in ~/.config/fitbit-cli/tokens.json; set file permissions to restrict access (chmod 600). The CLI refreshes tokens automatically.

What date formats and defaults does the CLI use?

Dates use YYYY-MM-DD or the literal 'today'. If you omit a date, the CLI defaults to today.