dotworkout

v0.8.0
io.github.javierferrersb/dotworkout Checked 14 hours ago Published 1 day ago

Build custom Apple Watch workouts: intervals, repeats, and heart rate, pace and power targets.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_activities List activities

Every activity that can be built, with the goals and alerts each one supports indoors and out. Read this before building a workout: support differs per activity and guessing produces files the Watch rejects.

describe_activity Describe an activity

Goals, alerts and caveats for one activity, from the compatibility matrix read off a real device.

ParameterTypeDescription
activity *string

validate_workout Validate a workout

Check a workout against what the activity supports, without building it. Returns every error and warning, each naming the step it is about. Unverified combinations warn rather than fail.

ParameterTypeDescription
activity *stringcall list_activities for what each one supports
blocks *array
cooldownobject
locationstringindoor changes what a sport offers: a stationary bike has no speed or distance
namestringshown in the Workout app and on the link, e.g. "Norwegian 4×4"; always give one, short enough for the Watch
warmupobject

create_workout Create a workout

Build a workout and return a link (and a QR code) that opens it on the user's iPhone, ready to save into the Fitness app, which sends it to the Watch; give outputPath to also write the .workout file. Always give the user the markdown link it returns, with the full URL inside. Check list_activities first for what the activity supports.

ParameterTypeDescription
activity *stringcall list_activities for what each one supports
blocks *array
cooldownobject
locationstringindoor changes what a sport offers: a stationary bike has no speed or distance
namestringshown in the Workout app and on the link, e.g. "Norwegian 4×4"; always give one, short enough for the Watch
outputPathstringalso write the file here: a folder such as ~/Desktop, or a full path such as ~/Desktop/4x4.workout. Use ~ or an absolute path; a relative one is relative to wherever the client started this server
warmupobject

inspect_workout Inspect a workout

Decode a workout and describe it, step by step. Takes a dotworkout link, or the path to a .workout file.

ParameterTypeDescription
linkstringdeprecated: use source
pathstringdeprecated: use source
sourcestringa dotworkout URL (or its #w=… fragment), or a path to a .workout file