把本机项目接入 Obsidian:有界的 manifest 扫描、确定性的依赖/技术栈/主题边,通过 Local REST API 或 vault 文件系统把带 wiki 链接的笔记写入托管的 graph/ 命名空间。
安装
# Release 预构建包
dsh plugin --profile web add "https://github.com/Harzva/dsh-obsidian/releases/latest/download/harness-flow-dsh-obsidian-0.1.0-alpha.0.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Harzva/dsh-obsidian
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
[!IMPORTANT] Independent, unofficial DSH integration. Works fully offline: the Obsidian app does not need to be running while notes are generated, and no data ever leaves your machine.
Obsidian 如何"识别"本机项目并建立知识图谱
Obsidian 的图谱视图不扫描代码仓库,它只索引 vault 里的 .md 文件 + [[wiki 链接]]。
所以关键不是"让 Obsidian 去扫描项目",而是把项目转译成 Obsidian 能理解的结构,三步完成:
flowchart LR
P["本机项目目录<br/>package.json · Cargo.toml · .git"] --> S["1. 扫描<br/>manifest 探测 · 技术栈 · repo"]
S --> G["2. 建边<br/>依赖 · 技术栈 · 区域 · 主题"]
G --> N["3. 生成笔记<br/>graph/projects/·graph/tech/·graph/areas/"]
N --> V["Obsidian vault<br/>graph/ 命名空间"]
V --> O["图谱视图<br/>按 [[链接]] 聚类成簇"]
- 发现:按
package.json/Cargo.toml/go.mod/pyproject.toml/.git识别项目; 提取 npm name、依赖、描述、技术栈、git remote。 - 建边:依赖(npm name、
workspace:*、file:引用)、技术栈、根目录区域、关键词主题 —— 全部确定性,无虚构关联。 - 落盘:每个项目一张笔记,
graph/tech/<栈>、graph/areas/<区域>、graph/topics/<主题>是 hub 笔记。 Obsidian 打开 vault 即自动索引,图谱视图里 hub 成为簇中心、依赖成为连线。
在 DSH 里只需两步:设置页 扫描项目 → 生成知识图谱。
What works
- Native DSH tab at
Settings → Plugins → Obsidian. - Bounded local project scanner with manifest detection and tech-stack extraction.
- Deterministic knowledge graph: dependency / tech / area / topic edges.
- Dual transport: Obsidian Local REST API (Bearer, loopback) with filesystem fallback — no REST plugin needed.
- Incremental writes via
graph/.dsh-obsidian-state.json; only plugin-managed files are ever rewritten or removed. - Mini force-directed graph preview in the settings tab (dependency view; full graph lives in Obsidian).
- Strict loopback + same-origin guarding; API key never leaves the Host.
Quick start
1. Build and pack the plugin
git clone https://github.com/Harzva/dsh-obsidian.git
cd dsh-obsidian
pnpm install --frozen-lockfile
pnpm check
pnpm run pack:dsh
2. Point it at a vault (optional)
By default the plugin uses the first open vault from Obsidian's obsidian.json and scans
its registered vault paths as project roots. Override per-environment:
# PowerShell
$env:DSH_OBSIDIAN_VAULT = '/Volumes/Ultra/study/harzva-local-knowledge-hub/wiki'
$env:DSH_OBSIDIAN_SCAN_ROOTS = '["/Volumes/Ultra/hzh","/Users/harzva/code"]'
# 可选:Local REST API(安装社区插件后设置 API key)
$env:DSH_OBSIDIAN_API_KEY = 'your-api-key' # 不设置则自动使用文件系统直写
dsh web
3. Install into the DSH Web profile
dsh plugin --profile web add ./artifacts/harness-flow-dsh-obsidian-0.1.0-alpha.0.tgz
dsh web
Open Settings → Plugins → Obsidian, press 扫描项目, then 生成知识图谱.
Switch to Obsidian and open the vault's graph view — graph/index.md links everything.
4. Optional: Live transport via Local REST API
Install the community plugin
Local REST API, enable its
HTTP server (port 27123), copy the API key into DSH_OBSIDIAN_API_KEY, and restart DSH.
Writes then land through the REST API while Obsidian is running.
Development
pnpm check
pnpm run pack:dsh
pnpm run verify:dsh-offline
verify:dsh-offline creates an isolated temporary DSH Home, installs the packed plugin into a real
DSH 0.1.0-rc.6 Web profile, checks the bridge bootstrap and client module, then removes the
temporary profile. It does not read or modify the user's DSH profile.
Project boundaries
| Repository | Responsibility |
|---|---|
| coddingtonbear/obsidian-local-rest-api | Upstream Obsidian REST/MCP plugin (integration contract only) |
Harzva/dsh-obsidian |
This plugin: project scanner, graph generator, DSH bridge and UI |
Docs: docs/ARCHITECTURE.md, docs/PRD.md, docs/REFERENCE.md.
License
MIT © 2026 Harzva
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 34028
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 5298
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1136
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 517
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 507
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 461
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。