Turns a repository's README.md and docs/*.png into a publishable market card: bilingual title and tagline, install command, a screenshot wall, capabilities, and an explicit limitations section — as self-contained HTML, a 2400px 2x PNG, a paste-ready card.md, and provenance-rich card.json. It refuses to invent copy: missing English goes into a missing-fields list, --strict exits 2, and a normal run stamps DRAFT. PNG rendering uses the local Chrome or Edge headlessly; without one the HTML is still written and the CLI exits 3. 48 node --test tests, zero runtime dependencies.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:dingchenhui0618-arch/dsh-market-card
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.

把仓库现状变成一张可以直接贴出去的市场卡片。
一个 DSH 插件,也是一个独立 CLI:读仓库里的 README.md、package.json 和 docs/*.png,生成 1200px 宽的中英双语卡片——标题、一句话、安装命令、截图墙、能力、限制——同时输出静态 HTML、2x PNG,以及一段可以直接粘进上架 PR 的 Markdown。
上架流程里,PR 描述和截图现在多半是手工拼的,限制声明也常常漏写。这个工具只做一件事:把仓库里已经存在的事实排版成卡片;缺什么就写「缺」,不翻译、不补写、不编造。

能力
- 从 README 提取中文标题(首个加粗短语)、英文标题(H1)、中英一句话与安装命令
- 从 README 图片和
docs/**/*.png拼截图墙,最多 4 张,太小的图(图标)自动跳过 - 生成自包含 HTML:截图以 data URI 内嵌,离线可开,也可以直接贴进 PR 预览
- 调用本机 Chrome / Edge 渲染 2x PNG,默认 2400px 实际像素,同时校验浏览器真的写出了一个尺寸正确的文件
- 输出
card.md:标题、安装命令、能力/限制、截图,一段可直接粘贴的上架 PR 片段 - 输出
card.json:每个字段来自哪个文件的哪一行、缺失哪些字段,都记在 provenance 里 --strict在字段不全时退出码 2 且不写文件;不加 strict 时卡片会盖DRAFT章并列出待补字段- 插件面板:填仓库路径 → 生成 → 直接预览 PNG、打开 HTML、复制安装命令,不用切终端
快速开始
作为 DSH 插件
dsh plugin --profile <你的 profile> add dsh-market-card
重启 Web GUI 后,对话视图顶部会多出「市场卡片」标签页。把仓库根目录(含 README.md)填进去即可。插件只在你点「生成卡片」时读本地文件,不联网。
作为 CLI
node bin/market-card.mjs ../my-plugin --out dist
node bin/market-card.mjs ../my-plugin --strict --json
需要 Node ≥ 20(开发与测试用 24.x),零运行时依赖。
用 market-card.json 补文案
自动提取是启发式的,英文尤其需要人来写。在仓库根放一个 market-card.json:
{
"category": "tools",
"title": { "zh": "示例插件", "en": "Demo Plugin" },
"tagline": { "zh": "一句话中文。", "en": "One English sentence." },
"capabilities": { "zh": ["..."], "en": ["..."] },
"limitations": { "zh": ["..."], "en": ["..."] },
"screenshots": [
{ "path": "docs/panel.png", "caption": { "zh": "面板", "en": "The panel" } }
]
}
完整示例见 examples/dsh-warden.market-card.json,它生成的卡片是 docs/example-card.png:

