# Deployment Guide - Hevy Gym Tracker for Fitbit

## Quick Start (3 Steps)

### Step 1: Install Fitbit CLI

```bash
npm install -g fitbit-cli
```

### Step 2: Login to Fitbit

```bash
fitbit login
```

This will open a browser window. Log in with your Fitbit account.

### Step 3: Build and Install

```bash
cd ~/.openclaw/workspace/hevy_fitbit
fitbit build
fitbit install
```

That's it! The app should now be on your Fitbit Sense 2.

---

## Upload to Fitbit GAM (Gallery App Manager)

If you want to publish the app to the Fitbit Gallery:

### Build the app
```bash
fitbit build
```

This creates a `.fpb` file (Fitbit Package) in the project directory.

### Upload to GAM

1. Go to https://gam.fitbit.com
2. Log in with your Fitbit developer account
3. Click **"Submit App"**
4. Fill in:
   - **App Name**: Hevy Gym Tracker
   - **Short Description**: Workout tracker for Fitbit
   - **Long Description**: Track sets, reps, weight and heart rate
   - **Category**: Health & Fitness
5. Upload the `.fpb` file
6. Add screenshots (you'll need to take them from the simulator)
7. Submit for review

---

## Alternative: Use Fitbit Studio

If you prefer a web-based IDE:

1. Go to https://studio.fitbit.com
2. Click **"Import Project"**
3. Select the `hevy_fitbit` folder
4. Click **"Build & Install"**

---

## Troubleshooting

### "fitbit-cli not found"
- Run: `npm install -g fitbit-cli`

### "Not logged in"
- Run: `fitbit login`

### "Build failed"
- Check that all files are present
- Make sure `resources/icon.png` exists (create a 120x120 PNG)

### "Device not found"
- Make sure your Fitbit is paired with your phone
- Enable Developer Mode on your Fitbit:
  1. Open Fitbit app on phone
  2. Go to Account → your device
  3. Toggle "Developer Mode" on

---

## Need Help?

- Fitbit Developer Docs: https://dev.fitbit.com
- Fitbit Community: https://community.fitbit.com
- Build script: Run `./build.sh` in the project directory
