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. The parsing runs in @gymgym/domain, so any client can reuse it. The importer matches exercise names to the catalog. Names that do not match become custom exercises. If a file does not say which unit it uses, the app asks.
The importer keeps the warm-up sets and drop sets that a file marks. In a Hevy CSV, the column set_type marks them. In a Strong CSV, a set order of W is a warm-up and D is a drop set. A warm-up does not count for volume, records or progression. The importer skips the rows of a Strong CSV with a set order of Rest Timer, because they are not sets.
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 and copy the API key. Then paste it in gymgym under Settings → Import → “Import from Hevy with an API key”. You can also run gymgym import hevy --hevy-key <key>.
A browser cannot call the API of Hevy. So the Worker passes each page request through (viewer.hevyWorkouts) and returns the workouts of Hevy unchanged. gymgym uses the key for those requests only and never stores it. fetchHevy in @gymgym/sdk/import reads every page and turns it into the same import file as a CSV. It uses dates in your time zone and keeps warm-ups and drop sets as they are. You see a summary before gymgym writes anything.
Backup and restore
Section titled “Backup and restore”backup() returns everything that you own as one JSON document: settings, custom exercises, folders, routines, the weekly schedule, workouts and weigh-ins. It does not include conversations with the coach or photos. restoreBackup replaces your data with a backup, and resetData erases it. All three work only on the data of the caller.
Share a plan
Section titled “Share a plan”createPlanShare creates a link to a snapshot of your routines and your weekly schedule. Anyone with the link can view it (sharedPlan). Signed-in users can copy it into their account with importSharedPlan. You can also export a plan to a file with planFile and import it with importPlan.