CLI
The gymgym command talks to the server only through @gymgym/sdk, like every other app. Run it from the repository with node apps/cli/src/main.ts (Node.js 24+), or link it with pnpm --filter @gymgym/cli link --global.
Sign in once with gymgym login: it prints a code, you approve it at /device in a browser where you are signed in, and the CLI keeps a session token in ~/.config/gymgym/config.json (readable only by you; $GYMGYM_CONFIG overrides the path). $GYMGYM_URL or --url picks the server. Add --json to any command for machine-readable output.
Several accounts, or several servers, live side by side as profiles: gymgym login --profile work signs in another one and makes it current, gymgym profile lists them, gymgym profile use <name> switches, and --profile <name> or $GYMGYM_PROFILE picks one for a single command. Weights are shown and typed in each account’s unit (gymgym settings --unit lb).
Sign in by approving a code in your browser. With –profile, signs in another account next to the others
gymgym login| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
logout
Section titled “logout”Sign out of a profile (default: the current one) and forget it
gymgym logout| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
whoami
Section titled “whoami”Show the signed-in account
gymgym whoami| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
profile list
Section titled “profile list”Every signed-in profile; * marks the one commands use
gymgym profile list| Argument | Description |
|---|---|
--json |
Print JSON instead of text |
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
profile use
Section titled “profile use”Make a profile the one commands use from now on
gymgym profile use <name>| Argument | Description |
|---|---|
<name> |
Profile name |
--json |
Print JSON instead of text |
profile remove
Section titled “profile remove”Sign out of a profile and forget it
gymgym profile remove <name>| Argument | Description |
|---|---|
<name> |
Profile name |
settings
Section titled “settings”Show your settings, or change them: weight unit (kg or lb), rest time, effort scale, language, week start, where planned sessions start
gymgym settings| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
--unit <value> |
Weight unit for everything you see and type (one of kg, lb) |
--rest <value> |
Default rest between sets: 90, 90s or 1:30 |
--effort <value> |
Rate the effort of each set (one of off, rir, rpe) |
--language <value> |
App language code: en, de, es, fr, it, pt, pl, tr, ru, zh, ko, hi |
--week-start <value> |
First day of the week (one of monday, sunday) |
--rest-timer <value> |
Automatic rest after each set (one of on, off) |
--start-from <value> |
Planned sessions without progression start from the plan or from that routine’s last session (one of plan, last) |
config
Section titled “config”Show where the CLI keeps its settings, the profile and the server it uses
gymgym config| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
Today’s routine with the target for every exercise
gymgym today| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
--date <value> |
Another day (YYYY-MM-DD) |
plan show
Section titled “plan show”Your week: which routine runs on which day
gymgym plan show| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
plan load
Section titled “plan load”Add a ready-made plan (its routines; the week is only filled when it is empty)
gymgym plan load <kind>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<kind> |
ppl, full-body or upper-lower |
plan set
Section titled “plan set”Choose the routine for a weekday, or make it a rest day
gymgym plan set <weekday> <routine>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<weekday> |
mon … sun |
<routine> |
Routine name (or a unique start of it), or “rest” |
plan import
Section titled “plan import”Add the routines from a plan file (from gymgym plan export or a share)
gymgym plan import <file>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<file> |
Plan file (JSON) |
--take-week |
Also replace your Monday–Sunday schedule with the file’s |
plan export
Section titled “plan export”Save your routines and week as a plan file others can import
gymgym plan export| Argument | Description |
|---|---|
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--out <value> |
File to write (default: print to stdout) |
routine list
Section titled “routine list”Your routines, with how many exercises and which weekdays they run on
gymgym routine list| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
routine show
Section titled “routine show”A routine with its exercises; –json prints it as a routine document
gymgym routine show <routine>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name (or a unique start of it) or id |
routine create
Section titled “routine create”Create an empty routine, then add exercises to it
gymgym routine create <name>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<name> |
Routine name |
--progression <value> |
How it progresses: linear, greyskull, double, time, none (default linear) |
--icon <value> |
Icon: dumbbell, barbell, bench, pullup, squat, trophy … |
routine add
Section titled “routine add”Add an exercise to a routine
gymgym routine add <routine> <exercise>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
<exercise> |
Exercise name or id (see gymgym exercises) |
--sets <value> |
Number of sets (1–20) |
--reps <value> |
Reps, or a range such as 8-12 |
--time <value> |
Hold or cardio duration instead of reps, e.g. 45s or 1:30 |
--weight <value> |
Starting weight in your unit (“none” to clear) |
--rest <value> |
Rest after each set, e.g. 90 or 1:30 (“none” for the default) |
--superset <value> |
Superset group letter shared with the exercises it alternates with (“none” to clear) |
--progression <value> |
Override the routine rule: linear, greyskull, double, time, none, or “default” |
--at <value> |
Position to insert at (default: last) |
routine edit
Section titled “routine edit”Change one exercise in a routine (by its number in routine show)
gymgym routine edit <routine> <number>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
<number> |
Exercise number, from routine show |
--exercise <value> |
Swap in another exercise, keeping the sets |
--sets <value> |
Number of sets (1–20) |
--reps <value> |
Reps, or a range such as 8-12 |
--time <value> |
Hold or cardio duration instead of reps, e.g. 45s or 1:30 |
--weight <value> |
Starting weight in your unit (“none” to clear) |
--rest <value> |
Rest after each set, e.g. 90 or 1:30 (“none” for the default) |
--superset <value> |
Superset group letter shared with the exercises it alternates with (“none” to clear) |
--progression <value> |
Override the routine rule: linear, greyskull, double, time, none, or “default” |
routine remove
Section titled “routine remove”Remove an exercise from a routine (by its number in routine show)
gymgym routine remove <routine> <number>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
<number> |
Exercise number, from routine show |
routine move
Section titled “routine move”Move an exercise to another position in the routine
gymgym routine move <routine> <number> <to>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
<number> |
Exercise number, from routine show |
<to> |
New position |
routine update
Section titled “routine update”Rename a routine or change its progression or icon
gymgym routine update <routine>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
--name <value> |
New name |
--progression <value> |
linear, greyskull, double, time, none |
--icon <value> |
Icon key |
routine delete
Section titled “routine delete”Delete a routine (its weekdays become rest days; logged workouts stay)
gymgym routine delete <routine>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<routine> |
Routine name or id |
--yes |
Required: confirms the deletion |
routine apply
Section titled “routine apply”Create or replace a whole routine from a routine document (JSON file, or - for stdin). With an “id” it replaces that routine; without, it creates one
gymgym routine apply <file>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<file> |
Routine document, or - to read stdin |
routine schema
Section titled “routine schema”Print the JSON Schema of routine documents (–example: a sample document)
gymgym routine schema| Argument | Description |
|---|---|
--example |
Print an example document instead |
workout start
Section titled “workout start”Log today’s routine set by set, starting from its targets, then see your records
gymgym workout start| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
--routine <value> |
Another routine than today’s (name or a unique start of it) |
--bodyweight <value> |
Your body weight today, in your unit |
--as-planned |
Log every set exactly as prescribed, without asking |
workout show
Section titled “workout show”One logged workout set by set; –json prints it as a workout document
gymgym workout show <workout>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<workout> |
Workout id (or its start), a date, or “last” |
workout apply
Section titled “workout apply”Log or correct a whole workout from a workout document (JSON file, or - for stdin). With an “id” it replaces that workout; without, it logs a new one
gymgym workout apply <file>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<file> |
Workout document, or - to read stdin |
workout delete
Section titled “workout delete”Delete a logged workout
gymgym workout delete <workout>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<workout> |
Workout id (or its start), a date, or “last” |
--yes |
Required: confirms the deletion |
workout schema
Section titled “workout schema”Print the JSON Schema of workout documents (–example: a sample document)
gymgym workout schema| Argument | Description |
|---|---|
--example |
Print an example document instead |
Record sets of one exercise without a routine, e.g. gymgym log “bench press” 80x5 80x5 82.5x4
gymgym log <exercise> <sets>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<exercise> |
Exercise name or id (see gymgym exercises) |
<sets> |
One or more sets: 80x5, x12, 45s, optionally @8 |
--date <value> |
Day of the workout (default today) |
workouts
Section titled “workouts”Recent workouts
gymgym workouts| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
--limit <value> |
How many to show (default 10) |
weight
Section titled “weight”Log body weight, or list recent readings when no value is given
gymgym weight [value]| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<value> |
Body weight in your unit |
--date <value> |
Day of the reading (default today) |
--days <value> |
How many days back to list (default 30) |
exercises
Section titled “exercises”Search the exercise library and your own exercises
gymgym exercises [query]| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<query> |
Words in the name |
import
Section titled “import”Import history from a Strong, Hevy or FitNotes CSV, straight from Hevy (“hevy” with an API key), or body weight from Apple Health export.xml
gymgym import <file>| Argument | Description |
|---|---|
--profile <value> |
Account profile to use (default: $GYMGYM_PROFILE or the current one; see gymgym profile) |
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--json |
Print JSON instead of text |
<file> |
CSV export, Apple Health export.xml, or “hevy” to read your Hevy account |
--hevy-key <value> |
Hevy API key (Hevy Pro: Settings → Developer); or set HEVY_API_KEY. Never stored. |
--unit <value> |
Unit of the weights if the file does not say (one of kg, lb) |
--yes |
Write without asking |
--dry-run |
Show what would be imported and stop |
export
Section titled “export”Download a full backup of your data as JSON
gymgym export| Argument | Description |
|---|---|
--url <value> |
gymgym server (default: the profile’s server, $GYMGYM_URL or https://gymgym.club) |
--out <value> |
File to write (default: print to stdout) |