···10101111## Setup
12121313-Add your Hevy API key to [config.tsm](config.tsm):
1313+Copy the sample env file and add your Hevy API key:
14141515-```ts
1616-export const HEVY_API_KEY = 'your-key-here';
1515+```sh
1616+cp .env.sample .env
1717+```
1818+1919+Then edit `.env`:
2020+2121+```
2222+HEVY_API_KEY=your_api_key_here
1723```
18241925## Workflow
20262127### Step 1 — Generate the exercise map template
22282323-Reads your CSV and outputs a `exercise-map.tsm` file listing every unique exercise name:
2929+Reads your CSV and outputs an `exercise-map.ts` file listing every unique exercise name:
24302531```sh
2626-deno run --allow-read generate-map.tsm
3232+deno task generate-map
2733```
28342935### Step 2 — Get your Hevy exercise template IDs
···3137Fetches all exercise templates from your Hevy account and prints them as mappable key/value pairs:
32383339```sh
3434-deno run --allow-net get-templates.tsm
4040+deno task get-templates
3541```
36423743### Step 3 — Fill in the exercise map
38443939-Open `exercise-map.tsm` and paste in the Hevy template ID for each exercise. Any exercise left as an empty string will be skipped during import.
4545+Open `exercise-map.ts` and paste in the Hevy template ID for each exercise. Any exercise left as an empty string will be skipped during import.
40464147```ts
4248export const EXERCISE_MAP: Record<string, string> = {
···4955### Step 4 — Run the import
50565157```sh
5252-deno run --allow-read --allow-net import.tsm
5858+deno task import
5359```
54605561Workouts are sent one day at a time with a 1.5-second delay between requests to respect Hevy's rate limits. Exercises not found in the map are skipped with a warning.
···58645965| File | Purpose |
6066|------|---------|
6161-| `config.tsm` | API key, CSV path, API base URL |
6262-| `generate-map.tsm` | Generates `exercise-map.tsm` from the CSV |
6363-| `get-templates.tsm` | Lists Hevy exercise templates and their IDs |
6464-| `exercise-map.tsm` | Maps Fitbod exercise names → Hevy template IDs |
6565-| `import.tsm` | Main import script |
6666-| `WorkoutExport.csv` | Your Fitbod data export |
6767+| `.env` | Your Hevy API key (not committed) |
6868+| `.env.sample` | Template for `.env` |
6969+| `config.ts` | Loads env vars, CSV path, API base URL |
7070+| `generate-map.ts` | Generates `exercise-map.ts` from the CSV |
7171+| `get-templates.ts` | Lists Hevy exercise templates and their IDs |
7272+| `exercise-map.ts` | Maps Fitbod exercise names → Hevy template IDs |
7373+| `import.ts` | Main import script |
7474+| `WorkoutExport.csv` | Your Fitbod data export (not committed) |