工具不做机器翻译。英文缺失就进 missing 列表;--strict 会因此拒绝出卡片。这是刻意的:上架卡片里的英文应该由作者确认,而不是由工具猜。
输出
| 文件 | 内容 |
|---|---|
card.html |
自包含 HTML,图片内嵌,可直接浏览器打开或贴进 PR |
card.png |
2x 截图,默认 2400px 宽(--scale 1 可降到 1200px) |
card.md |
可直接粘贴的 Markdown 片段 |
card.json |
结构化 provenance:来源文件、行号、缺失字段、图片尺寸 |
卡片字段
| 字段 | 来源 | 是否必需 |
|---|---|---|
| 中文标题 | market-card.json 或 README 首个加粗短语 |
是 |
| 英文标题 | market-card.json 或 README H1 |
是 |
| 中文一句话 | market-card.json 或首个中文段落 |
是 |
| 英文一句话 | market-card.json、英文段落或 package.json description |
是 |
| 安装命令 | README 里第一条 sh / bash 代码块 |
是 |
| 截图 | market-card.json,或 README 图片 + docs/**/*.png |
至少 1 张 |
| 能力 | market-card.json 或 ## 能力 小节 |
中英各至少 1 条 |
| 限制 | market-card.json 或 ## 限制 小节 |
中英各至少 1 条 |
| 版本 / 许可 / DSH 范围 / 分类 | package.json、market-card.json |
否,有就显示 |
限制
- 必须装有 Chromium 系浏览器(Chrome / Edge)。找不到时仍然写 HTML,PNG 报
browser-missing,CLI 退出码 3;可用DSH_MARKET_CARD_BROWSER指定可执行文件 - 卡片固定 1200 CSS 宽,不响应式;比 16000px 还高时拒绝出图,避免生成一张没人能贴的图
- 提取是启发式的:标题取首个加粗短语、安装命令取第一个代码块。README 结构特别怪时,请用
market-card.json覆盖 - 不做机器翻译、不生成事实、不读 git 历史以外的外部数据;截图只来自仓库里已有的图片
- 不推断市场分类:
market-card.json没写category就不显示,不会猜 - 只读本地文件,不上传、不联网、无遥测;生成过程不修改被读取的仓库
设计
纸色 #f4f1ea、墨色 #16140f、深绿 #0f5c4a、砖红 #a63d2f;62px 中文标题、等宽英文副题、深色安装条、截图墙、左右双栏的能力/限制、底部四格事实带。所有文案在一张 1200px 的「纸」上,按阅读顺序排;不用圆点装饰、不用渐变、不堆图标。
PNG 由无头 Chromium 两遍渲染:先读页面测量出的高度,再以该高度截图;PNG 的 IHDR 会被重新读一遍,尺寸不符就报错,而不是交一张裁掉的图。
参考与区别
- 骨架:零依赖构建、
cordis.patch.yml、host/client 双半区、README 与测试结构照抄了用户指定的相邻项目dsh-warden。没有复制它的业务代码。 - 相邻项目:同作者的
dsh-launch-card也把 README 变成卡片。它的 README 明确写「不合成 PNG」「截图原样引用,不做二次加工」,并用源码行号做可见引用。本项目的区别是:真实 PNG 输出、docs/*.png截图墙、把中英限制声明做成必需字段并用--strict拦截、额外产出card.md与机器可读的card.json。没有复制它的代码或 lint 规则。 - 不同产物:
dsh-readme-reel做的是截图 → 视频,本项目做的是静态卡片。
开发
node scripts/build.mjs # src/ -> lib/,并把客户端样式内联进 lib/client.js
node --test # 48 个测试,全部使用假浏览器,不需要真的装 Chrome
lib/ 是构建产物,需要提交;CI 会重新构建并检查 lib/ 没有差异。
License
MIT
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 92724
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 657
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
ECNU/EduWork#dsh-knowledge-studio★ 275
A workspace-based Studio for source-grounded reports, slides, tables, mind maps, quizzes, flashcards, audio and video, using DSH models and shared artifact services. Office generation requires Python 3.12+ with its dependencies and DSH_OFFICE_PYTHON configured; media rendering requires Chromium, and local ASR additionally requires whisper.cpp and a model.
PerryLink/dsh-industry-research★ 215
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
HuanLinOTO/dsh-plugin-mineru★ 51
Expose MineRU document parsing tools to the model.
PolinniZhong/dsh-knit★ 48
Puts the Markdown documents, source files, images and video that already exist anywhere in the session workspace into the DSH sidebar, ranked by relevance to the current conversation. The default lexical mode matches your recent messages against title, summary and body locally with IDF weighting (BM25) — no model calls, no network, nothing leaves the machine. The list comes from scanning the workspace rather than from a recent-files list, so restarting DSH or opening a new session does not empty it. Results are organised into a three-tier reading order (primary / supporting / related) with a verifiable reason on every row — which field matched, which document cites this one — and one click opens an in-place preview: Markdown as rendered text, relative-path images actually drawn, source code with the host's own syntax highlighting, video streamed over HTTP Range. The same Context Pack is exposed to the agent as a knit_docs tool. Later versions added read evidence and lifecycle tracking (attribution is frozen at the moment of reading), pin / exclude (exclusion applies before retrieval, and is undoable), relation evidence (references / imports / tests, with line numbers) and an incremental index reused across restarts. Since v0.23 there is also an optional hybrid mode: it is off by default and only runs once you configure an Ollama or OpenAI-compatible embedding provider yourself. When it runs, what leaves the machine is your query text plus each candidate file's title and summary — a Markdown summary is an excerpt of the body's first paragraph (at most 60 characters), a code file's summary is its workspace-relative directory, and an image or video contributes its file name; full bodies and absolute paths are not sent, and a loopback provider keeps everything on this machine. Since v0.24 it also associates uncommitted changes: a read-only git status (fixed argv, no shell, whitelisted child-process environment) combined with the same reference / import / test / mention evidence shows which files a change is likely to drag along, and it is off by default. The benefit of semantic retrieval still awaits a real-provider run, so no recall improvement is claimed.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.