dsh-english-study

DSH PLUGIN视觉与多模态

仓库 woshijing1991-cloud/dsh-english-study · npm dsh-english-study

视觉与多模态 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

在 DeepSeek Harness 里边看 YouTube 边学英语:点词查义、生词本配 SM-2 间隔复习、沉浸时长统计与本地仪表盘,数据全部存在本地。

一句话选型结论

按资料字段整理

dsh-english-study 是视觉与多模态类的 DSH 可安装插件,验证等级 L5 · 运行验证通过,安全审查为低风险,列出 5 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类视觉与多模态 收录类型可安装插件 验证等级L5 · 运行验证通过 安全审查低风险
验证等级 L5 L5 · 运行验证通过
GitHub 星标 1 复刻 0 · 未关闭 issue 0
最近更新 2026-11-05 创建于 2026-11-05
README 29.2 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:woshijing1991-cloud/dsh-english-study
  1. 1
    确认版本与运行环境

    兼容的 DSH 版本为 0.2.2-rc.1,Node.js 要求 >=20;版本不匹配时安装会报错。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本0.2.2-rc.1版本不匹配时安装会报错
Node.js 要求>=20来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名dsh-english-study可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-english-study:在 DeepSeek Harness 里边看视频边积累生词

  • 面板内看 YouTube 与字幕
  • 点词即查,附上下文解释
  • 生词本 SM-2 间隔复习
  • 沉浸时长与学习统计
  • 本地 SQLite,无云端同步

适用场景

记忆存储内容创作

上游标签

deepseek-harnessdsh-pluginenglish-learningspaced-repetitionvocabulary

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-11-11): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询

风险详情

  • 结论说明 静态扫描 低;动态审计无结论(以下以静态为准)→ 总评级 低。
  • 风险计数 严重 0 / 高 0

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L5:安装和运行都在沙盒里跑通过,装完能直接用的概率高。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 标注了兼容的 DSH 版本(0.2.2-rc.1),按版本装不容易报错。
  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在视觉与多模态场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-english-study当前 L5 · 运行验证通过 低风险 1 0.2.2-rc.1 有
open-design L4 · 沙盒安装通过 低风险 10.0 万 未标注 有
awesome-gpt-image-2 L3 · 安装规范通过 低风险 3.4 万 未标注 无
PicGo L3 · 安装规范通过 低风险 2.7 万 未标注 无
iPolloWork L4 · 沙盒安装通过 低风险 6,775 未标注 有
modlens L5 · 运行验证通过 低风险 4,207 0.2.0-rc.2 等 13 个 有

仓库档案

视觉与多模态
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方woshijing1991-cloud仓库 dsh-english-study · 默认分支 main
分类视觉与多模态media
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue1 / 0 / 0收录时的数值,非实时
创建 / 更新2026-11-05 · 2026-11-05最后推送 2026-11-05
本站收录2026-11-06首次进入本站目录的时间

README 全文

29.2 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-english-study

> Learn English by actually watching YouTube — immersion time, lookup history, a vocabulary book with SM-2 spaced repetition, and a dashboard. Runs as a plugin inside DeepSeek Harness (DSH). 100% local: no remote server, no cloud sync, no telemetry.

Dashboard on a fresh install (empty data). The footer reports gateway / AI / dictionary state.

Vocabulary book — empty right after install, fills up as you look words up.

In use

After a few days: saved words, due count, streak, daily new-word chart and the most-looked-up words.

Review queue — one card at a time, 认识 / 不认识 grading drives the SM-2 schedule.

Dictionary tab — local lookup first; the AI explanation is optional and off by default.

中文说明见下方


What it is

A DSH plugin panel (top-left icon rail) plus a tiny Python gateway. The panel renders the dashboard, YouTube feed, vocabulary book, review queue, dictionary and reports; the gateway (stdlib-only Python, default 127.0.0.1:8788) stores everything in local SQLite.

