Skip to content

matanabudy/workout-data-sync

Repository files navigation

workout-data-sync

Upload Preview

Import your MacroFactor workout history into Hevy.

Try it → — requires a Hevy Pro API key.

Re-importing the same CSV creates duplicates. There's no dedup check — the app warns you before importing.



Exporting from MacroFactor

Open the MacroFactor app, tap More in the bottom nav, then go to Data Export → Granular Export. Scroll down to Workout Log, choose your time span, and tap Export Workout Log.

Getting your Hevy API key

Open the Hevy app, go to Settings → Developer, and tap Generate an API key. Note: this requires a Hevy Pro subscription.


How it works

  1. Export your workout history from MacroFactor (More → Data Export → Granular Export → Workout Log)
  2. Upload the CSV and enter your Hevy API key
  3. Map any exercises that don't have a direct Hevy equivalent
  4. Preview and import — workouts appear in Hevy immediately

Run locally

uv sync --dev
HEVY_API_KEY=your_key uv run uvicorn workout_data_sync.web_app:app --reload --port 8000

Exercise mapping

MacroFactor and Hevy use different names for the same exercises. config/exercise_map.csv handles the common ones:

source_exercise,target_exercise
Dumbbell Bench Press,Bench Press (Dumbbell)

For anything not covered, the app surfaces the 4 closest Hevy equivalents and lets you pick. Choices apply to the current import only.


CLI

Hevy API — direct import via CLI
export HEVY_API_KEY=your_key

# Dry run — writes payloads to JSON for inspection
uv run workout-data-sync-hevy --input your_export.csv

# Apply
uv run workout-data-sync-hevy --input your_export.csv --apply
Flag Default Description
--input PATH required MacroFactor CSV export
--exercise-map PATH config/exercise_map.csv Name rewrite map
--apply dry-run Post to Hevy API
--visibility followers followers or private
--convert-rir-to-rpe off Map RIR → RPE (10 - rir)
--weight-unit kg kg or lbs
--default-start-time 12:00:00 Fallback when no time in export
--no-interactive off Fail on unmapped exercises instead of prompting

Tests

uv run ruff format .
uv run ruff check .
uv run ty check
uv run pytest

About

Import MacroFactor workouts into Hevy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors