deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Likenttt/garmin-connect-plugin-for-dsh
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin that brings your Garmin fitness & health data into the AI agent loop.
| Icon | App | What it does |
|---|---|---|
| GameraSnap | Control your phone camera from your Garmin watch | |
| WristAlbum | Keep a private photo album on your Garmin | |
| WristTale | Read TXT and Markdown on your Garmin watch | |
| WristPass | Keep cards and tickets ready on your wrist | |
| 2FA4G | Keep offline 2FA codes on your Garmin | |
| JiaKe.app | Turn Garmin screenshots into polished assets |
This plugin connects DeepSeek Harness to Garmin Connect, exposing your wearable data as AI-callable tools. Once installed, the DeepSeek agent can automatically query your activities, sleep, steps, and heart rate to provide personalized fitness insights — all through natural language.
| Tool | Description | Example Args |
|---|---|---|
get_garmin_activities |
Fetch recent activities (runs, rides, swims…) with pace, HR, calories | |
get_garmin_sleep |
Sleep score, duration, and stage breakdown (deep / light / REM) | |
get_garmin_steps |
Daily step count, goal progress, and walking distance | |
get_garmin_heart_rate |
Resting, max, and min heart rate for a given day | {"startDate": "2023-10-01", "endDate": "2023-10-02"} |
get_garmin_weight |
Body composition (weight, BMI, body fat %, muscle mass, etc.) | {"startDate": "2023-10-01"} |
get_garmin_workouts |
Planned workouts from your Garmin calendar | {"limit": 10, "offset": 0} |
get_garmin_profile |
User profile summary | null |
export_garmin_session |
Export a session token for password-free future logins | null |
get_running_skill_advice |
Expert running coaching: 8 core training skills with HR zones, practice methods & common mistakes | {"query": "threshold", "includeRecentActivities": true} |
create_garmin_workout |
Create a structured workout (warmup/interval/repeat/cooldown with pace & HR targets) that syncs to the watch | {"name": "Threshold 3×8min", "steps": [...]} |
npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add dsh-plugin-garmin-connect
This single command installs the dependency and activates the plugin layer — the first run automatically initializes the web profile. You only need pnpm on your PATH:
npm install -g pnpm
--legacy-peer-deps=falsemakes npm resolve peer dependencies normally. If your npm config haslegacy-peer-deps=true(it skips peer packages), dsh would fail to boot withERR_MODULE_NOT_FOUND: Cannot find package '@deepseek-ai/cordis-plugin-group'. On machines without that setting the flag is a harmless no-op.
Verify the plugin layer is composed without booting:
npx --legacy-peer-deps=false @deepseek-ai/dsh --profile web --dump-config | grep -A 2 garmin-connect
Other install sources:
# Local checkout (development)
cd dsh-plugin-garmin-connect && npm install
npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add .
# GitHub source install
npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add github:<owner>/<repo>
npx --legacy-peer-deps=false @deepseek-ai/dsh web
The web UI starts at http://127.0.0.1:3080 by default. If you launch Harness via npx, keep using the same prefix for the commands below (npx --legacy-peer-deps=false @deepseek-ai/dsh …); if you have dsh installed globally, you can drop the npx @deepseek-ai/ prefix.
This plugin never stores passwords in config files or logs. Credentials are resolved through environment variables.
# Copy the template
cp .env.example .env
# Edit .env and fill in your Garmin credentials
Put the .env file in the directory you run dsh from (your workspace root) — the plugin loads it automatically.
| Variable | Required | Description |
|---|---|---|
GARMIN_USERNAME |
✅ | Your Garmin account email |
GARMIN_PASSWORD |
✅* | Account password |
GARMIN_SESSION_TOKEN |
✅* | Pre-authenticated token (alternative to password) |
GARMIN_REGION |
❌ | global (default) or cn for Garmin China |
GARMIN_CACHE_TTL |
❌ | Cache duration in seconds (default: 300) |
GARMIN_LOG_LEVEL |
❌ | debug | info | warn | error |
GARMIN_ACTIVITY_DETAIL |
❌ | Default detail for get_garmin_activities: compact (default, curated fields, saves context) or full (all raw Garmin fields) |
* You need either
GARMIN_PASSWORDorGARMIN_SESSION_TOKEN, not both.⚠️ If your password contains
#or other special characters, wrap it in double quotes — otherwise#and everything after it will be treated as a comment:GARMIN_PASSWORD="my#secret!pass"
npx --legacy-peer-deps=false @deepseek-ai/dsh web
Open http://127.0.0.1:3080. The plugin is loaded when Settings → Plugins → Plugin list shows plugin-garmin-connect as mounted & enabled. Then try: "How was my sleep last night?" or "Show me my last 5 runs."
After configuring .env, you can run the integration test to verify all API connections:
npm run test:integration
🔌 Garmin Connect Integration Test
Domain : garmin.com
User : your-email@example.com
Date : 2026-08-18
── 1. Login ──
✅ Login successful
── 2. Activities ──
✅ Got 3 activities
{
"id": 23998327113,
"name": "Wuhan Running",
"type": "running",
"startTime": "2026-08-16 19:33:05",
"distanceMeters": 10017.73,
"durationSeconds": 3965,
"averageHeartRate": 145,
"maxHeartRate": 180,
"averagePaceMinPerKm": 6.6,
"calories": 656,
"elevationGainMeters": 4,
"averageCadence": 141.78
}
── 3. Sleep ──
✅ Sleep score: 82, duration: 7.5h
── 4. Steps ──
✅ Steps: {
"date": "2026-08-18",
"totalSteps": 8523,
"goal": 10000,
"distanceMeters": 6120,
"highlyActiveSeconds": 1800
}
── 5. Heart Rate ──
✅ Resting HR: 42, Max: 98
── 6. Weight / Body Composition ──
✅ Weight: 70.5 kg, BMI: 22.3, Body Fat: 15.2%
── 7. Workouts / Calendar ──
✅ Got 5 planned workouts
{
"id": 1422905279,
"name": "跃升之阶",
"description": "",
"sportType": "running",
"createdDate": "2025-12-28T19:28:56.0",
"estimatedDurationMins": 94,
"estimatedDistanceMeters": null
}
── 8. User Profile ──
✅ Profile: loaded
── 9. Export Session Token ──
✅ Token exported (oauth1 key: ********…)
💡 To use token-based auth, save the full JSON to GARMIN_SESSION_TOKEN in .env
🏁 Integration test complete.
Your credentials never leave your machine.
1. Plugin config values (set on the plugin row in a profile patch / `--patch` overlay)
↓ fallback
2. Environment variables (.env / shell)
↓ fallback
3. Schema defaults
| Practice | Status |
|---|---|
Passwords loaded exclusively from process.env |
✅ |
.env is in .gitignore |
✅ |
Secrets marked with role('secret') in Cordis schema — excluded from trajectory logs |
✅ |
| Session token support — avoids storing password entirely | ✅ |
| Tool outputs never include raw credentials | ✅ |
| In-memory cache reduces API calls (rate-limit protection) | ✅ |
For maximum security, log in once with a password, then export and store only the session token:
You (to DeepSeek agent): "Export my Garmin session token"
# Agent calls: export_garmin_session
# → Returns a token string
# Add to .env:
GARMIN_SESSION_TOKEN=<the-token>
# Remove the password:
# GARMIN_PASSWORD=
This plugin also ships as a standalone MCP (Model Context Protocol) server, so you can use the same Garmin tools with Claude Desktop, Codex CLI, Cursor, Windsurf, and any other MCP-compatible client — no DeepSeek Harness required.
Edit ~/.claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"garmin-connect": {
"command": "npx",
"args": ["-y", "dsh-plugin-garmin-connect", "garmin-connect-mcp"],
"env": {
"GARMIN_USERNAME": "your@email.com",
"GARMIN_PASSWORD": "yourpassword",
"GARMIN_REGION": "global"
}
}
}
}
Restart Claude Desktop. You'll see a 🔌 icon indicating the tools are loaded. Try: "Show my last 5 runs" or "Create a threshold workout and sync to my watch".
garmin-connectnpx -y dsh-plugin-garmin-connect garmin-connect-mcpGARMIN_USERNAME, GARMIN_PASSWORD, GARMIN_REGIONAdd to your .codex/config.json:
{
"mcpServers": {
"garmin-connect": {
"command": "npx",
"args": ["-y", "dsh-plugin-garmin-connect", "garmin-connect-mcp"],
"env": {
"GARMIN_USERNAME": "your@email.com",
"GARMIN_PASSWORD": "yourpassword"
}
}
}
}
# Clone and build
git clone https://github.com/Likenttt/garmin-connect-plugin-for-dsh.git
cd dsh-plugin-garmin-connect && npm install && npm run build
# Run the MCP server (stdin/stdout)
GARMIN_USERNAME=xxx GARMIN_PASSWORD=xxx node lib/mcp.js
The MCP server exposes all 10 tools (activities, sleep, steps, heart rate, weight, workouts, profile, session export, running skills, and workout creation) through standard MCP protocol.
┌─────────────────────────────────────────┐
│ DeepSeek Harness (dsh) │
│ │
│ ┌───────────────────────────────────┐ │
│ │ dsh-plugin-garmin-connect │ │
│ │ │ │
│ │ ┌─────────┐ ┌─────────────┐ │ │
│ │ │ Config │───▶│ GarminClient│ │ │
│ │ │ (Schema) │ │ (cached) │ │ │
│ │ └─────────┘ └──────┬──────┘ │ │
│ │ │ │ │
│ │ ┌─────────────────────▼───────┐ │ │
│ │ │ Tool Registry (10) │ │ │
│ │ │ • get_garmin_activities │ │ │
│ │ │ • get_garmin_sleep │ │ │
│ │ │ • get_garmin_steps │ │ │
│ │ │ • get_garmin_heart_rate │ │ │
│ │ │ • get_garmin_weight │ │ │
│ │ │ • get_garmin_workouts │ │ │
│ │ │ • get_garmin_profile │ │ │
│ │ │ • export_garmin_session │ │ │
│ │ │ • get_running_skill_advice │ │ │
│ │ │ • create_garmin_workout │ │ │
│ │ └─────────────────────────────┘ │ │
│ └───────────────────────────────────┘ │
│ Cordis Runtime │
└────────────────┬────────────────────────┘
│
┌──────────┴──────────┐
▼ ▼
connect.garmin.com MCP Server (stdio)
connect.garmin.cn → Claude / Codex /
Cursor / Windsurf
# Clone & install
git clone https://github.com/Likenttt/garmin-connect-plugin-for-dsh.git
cd dsh-plugin-garmin-connect
npm install
# Build
npm run build
# Watch mode
npm run dev
# Run tests
npm test
src/
├── index.ts # Plugin entry point (Cordis apply function)
├── config.ts # Configuration schema with env-var resolution
├── client.ts # Garmin API wrapper with caching
├── mcp.ts # Standalone MCP server for Claude/Codex/Cursor
├── knowledge/
│ ├── running-skills.ts # 8-skill running coaching knowledge base
│ └── workout-schema.ts # Workout definition → Garmin JSON builder
├── tools/
│ └── index.ts # Tool definitions & registration (10 tools)
└── utils/
├── cache.ts # In-memory TTL cache with SWR
└── format.ts # Raw-data → LLM-friendly formatters
The package is a standard dsh bundle: package.json declares dsh.bundle.patch → cordis.patch.yml, and files ships the compiled lib/, both READMEs, and the patch file.
npm run build # prepublishOnly also runs this automatically
npm publish
After publishing, users install with a single command:
npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add dsh-plugin-garmin-connect
Distribution notes:
lib/, so no build permission is needed at install time.npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add . links the source directory; run npm install first.npx --legacy-peer-deps=false @deepseek-ai/dsh plugin --profile web add github:<owner>/<repo> fetches sources and runs the package's prepare script to build them (self-contained, pinned TypeScript via npx); pnpm ≥ 10 refuses to run the script until you allow it — dsh prints the exact allowBuilds key for the profile's pnpm-workspace.yaml.dsh-plugin topic to your GitHub repository for discoverability.list_garmin_accounts — list configured accounts with connection statuscompare_garmin_accounts — diff activities across two accounts (fuzzy match by time + distance + type)sync_garmin_activity — download FIT from source account → upload to target accountGARMIN_USERNAME_2 / GARMIN_PASSWORD_2 / GARMIN_REGION_2 (fully backward-compatible)CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。