Import and export
Import history
Section titled “Import history”The importer reads CSV exports from Strong, Hevy and FitNotes, a generic CSV, and Apple Health exports for body weight. Parsing runs in @gymgym/domain, so any client can reuse it. Exercise names are matched to the catalog; unmatched names become custom exercises. If a file doesn’t say which unit it uses, the app asks.
The SDK call is importHistory.
Straight from Hevy
Section titled “Straight from Hevy”Hevy Pro accounts can skip the export: in Hevy open Settings → Developer, copy the API key, and paste it under Settings → Import → Import from Hevy with an API key (or run gymgym import hevy --hevy-key <key>). Hevy’s API can’t be called from a browser, so the Worker passes each page request through (viewer.hevyWorkouts) and returns Hevy’s workouts unchanged; the key is used for those requests only and never stored. fetchHevy in @gymgym/sdk/import reads every page and turns it into the same import file as a CSV, with dates in your time zone and warm-ups and drop sets kept as such. You see the summary before anything is written.
Backup and restore
Section titled “Backup and restore”backup() returns everything you own as one JSON document: settings, custom exercises, routines, the week plan, workouts and weigh-ins. restoreBackup replaces your data with a backup, and resetData erases it. All three work only on the caller’s own data.
Share a plan
Section titled “Share a plan”createPlanShare creates a link to a snapshot of your routines and week plan. Anyone with the link can view it (sharedPlan), and signed-in users can copy it into their account with importSharedPlan. Plans can also be exported to a file with planFile and imported with importPlan.