Access your Fitbit data at your terminal.
Project description
Fitbit CLI
This is not an official Fitbit CLI
Access your Fitbit data directly from your terminal ๐ป. View ๐ค sleep logs, โค๏ธ heart rate, ๐๏ธโโ๏ธ activity levels, ๐ฉธ SpO2, and more, all presented in a simple, easy-to-read table format!
Supported Web APIs
Only
GETAPIs are supported!
| API | Status |
|---|---|
| User | โ |
| Sleep | โ |
| SpO2 | โ |
| Heart Rate Time Series | โ |
| Active Zone Minutes (AZM) Time Series | โ |
| Activity | โ |
Usage Guide
- Install the Fitbit CLI
python -m pip install fitbit-cli
- See Help
fitbit-cli -h
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]]
[-b [DATE[,DATE]|RELATIVE]] [-u] [-v]
Fitbit CLI -- Access your Fitbit data at your terminal.
options:
-h, --help show this help message and exit
-i, --init-auth Initialize Fitbit iterative authentication setup
-v, --version Show fitbit-cli version
APIs:
Specify a date, date range (YYYY-MM-DD[,YYYY-MM-DD]), or relative date.
Relative dates: yesterday, last-week, last-month, last-N-days/weeks/months (e.g., last-2-days).
If not provided, defaults to today's date.
-s, --sleep [DATE[,DATE]|RELATIVE]
Show sleep data
-o, --spo2 [DATE[,DATE]|RELATIVE]
Show SpO2 data
-e, --heart [DATE[,DATE]|RELATIVE]
Show Heart Rate Time Series data
-a, --active-zone [DATE[,DATE]|RELATIVE]
Show Active Zone Minutes (AZM) Time Series data
-b, --breathing-rate [DATE[,DATE]|RELATIVE]
Show Breathing Rate Summary data
-u, --show-user-profile
Show user profile data
-
Register Fitbit App
- Go to https://dev.fitbit.com/apps
- Click on "REGISTER AN APP" tab
- Follow below example and register an app
-
Run the following command to set up interactive authentication and store the Fitbit token locally
fitbit-cli --init-auth
-
Start using it ๐
fitbit-cli -s
Sleep Data Summary ๐ด
โโโโโโโโโโโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโ
โ Date ๐ โ Deep Sleep ๐ โ Light Sleep ๐ค โ REM Sleep ๐ โ Wake Time โฐ โ Efficiency ๐ฏ โ Time in Bed ๐ โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ 2025-05-03 โ 129 min โ 271 min โ 140 min โ 66 min โ 57% โ 10.1 hr โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ
NOTE: The token is valid for only 8 hours, fitbit-cli automatically refreshes the token when it expires.
Local Development
git clone git@github.com:veerendra2/fitbit-cli.git
cd fitbit-cli
python -m venv venv
source venv/bin/activate
python -m pip install -e .
deactivate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fitbit_cli-1.3.0.tar.gz
(12.8 kB
view details)
File details
Details for the file fitbit_cli-1.3.0.tar.gz.
File metadata
- Download URL: fitbit_cli-1.3.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e83e56a1324322ca7eeead7356aa10334e9b97f4ba7fac7c2b534bfdb1af637
|
|
| MD5 |
783c25bd46bb6e7f8d0675193384ec3b
|
|
| BLAKE2b-256 |
ea69809b5401046120dc6045dca132778a1d8f189940a2831b905ec1acacc82f
|