endurance-coach 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +94 -0
- package/bin/claude-coach.js +10 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +1077 -0
- package/dist/db/client.d.ts +8 -0
- package/dist/db/client.js +111 -0
- package/dist/db/migrate.d.ts +1 -0
- package/dist/db/migrate.js +14 -0
- package/dist/db/schema.sql +105 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +13 -0
- package/dist/lib/config.d.ts +27 -0
- package/dist/lib/config.js +86 -0
- package/dist/lib/logging.d.ts +13 -0
- package/dist/lib/logging.js +28 -0
- package/dist/schema/training-plan.d.ts +288 -0
- package/dist/schema/training-plan.js +88 -0
- package/dist/schema/training-plan.schema.d.ts +1875 -0
- package/dist/schema/training-plan.schema.js +418 -0
- package/dist/strava/api.d.ts +5 -0
- package/dist/strava/api.js +63 -0
- package/dist/strava/oauth.d.ts +4 -0
- package/dist/strava/oauth.js +113 -0
- package/dist/strava/types.d.ts +46 -0
- package/dist/strava/types.js +1 -0
- package/dist/viewer/lib/UpdatePlan.d.ts +48 -0
- package/dist/viewer/lib/UpdatePlan.js +209 -0
- package/dist/viewer/lib/export/erg.d.ts +26 -0
- package/dist/viewer/lib/export/erg.js +208 -0
- package/dist/viewer/lib/export/fit.d.ts +25 -0
- package/dist/viewer/lib/export/fit.js +308 -0
- package/dist/viewer/lib/export/ics.d.ts +13 -0
- package/dist/viewer/lib/export/ics.js +142 -0
- package/dist/viewer/lib/export/index.d.ts +50 -0
- package/dist/viewer/lib/export/index.js +229 -0
- package/dist/viewer/lib/export/zwo.d.ts +21 -0
- package/dist/viewer/lib/export/zwo.js +233 -0
- package/dist/viewer/lib/utils.d.ts +14 -0
- package/dist/viewer/lib/utils.js +123 -0
- package/dist/viewer/main.d.ts +5 -0
- package/dist/viewer/main.js +6 -0
- package/dist/viewer/stores/changes.d.ts +21 -0
- package/dist/viewer/stores/changes.js +49 -0
- package/dist/viewer/stores/plan.d.ts +11 -0
- package/dist/viewer/stores/plan.js +40 -0
- package/dist/viewer/stores/settings.d.ts +53 -0
- package/dist/viewer/stores/settings.js +215 -0
- package/package.json +74 -0
- package/templates/plan-viewer.html +70 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Felix Rieseberg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Endurance Coach
|
|
2
|
+
|
|
3
|
+
Endurance Coach allows you to use Claude (or any AI assistant) to create custom-tailored training programs for triathlons, marathons, and other endurance activities. Using a data-driven approach and principles from top training plans, the AI will create a training plan that's uniquely fit for you, your personal fitness, and the constraints you have in the next couple of weeks. Maybe you're recovering from an injury, maybe you're traveling and don't have access to a pool or track in a certain week - tell the AI about it and it'll create a plan that works for you.
|
|
4
|
+
|
|
5
|
+
The output is a beautiful training plan app that allows you to add, edit, or move workouts, mark them as complete, and update key training data like heart rate zones, LTHR, threshold paces, FTP, and others. Your data is kept locally in your browser.
|
|
6
|
+
|
|
7
|
+
Workouts can be exported as simple calendar events (.ics), Zwift (.zwo), Garmin (.fit), or TrainerRoad/ERG (.mrc) workouts.
|
|
8
|
+
|
|
9
|
+
## Examples
|
|
10
|
+
|
|
11
|
+
See example training plans at [shiv19.github.io/endurance-coach-skill](https://shiv19.github.io/endurance-coach-skill/#demos).
|
|
12
|
+
|
|
13
|
+
## Installation & Creating a training plan
|
|
14
|
+
|
|
15
|
+
This skill works with any AI assistant that supports Skills (Claude.ai, Claude Code, and others). To use this tool, you need access to an AI assistant with network access for Skills. Depending on user/admin settings, Skills may have full, partial, or no network access.
|
|
16
|
+
|
|
17
|
+
Syncing all your Strava activities and creating a tailored training plan takes ca. 15 minutes.
|
|
18
|
+
|
|
19
|
+
### Installing the Skill
|
|
20
|
+
|
|
21
|
+
Install the skill using the following command:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx skills add shiv19/endurance-coach-skill
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command works with any AI assistant that supports skills (Claude.ai, Claude Code, and others).
|
|
28
|
+
|
|
29
|
+
**Additional Setup for Claude.ai:**
|
|
30
|
+
|
|
31
|
+
If you're using Claude.ai, you'll also need to:
|
|
32
|
+
|
|
33
|
+
1. Open [Claude.ai Settings](https://claude.ai/settings/capabilities)
|
|
34
|
+
2. Enable "Code execution and file creation"
|
|
35
|
+
3. In the allowed domains list, add `*.strava.com`
|
|
36
|
+
|
|
37
|
+
### Creating a plan
|
|
38
|
+
|
|
39
|
+
Use the most capable model available to you. Prompt your AI assistant with something like this:
|
|
40
|
+
|
|
41
|
+
> Help me create a training plan for the Ironman 70.3 Oceanside on March 29th 2026 using the "endurance-coach" skill.
|
|
42
|
+
|
|
43
|
+
Your AI assistant will ask how you'd like to provide your fitness data. You have two options: You can either tell the AI about your fitness history manually - or you can give it access to your Strava activities. I recommend the later - data doesn't lie and more data allows the AI to make a training plan that really fits you.
|
|
44
|
+
|
|
45
|
+
#### Option 1: Connect to Strava (Recommended)
|
|
46
|
+
|
|
47
|
+
The easiest way to get a personalized plan is to let your AI assistant analyze your Strava training history. This gives the AI real data about your current fitness, training patterns, and progress.
|
|
48
|
+
|
|
49
|
+
The AI needs a `Client ID` and `Client Secret` to access your Strava activities. You're only giving the AI access to your data - nobody else gets to see it.
|
|
50
|
+
|
|
51
|
+
1. Go to [strava.com/settings/api](https://www.strava.com/settings/api) and log in with your Strava account
|
|
52
|
+
2. You'll see a form titled "My API Application" - fill it out:
|
|
53
|
+
- **Application Name**: Enter anything you like (e.g., "Endurance Coach")
|
|
54
|
+
- **Category**: Select "Data Importer"
|
|
55
|
+
- **Club**: Leave this blank
|
|
56
|
+
- **Website**: Enter any URL (e.g., `https://claude.ai`)
|
|
57
|
+
- **Application Description**: Enter anything (e.g., "Training plan generation")
|
|
58
|
+
- **Authorization Callback Domain**: Enter `localhost`
|
|
59
|
+
3. Check the box to agree to Strava's API Agreement and click **Create**
|
|
60
|
+
4. Copy your **Client ID** and **Client Secret** and give them to the AI when prompted
|
|
61
|
+
|
|
62
|
+
#### Option 2: Manual Entry
|
|
63
|
+
|
|
64
|
+
Don't use Strava, or prefer not to connect it? No problem. You can tell the AI about your fitness directly. Be prepared to share:
|
|
65
|
+
|
|
66
|
+
**Current Training (recent 4-8 weeks):**
|
|
67
|
+
|
|
68
|
+
- Weekly training hours by sport (swim/bike/run)
|
|
69
|
+
- Typical long session distances (longest ride, longest run, etc.)
|
|
70
|
+
- Training consistency (how many weeks have you been training regularly?)
|
|
71
|
+
|
|
72
|
+
**Performance Benchmarks (any you know):**
|
|
73
|
+
|
|
74
|
+
- Bike FTP (Functional Threshold Power) in watts
|
|
75
|
+
- Run threshold pace or recent race times (5K, 10K, half marathon, etc.)
|
|
76
|
+
- Swim CSS (Critical Swim Speed) or recent time trial (e.g., 1000m time)
|
|
77
|
+
- Max heart rate and/or lactate threshold heart rate
|
|
78
|
+
|
|
79
|
+
### Telling the AI about your event & constraints
|
|
80
|
+
|
|
81
|
+
In the next step, the AI will ask you about yourself, the event you're training for, and any constraints it should keep in mind. Examples of information you'd tell any coach:
|
|
82
|
+
|
|
83
|
+
- Years in the sport
|
|
84
|
+
- Previous races completed (distances and approximate times)
|
|
85
|
+
- Any recent breaks from training
|
|
86
|
+
- Injuries or health issues
|
|
87
|
+
- Schedule limitations (work travel, family, etc.)
|
|
88
|
+
- Equipment access (pool availability, trainer, etc.)
|
|
89
|
+
|
|
90
|
+
The AI will use this information to create a plan tailored to your current fitness level. The more detail you provide, the better your plan will be.
|
|
91
|
+
|
|
92
|
+
# About
|
|
93
|
+
|
|
94
|
+
Endurance Coach is an independent, open-source project based on Felix Rieseberg's Claude Coach. It is not made by, endorsed by, or affiliated with Anthropic, PBC. "Claude" is a trademark of Anthropic. This skill works with Claude and other AI assistants but is developed and maintained independently. License: MIT.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { dirname, join } from "path";
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const cliPath = join(__dirname, "..", "dist", "cli.js");
|
|
8
|
+
|
|
9
|
+
// Dynamically import the compiled CLI
|
|
10
|
+
await import(cliPath);
|