YouTube page (Edge/Chrome + ext/)  ──click a word──▶  gateway 127.0.0.1:8788  ──▶  data/*.db
DSH panel (lib/client.js) ──same-origin──▶ /dsh-english-study/api/* ──▶ gateway ──▶ data/*.db

The panel never talks to the gateway cross-origin: the plugin proxies /dsh-english-study/api/* to the upstream URL, so there is no CORS or mixed-content problem and you only change one config value to move the port.

Features

  • YouTube in the panel — topic-aggregated home feed, real search with paging, official /embed/ player (videos are never downloaded), clickable subtitles.
  • Click-to-look-up — click any word on a YouTube subtitle, the browser extension sends it (with its sentence) to your local gateway.
  • Context explanation — optional AI (any OpenAI-compatible endpoint you configure). Without it the panel falls back to the local dictionary only and makes no network request at all.
  • Vocabulary book + SM-2 — again / good / easy grading, ease factor, interval, lapses, due queue with a badge count on the sidebar icon.
  • Immersion tracking — per-day seconds watched, lookups, distinct words, streak.
  • Dashboard / reports / CSV export — local HTML pages served by the gateway.
  • Dictation & sentence collection — drill the words you saved, keep sentences you liked.
  • Read-only model tool — english_study (stats / dict / due) so the agent can answer "what should I review today".

Requirements

DSH 0.2.x desktop, Web frontend
Node ≥ 20 (plugin side)
Python ≥ 3.10, stdlib only — nothing to pip install
OS Windows 10/11 for the full feature set (Edge auto-launch, cookie extraction). The gateway itself is cross-platform.
Required for subtitles yt-dlp on PATH, recent build. A 2024 release fails with Precondition check failed / No video formats found; apt builds often cannot self-update, so grab the GitHub release binary. Without yt-dlp the panel still runs, but there are no clickable subtitles.
Required for browsing YT_INNERTUBE_KEY — a YouTube web-client key. Without it the YouTube home/search lists are empty (the rest of the panel works). See Configuration.
Optional a local proxy if YouTube is blocked where you are

Install

1. Drop the plugin into a DSH profile

Put this repository anywhere on disk (/opt/dsh-english-study, or D:/plugins/dsh-english-study on Windows). Then edit your profile — default ~/.dsh/profiles/desktop/package.json:

{
"dependencies": {
"dsh-english-study": "file:/absolute/path/to/dsh-english-study"
},
"dsh": {
"profile": {
"bundles": [
// ...existing entries...
"dsh-english-study"
]
}
}
}

That is all. The package declares dsh.bundle.patch (cordis.patch.yml), so being listed in bundles is what inserts the loader entry. Do not also add an insert block for this plugin in the profile's own cordis.patch.yml — a duplicate loader id fails the boot check. (Only if your DSH build does not layer bundled patches, move the insert there instead of listing it in bundles.)

Then let DSH install the profile dependency on next start (or run the profile's own package-manager install).

> file: dependencies are copied into node_modules, not symlinked. After you edit plugin source, re-install (or re-copy) the profile dependency, otherwise you are still running the old copy.

2. Start the local gateway

cd dsh-english-study/gateway
python server.py            # listens on 0.0.0.0:8788

> ⚠️ The gateway has no authentication. It is meant for your own machine. Set ES_HOST=127.0.0.1 unless you specifically want your phone on the same Wi-Fi, and never expose port 8788 to the internet — no router port-forwarding, no public reverse proxy.

On Windows you can double-click start-gateway.cmd (visible window, errors stay on screen). The plugin auto-starts the gateway when it is down, unless ES_GATEWAY_DIR points somewhere else:

  • Windows — runs start-gateway-hidden.cmd (it sets ES_API / ES_MODEL itself).
  • macOS / Linux — runs python3 gateway/server.py directly (override the interpreter with ES_PYTHON). Note this spawns the process with the environment it inherits, so ES_API / ES_MODEL / ES_KEY must already be exported if you want AI enabled.

No pip install, no database migration: data/english-study.db is created on first run.

3. Restart DSH

Host-side code and slot registration are collected at startup. Restart DSH, refresh the GUI, and the "English Study" icon appears in the left icon rail.

Verify (any shell, clean machine):

# 1) the gateway answers
curl -s http://127.0.0.1:8788/api/health
# {"ok":true,"ai":false,"model":"","local_only":true,"port":8788,"dict":false,...}

# 2) the plugin route is mounted inside the DSH GUI
GUI_PORT=8045   # replace with your DSH GUI port (shown in DSH settings)
curl -s "http://127.0.0.1:${GUI_PORT}/dsh-english-study/api/client-ping"
# {"ok":true,"plugin":"dsh-english-study"}

"ai":false / "local_only":true is the expected default state, not an error. "dict":false only means you have not built the dictionary yet.

Configuration

Everything is an environment variable or a plugin config field. Nothing is required for the core features — the defaults work offline.

Setting Env var Default What it does
Gateway port ES_PORT 8788 Port the Python gateway listens on. Change it here and in the plugin's gateway config.
Bind address ES_HOST 0.0.0.0 0.0.0.0 also serves your phone on the same Wi-Fi; set 127.0.0.1 to keep it local-only.
Gateway directory ES_GATEWAY_DIR the plugin's own folder Where start-gateway*.cmd lives (used by the auto-start).
Upstream URL ES_GATEWAY (or plugin config gateway) http://127.0.0.1:8788 What the DSH plugin proxies /dsh-english-study/api/* to.
AI endpoint ES_API empty OpenAI-compatible /chat/completions URL. Empty ⇒ local dictionary only.
AI model ES_MODEL empty Model name sent to the endpoint, e.g. deepseek-chat.
AI key ES_KEY (or DEEPSEEK_API_KEY) empty Read from the environment only; never written to disk.
Python interpreter ES_PYTHON python / python3 Used by the .cmd launchers and by the macOS/Linux auto-start — set a full path if python is not on your PATH.
Base path plugin config basePath /dsh-english-study Same-origin route prefix.
Default tab plugin config defaultTab dashboard Which panel tab opens first.
YouTube proxy ES_PROXY empty (direct) e.g. http://127.0.0.1:7890; direct forces no proxy.
YouTube browse key YT_INNERTUBE_KEY empty Web-client key for the InnerTube calls behind the home/search lists. Empty ⇒ those lists stay empty; subtitles and playback are unaffected.
Learning browser exe ES_EDGE standard Edge path Browser used for the click-to-look-up window.
Learning browser profile ES_LEARN_PROFILE ~/.dsh/english-study-edge-profile Separate profile so extensions can load.
Extension folder ES_LEARN_EXT this repo's ext/ Loaded unpacked into the learning browser.

Enabling AI (optional)

export ES_API=https://api.deepseek.com/chat/completions
export ES_MODEL=deepseek-chat
export ES_KEY=sk-your-own-key          # keep it in your shell profile, never in the repo
python gateway/server.py               # health now reports "ai": true

Windows cmd.exe: use set "ES_API=..." instead of export. PowerShell: $env:ES_API="...". Any OpenAI-compatible /chat/completions endpoint works — it does not have to be DeepSeek.

With AI enabled you additionally get: context-aware explanation (part of speech in this sentence, collocations, CEFR, morphology) and sentence translation. With AI disabled you still get: local dictionary lookup, vocabulary book, SM-2 review, immersion stats, dashboard — and the gateway makes zero outbound requests for those features.

Local dictionary (optional, but recommended)

data/dict.db is not shipped (it is a 26 MB generated artifact). Build it once from ECDICT (MIT):

# 1) download ECDICT's ecdict.csv and put it in /data/ecdict.csv
# 2) run this from the repository root
python gateway/build_dict.py

Without it, /api/dict answers {"found": false, "error": "dict-not-built"} and lookups fall through to the AI branch (if configured).

Browser extension

Easiest: click open learning browser in the panel — it launches Edge with this repo's ext/ mounted, no command needed.

Manual route: open edge://extensions (or chrome://extensions) → enable Developer mode → Load unpacked → pick this repo's ext/ folder. The extension only ever posts to http://127.0.0.1:8788 (editable in its popup).

If you prefer the command line, run this from the repository root on Windows:

"%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" --user-data-dir="%USERPROFILE%\.dsh\english-study-edge-profile" --load-extension="%CD%\ext" --disable-extensions-except="%CD%\ext"

Data & privacy

  • No remote server. The published version has no cloud-sync code path at all: no account, no token, no upload endpoint.
  • All learning data lives in local SQLite under gateway/../data/: english-study.db (lookups, words, reviews, immersion, sentences, dictation), dict.db (your dictionary build), yt-cache/, yt-thumbs/.
  • Outbound requests exist only for content you asked for: youtube.com / i.ytimg.com (feed, search, thumbnails, subtitles via yt-dlp) and your own AI endpoint if you configure one. Nothing is sent to the author.
  • The API key stays in an environment variable: it is never written to disk, never logged, never included in errors.
  • YouTube cookie extraction (optional, GET /api/yt/login?action=extract) shells out to yt-dlp --cookies-from-browser, keeps the value in memory only, and deletes the temp file immediately. Nothing is persisted or transmitted anywhere but YouTube.
  • data/, *.db, *.log, raw/ are in .gitignore — your own study history can never be committed by accident.

Known limitations

  • AI is bring-your-own-endpoint. No key is bundled; without one there is no context explanation and no translation (local dictionary only).
  • Phone access needs ES_HOST=0.0.0.0 and the same Wi-Fi; the gateway has no authentication, so do not expose it to the internet.
  • Windows-leaning extras. Edge auto-launch and cookie extraction are Windows paths/behaviours; the gateway and panel otherwise run anywhere Python and Node do.
  • No Android usage backfill. The mobile/UsageStats companion from the private version is not part of this release; immersion time comes from the panel/extension.
  • YouTube subtitles need yt-dlp (recommended install). Subtitles are fetched with yt-dlp --skip-download (the video itself is never downloaded). Without yt-dlp: no clickable subtitles and no sign-in browsing — review, dictionary, immersion stats and the dashboard still work.
  • yt-dlp must be reasonably new. A 2024 build fails with Precondition check failed / No video formats found; update to the current release (yt-dlp -U, or your package manager's newest) before blaming the plugin.
  • An empty YouTube list is usually a missing key, not a broken plugin. Home/search go through YouTube's InnerTube API, which needs YT_INNERTUBE_KEY; without it you get zero items while everything else keeps working.
  • dict.db must be built by you (licensing + size, see above).
  • file: dependencies are copies — editing plugin source does not hot-reload; re-install the profile dependency and restart DSH.

Repository layout

dsh-english-study/
├── index.js                 # host side: same-origin API proxy, gateway auto-start, english_study tool
├── lib/client.js            # panel UI (dashboard / learn / words / review / dict / settings)
├── cordis.patch.yml         # loader insert config
├── package.json
├── gateway/
│   ├── server.py            # stdlib HTTP + SQLite gateway (port 8788)
│   ├── build_dict.py        # ECDICT csv -> data/dict.db
│   └── web/                 # standalone dashboard / review / words / report pages
├── ext/                     # unpacked browser extension (content script, popup, manifest)
├── start-gateway.cmd        # visible launcher (no secrets inside)
├── start-gateway-hidden.cmd # silent launcher used by the plugin
├── LICENSE                  # MIT
└── README.md

Troubleshooting

Symptom Fix
Icon missing after restart The profile dependency was not installed, or the loader id is duplicated/missing. Check the DSH plugin log and ~/.dsh/dsh-english-study-load-logs/plugin-loaded.jsonl.
Panel says gateway unreachable Start it: python gateway/server.py. Check ES_PORT matches the plugin's gateway config.
"ai": false in health Expected without ES_API + ES_KEY. That is local-dictionary mode, not an error.
dict-not-built Build data/dict.db (see above).
Subtitles empty Install yt-dlp and/or set ES_PROXY if YouTube is blocked.
Word popup empty on YouTube Load ext/ as an unpacked extension in the browser you actually watch YouTube in.

Compatibility

  • DeepSeek Harness 0.2.x desktop, Web frontend only (dsh.client.platform: web).
  • Python 3.10+ (no third-party packages), Node ≥ 20.
  • Panel and gateway may live on different machines in principle — but there is no auth, so keep them local.

License

MIT — see LICENSE. ECDICT, if you build dict.db from it, is MIT as well.


中文说明

> 边看 YouTube 边学英语:沉浸时长、查词记录、生词本 + SM-2 复习、看板。作为 DeepSeek Harness(DSH) 的插件运行。纯本地:不连任何远程服务器,没有云同步,没有遥测。

用几天之后:已存词数、待复习数、连续天数、每日新增词曲线、近 30 天高频查词。

复习队列:一次一张卡,认识 / 不认识 的判分直接驱动 SM-2 排期。

这是什么

一个 DSH 插件面板(左侧图标栏)+ 一个极小的 Python 网关。面板负责看板、YouTube 首页、生词本、复习队列、词典和报表;网关(纯标准库 Python,默认 127.0.0.1:8788)把所有数据写进本机 SQLite。

YouTube 页面(Edge/Chrome + ext/)──点词──▶ 网关 127.0.0.1:8788 ──▶ data/*.db
DSH 面板(lib/client.js)──同源──▶ /dsh-english-study/api/* ──▶ 网关 ──▶ data/*.db

面板不跨域直连网关:插件把 /dsh-english-study/api/* 代理到上游地址,所以没有 CORS / 混合内容问题,换端口只改一个配置。

功能

  • 面板内刷 YouTube——主题聚合首页、真翻页搜索、官方 /embed/ 播放器(视频从不下载)、可点字幕。
  • 划词即查——在 YouTube 字幕里点任意单词,浏览器扩展把单词 + 所在句发给本机网关。
  • 语境解释——可选 AI(你自己配 OpenAI 兼容端点);不配就只用本地词典,且一个外部请求都不发。
  • 生词本 + SM-2——again / good / easy 判分、ease、间隔、lapses,待复习队列,侧栏图标带角标数。
  • 沉浸统计——每日秒数、查词数、去重词数、连续天数。
  • 看板 / 周报 / CSV 导出——网关直接提供的本地 HTML 页。
  • 听写与会话本——拿存下的词做听写,收藏喜欢的句子。
  • 只读模型工具——english_study(stats / dict / due),可以直接问「今天该复习什么」。

环境要求

DSH 0.2.x 桌面版(Web 前端)
Node ≥ 20(插件侧)
Python ≥ 3.10,纯标准库,不需要 pip install 任何东西
系统 完整体验(一键拉起 Edge、读浏览器 cookie)面向 Windows 10/11;网关本身跨平台
字幕需要 yt-dlp 加进 PATH,且版本要新。2024 的版本会报 Precondition check failed / No video formats found;apt 装的那份往往不能自更新,去 GitHub 下 release 二进制
浏览需要 YT_INNERTUBE_KEY——YouTube 网页端 key。不填的话首页/搜索列表是空的(面板其余部分正常)
可选 YouTube 被墙时自备代理

安装(三步)

① 把插件放进 DSH profile

把本仓库放到本机任意位置(如 /opt/dsh-english-study,Windows 上如 D:/plugins/dsh-english-study),然后改 profile(默认 ~/.dsh/profiles/desktop/package.json):

{
"dependencies": {
"dsh-english-study": "file:/absolute/path/to/dsh-english-study"
},
"dsh": {
"profile": {
"bundles": [
// ……原有条目保持不动……
"dsh-english-study"
]
}
}
}

就这些。包自带 dsh.bundle.patch(cordis.patch.yml),写进 bundles 就是插入加载器条目的方式。不要同时在 profile 自己的 cordis.patch.yml 里为它写 insert——重复的 loader id 会让启动检查失败。(只有你的 DSH 构建不叠自带补丁时,才改成把 insert 写在那里、并从 bundles 里去掉。)

然后让 DSH 在下次启动时安装这份 profile 依赖(或用 profile 自己的包管理器装一次)。

> file: 依赖是复制到 node_modules,不是软链。改了插件源码必须重新安装(或重新复制)这份依赖,否则跑的还是旧副本。

② 起本机网关

cd dsh-english-study/gateway
python server.py            # 监听 0.0.0.0:8788

> ⚠️ 网关没有任何鉴权,它是给自己本机用的。除非你确实要让同一 Wi-Fi 的手机访问,否则把 ES_HOST 设成 127.0.0.1;永远不要把 8788 暴露到公网——不要做路由器端口映射、不要拿公网反代。

Windows 上也可以双击 start-gateway.cmd(有窗口,报错停住给你看)。网关停机时插件会自动拉起(除非 ES_GATEWAY_DIR 指向别处):

  • Windows:跑 start-gateway-hidden.cmd(脚本自己设 ES_API / ES_MODEL)。
  • macOS / Linux:直接跑 python3 gateway/server.py(解释器可用 ES_PYTHON 覆盖)。注意它是继承当前环境启动的,想让 AI 生效得先自己 export ES_API / ES_MODEL / ES_KEY。

不需要 pip install、不需要建库迁移:首次运行自动创建 data/english-study.db。

③ 重启 DSH

宿主侧代码与插槽注册在启动时一次性收集。重启 DSH、刷新 GUI,左侧图标栏出现「English Study」。

自检:

# 1) 网关活着
curl -s http://127.0.0.1:8788/api/health
# {"ok":true,"ai":false,"model":"","local_only":true,"port":8788,"dict":false,...}

# 2) 插件路由已挂进 DSH GUI
GUI_PORT=8045   # 换成你自己的 DSH GUI 端口(DSH 设置里能看到)
curl -s "http://127.0.0.1:${GUI_PORT}/dsh-english-study/api/client-ping"
# {"ok":true,"plugin":"dsh-english-study"}

"ai":false / "local_only":true 是默认状态,不是错误;"dict":false 只说明你还没构建词典。

配置一览

全部是环境变量或插件配置字段。核心功能零配置,默认值即可离线跑起来。

配置项 环境变量 默认值 作用
网关端口 ES_PORT 8788 Python 网关监听端口。改这里的同时要改插件 gateway 配置。
监听地址 ES_HOST 0.0.0.0 0.0.0.0 让同一 Wi-Fi 的手机也能访问;只想本机用就设 127.0.0.1。
网关目录 ES_GATEWAY_DIR 插件自身目录 start-gateway*.cmd 所在目录(自愈拉起用)。
上游地址 ES_GATEWAY(或插件配置 gateway) http://127.0.0.1:8788 插件把 /dsh-english-study/api/* 代理到哪。
AI 端点 ES_API 空 OpenAI 兼容的 /chat/completions 地址。空 ⇒ 只用本地词典。
AI 模型 ES_MODEL 空 发给端点的模型名,例如 deepseek-chat。
AI 密钥 ES_KEY(或 DEEPSEEK_API_KEY) 空 只从环境变量读,绝不落盘、绝不进日志。
Python 解释器 ES_PYTHON python .cmd 启动脚本用它;python 不在 PATH 上时填完整路径。
路由前缀 插件配置 basePath /dsh-english-study 同源路由前缀。
默认标签页 插件配置 defaultTab dashboard 打开面板先看哪一页。
YouTube 代理 ES_PROXY 空(直连) 例如 http://127.0.0.1:7890;direct 强制直连。
YouTube 浏览 key YT_INNERTUBE_KEY 空 首页/搜索走的 InnerTube 接口需要它。空 ⇒ 这两个列表是空的;字幕与播放不受影响。
学习浏览器 ES_EDGE Edge 标准路径 划词学习窗口用哪个浏览器。
学习浏览器用户目录 ES_LEARN_PROFILE ~/.dsh/english-study-edge-profile 独立 profile,才能加载扩展。
扩展目录 ES_LEARN_EXT 本仓库的 ext/ 以「已解压扩展」方式加载。

启用 AI(可选)

export ES_API=https://api.deepseek.com/chat/completions
export ES_MODEL=deepseek-chat
export ES_KEY=sk-你自己的key            # 放 shell profile 里,别提交进仓库
python gateway/server.py               # health 里 "ai": true

Windows cmd.exe 用 set "ES_API=...";PowerShell 用 $env:ES_API="..."。任何 OpenAI 兼容的 /chat/completions 端点都行,不一定是 DeepSeek。

启用后多出:语境化解释(这个词在这一句里的意思、搭配、CEFR、词根词缀)、整句翻译。不启用也照样能:查本地词典、记生词、SM-2 复习、沉浸统计、看板——这些路径一个外部请求都不发。

本地词典(可选,但强烈建议)

data/dict.db 不随仓库发布(26 MB 生成物)。用 ECDICT(MIT)自己构建一次:

# 1) 下载 ECDICT 的 ecdict.csv,放到 <仓库根>/data/ecdict.csv
# 2) 在仓库根目录执行
python gateway/build_dict.py

没有它时 /api/dict 返回 {"found": false, "error": "dict-not-built"},查词会落到 AI 分支(如果配了 AI)。

浏览器扩展

最省事:点面板里的「打开学习浏览器」,它会自动带上本仓库的 ext/ 拉起 Edge。

手动方式:打开 edge://extensions(或 chrome://extensions)→ 打开「开发者模式」→ 加载已解压的扩展 → 选本仓库的 ext/ 目录。扩展只向 http://127.0.0.1:8788 发请求(地址可在它的 popup 里改)。

想在命令行里开,在仓库根目录执行(Windows):

"%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" --user-data-dir="%USERPROFILE%\.dsh\english-study-edge-profile" --load-extension="%CD%\ext" --disable-extensions-except="%CD%\ext"

数据与隐私

  • 没有远程服务器。 发布版里没有任何云同步代码路径:没有账号、没有 token、没有上传接口。
  • 所有学习数据都在本机 SQLite(gateway/../data/):english-study.db(查词、生词、复习、沉浸、句子、听写)、dict.db(你自己构建的词典)、yt-cache/、yt-thumbs/。
  • 出站请求只发生在你主动要的内容上:youtube.com / i.ytimg.com(首页、搜索、缩略图、yt-dlp 取字幕),以及你自己配置的 AI 端点。没有任何数据发给作者。
  • API key 只存在环境变量里:不写磁盘、不进日志、不出现在错误信息里。
  • YouTube 登录态(可选,GET /api/yt/login?action=extract)通过 yt-dlp --cookies-from-browser 导出,只在内存里,临时文件读完立即删除,除了 YouTube 不发给任何一方。
  • data/、*.db、*.log、raw/ 已在 .gitignore 里——你的学习记录不可能被误提交。

已知限制

  • YouTube 列表空着,多半是缺 key,不是插件坏了。 首页/搜索走 YouTube 的 InnerTube 接口,需要 YT_INNERTUBE_KEY;不填就是 0 条,而面板其余部分一切正常。
  • AI 要自备端点。 仓库不带任何 key;没有 key 就没有语境解释和翻译(只有本地词典)。
  • 手机端需要 ES_HOST=0.0.0.0 且同 Wi-Fi;网关没有鉴权,不要暴露到公网。
  • 偏 Windows 的附加能力:一键拉 Edge、读浏览器 cookie 是 Windows 路径/行为;网关与面板本身有 Python + Node 就能跑。
  • 没有 Android 使用时长回补。 私有版的手机/UsageStats 采集不在本次发布里;沉浸时长来自面板与扩展。
  • YouTube 字幕要装 yt-dlp,而且版本要新。 2024 的版本会报 Precondition check failed;apt 装的那份通常不能自更新。 字幕用 yt-dlp --skip-download 抓(视频本身从不下载)。不装 yt-dlp:没有可点字幕、没有登录态浏览——复习、词典、沉浸统计、看板照常可用。
  • dict.db 要自己构建(体积与授权原因,见上)。
  • file: 依赖是副本——改插件源码不会热更新,要重装 profile 依赖并重启 DSH。

仓库结构

dsh-english-study/
├── index.js                 # 宿主侧:同源 API 代理、网关自愈拉起、english_study 工具
├── lib/client.js            # 面板 UI(看板 / 学习 / 生词本 / 复习 / 词典 / 设置)
├── cordis.patch.yml         # 加载器 insert 配置
├── package.json
├── gateway/
│   ├── server.py            # 标准库 HTTP + SQLite 网关(端口 8788)
│   ├── build_dict.py        # ECDICT csv -> data/dict.db
│   └── web/                 # 独立看板 / 复习 / 生词本 / 周报页面
├── ext/                     # 已解压浏览器扩展(content script、popup、manifest)
├── start-gateway.cmd        # 有窗口启动(内部不含任何密钥)
├── start-gateway-hidden.cmd # 静默启动(插件自愈用)
├── LICENSE                  # MIT
└── README.md

排障

现象 处理
重启后没有图标 profile 依赖没装,或 loader id 重复/缺失。看 DSH 插件日志和 ~/.dsh/dsh-english-study-load-logs/plugin-loaded.jsonl。
面板说网关不可达 先起网关:python gateway/server.py;再核对 ES_PORT 与插件 gateway 配置是否一致。
health 里 "ai": false 没配 ES_API + ES_KEY 时就是这样,是本地词典模式,不是错误。
dict-not-built 构建 data/dict.db(见上)。
字幕是空的 装 yt-dlp;YouTube 不通就设 ES_PROXY。
YouTube 上划词没反应 在你实际看 YouTube 的浏览器里把 ext/ 作为已解压扩展加载。

兼容性

  • DeepSeek Harness 0.2.x 桌面版,仅 Web 前端(dsh.client.platform: web)。
  • Python 3.10+(无第三方包),Node ≥ 20。
  • 理论上面板与网关可以分机部署,但没有鉴权,建议始终本机。

许可

MIT,见 LICENSE。如果你用它构建 dict.db,ECDICT 同样是 MIT。


Clean-install notes / 干净环境验收说明

  • A bare http://127.0.0.1:/ answering 401 is normal when DSH runs as dsh web: the GUI is token-guarded. Use the ?token=... URL printed at startup. 401 does not mean the plugin failed to load — plugin routes are served behind the same token.
    以 dsh web 方式运行时,GUI 带 token 鉴权,裸访问返回 401 是正常的,要用启动时打印的 ?token= 链接;401 不代表插件没加载。
  • Verified on a clean environment (fresh Ubuntu 24.04 + Node 24 + @deepseek-ai/dsh, no other plugins): the plugin loads with failed: [], all of its routes answer 200, and its client bundle is present in the merged bundle.
    已在干净环境(全新 Ubuntu 24.04 + Node 24 + 单装 DSH,无其它插件)验证:插件加载 failed: [],所有路由 200,客户端 bundle 已打进合并包。

常见问题

9 问
答案由本站依据条目字段整理,不引用上游原文
dsh-english-study 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:woshijing1991-cloud/dsh-english-study` 即可。对应的 npm 包名是 `dsh-english-study`。

dsh-english-study 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-english-study 安全吗?

低风险。静态扫描 低;动态审计无结论(以下以静态为准)→ 总评级 低。

dsh-english-study 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-english-study 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.2-rc.1。

dsh-english-study 需要什么运行环境?

Node.js >=20。环境不满足时安装会失败,建议先确认本机版本。

dsh-english-study 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-english-study 有哪些功能?

面板内看 YouTube 与字幕、点词即查,附上下文解释、生词本 SM-2 间隔复习、沉浸时长与学习统计、本地 SQLite,无云端同步。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

视觉与多模态
按星标排序,可作替代方案

open-design

open-design

L4 · 沙盒安装通过 10.0 万 星

awesome-gpt-image-2

awesome-gpt-image-2

GPT Image 2 / 2.5 提示词与案例库,530+ 个案例、20+ 套工业级模板与可复用 Skills,新增 2.5 同提示词对比

L3 · 安装规范通过 3.4 万 星

PicGo

PicGo

L3 · 安装规范通过 2.7 万 星

iPolloWork

iPolloWork

L4 · 沙盒安装通过 6,775 星

modlens

modlens

ModLens 是 DeepSeek Harness 的视觉插件,为纯文本模型外挂视觉能力,粘贴图片即得结构化 JSON 证据(OCR、版面

L5 · 运行验证通过 4,207 星

OpenBiliClaw

OpenBiliClaw

本地私有、开源的自进化跨平台 AI 内容发现 Agent:先理解你,再主动从 B站、小红书、抖音、YouTube、X、知乎、Reddit、微

L4 · 沙盒安装通过 3,398 星

woshijing1991-cloud 的其它插件

2 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-11-11。