Introduction¶
DeepSeek Harness (DSH) uses an “everything is a plugin” architecture. dsh-garmin-coach is a plugin maintained by developer csustyang, designed to connect users’ Garmin Connect activity data to DSH and generate training suggestions and plans through local AI analysis.
The plugin performs data synchronization by reverse-engineering Garmin Connect’s internal APIs, and all data is stored locally. Before using it, note that Garmin accounts may be rate-limited or banned due to abnormal login behavior, and DSH requires special permissions to write local data when running in sandbox mode.
Core Features¶
Data Sync and Authentication¶
The plugin supports CN and international account login, with authentication implemented through DI OAuth2. Access tokens are valid for about 1 hour and support automatic refresh. Synchronization uses an incremental strategy to avoid repeatedly pulling full data, and supports manually triggered sync to reduce detection by Garmin’s behavioral fingerprinting.
Activity Dashboard and Analysis¶
After synchronization, the plugin provides an activity dashboard in the DSH sidebar, displaying more than 30 analysis metrics, including distance, pace, heart rate, HR-Pace, cadence, TRIMP score, time-of-day distribution, and consistency.
AI Training Capabilities¶
Based on the synchronized data, the AI can generate training recommendations (such as PB trends and mileage suggestions) and structured training plans. Users can issue commands directly in the conversation to generate and save plans, or record a training diary after a workout.
Local Persistence¶
All data (synchronized data, training plans, and training diaries) is stored under the local ~/data/ directory and is not uploaded to any server. Password and email are transmitted only in the HTTP body during login and are not persisted.
Installation and Enablement¶
When DSH starts, it only explicitly loads packages listed in the dsh.profile.bundles array. Therefore, you must add the package manually after installation.
1. Install the plugin¶
Open a terminal, navigate to the DSH web profiles directory, and install it:
cd ~/.dsh/profiles/web
pnpm add dsh-garmin-coach
2. Configure bundles¶
Edit ~/.dsh/profiles/web/package.json and add "dsh-garmin-coach" to the end of the dsh.profile.bundles array.
"dsh": {
"profile": {
"bundles": [
...其他包,
"dsh-garmin-coach"
]
}
}
Alternatively, append it directly using the command line:
cd ~/.dsh/profiles/web
node -e "
const fs = require('fs');
const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));
if (!p.dsh.profile.bundles.includes('dsh-garmin-coach')) {
p.dsh.profile.bundles.push('dsh-garmin-coach');
fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
}
"
3. Restart DSH¶
ddsh restart
Initial Configuration¶
- Open DSH settings and find the Garmin Coach card.
- Select the account region (CN or International).
- Enter your email address and password.
- If SMS MFA is required, enter the verification code.
- Click Save Configuration and wait for the token to be automatically refreshed and saved.
- Click “Sync Now” to pull historical data.
Common Usage¶
In DSH conversations, you can invoke tools directly using natural language:
- View Report:
garmin_report(month)(view a monthly report) - Query Performance:
garmin_best_pace(10000)(query best pace for 10km) - Generate Plan:
garmin_training_plan+garmin_save_training_plan(generate and save a training plan) - Record Diary:
garmin_log_diary(record today’s training feelings and rating)
Important Notes¶
Sandbox File Access Permissions¶
The plugin needs to write training plans, diaries, and other files to the ~/data/ directory. If DSH is running in sandbox mode, it does not have write permission by default, which can cause data saving to fail.
* macOS: On first write, you must allow “Full Disk Access” in the system dialog.
* Windows: Enable “Full File Access” in DSH sandbox/security options and restart.
* Linux: Usually has permission by default; if issues occur, check directory permissions.
Account Security and Compliance¶
The plugin calls reverse-engineered APIs and is not an official Garmin client. Frequent use or bulk operations may cause the account to be rate-limited or banned. The plugin is intended for learning and personal research only. Do not use it in any scenario that violates Garmin’s Terms of Service.
Data Storage¶
All data is stored in the local ~/data/ directory (on Windows, the data folder under the DSH startup directory), including garmin.json, training-plan.json, and training-diary.json.
Summary¶
dsh-garmin-coach provides DSH users with a solution for turning personal activity data into AI context. It does not rely on cloud synchronization services and processes all data locally, making it suitable for developers who want AI assistance in creating training plans.
- Project URL: https://github.com/csustyang/dsh-garmin-coach
- Catalog page: https://www.skillhub.cn/plugins/csustyang/dsh-garmin-coach