Preface¶
In the DSH development process, session content often remains in-process or within persistent files. To consolidate it into a local knowledge base, the common approach is to manually export, organize the Markdown, and then place it into a vault directory.
dsh-obsidian-export is a DeepSeek Harness (DSH) plugin. It treats a vault as a Markdown folder, does not depend on the Obsidian application itself, and provides a set of model-callable tools: export session, read notes, search content, list directory, aggregate tags, and find backlinks.
Below is an introduction to its positioning, features, installation method, and typical usage.
What is it¶
dsh-obsidian-export is maintained by xiaomiba0904, and the repository address is:
https://github.com/xiaomiba0904/dsh-obsidian-export
It is positioned as a DSH plugin with the core goals of:
- Exporting DSH sessions as Markdown files in an Obsidian vault;
- Providing tools within the vault for reading, searching, listing directories, tag statistics, and backlinks queries;
- Not requiring the Obsidian application; the vault is treated as a directory for storing Markdown files.
The license is MIT.
Core Features¶
The plugin provides six model-side tools.
obsidian_export¶
Used to export DSH sessions to the vault and generate Markdown content.
Capabilities mentioned in the documentation include:
- Default export of the current session;
- Support for specifying a persistent session via
sessionId; - Support for importing
session.jsonlorsession.jsonl.zstdviapath; - Support for different export modes, including
create,skip,update,overwrite, anddry-run.
The behavior of obsidian_export export modes as given in the documentation is as follows:
| mode | New session | Content changed | Content unchanged |
|---|---|---|---|
auto |
create |
update |
skip |
update |
create |
update |
skip |
overwrite |
create |
overwrite |
overwrite |
skip |
create |
skip |
skip |
dry-run |
dry-run |
dry-run |
dry-run |
dry-run only reports results and does not perform actual writing.
obsidian_read¶
Used to read a note.
Returned content includes:
- Body text;
- Parsed frontmatter;
- The first H1 heading;
[[wikilink]]targets;#tags.
obsidian_search¶
Used to search within the vault.
The documentation states it can search by the following fields:
filename: matches path;content: full-text content search.
It also supports narrowing the scope by tags.
obsidian_list¶
Used to list Markdown notes and folders under the vault path.
The documentation states:
- Recursively list;
- Supports optional
subpath.
obsidian_tags¶
Used to aggregate different #tags appearing throughout the vault.
The documentation states it provides the note count for each tag.
obsidian_backlinks¶
Used to find notes linking to a target note.
The documentation states it is oriented towards graph traversal and can be used to view related content by following link relationships.
Additionally, package.json description mentions automatic vault discovery, but the scraped documentation does not provide its parameters or behavioral details; use the source code in the repository and runtime behavior as the standard.
Installation and Activation¶
Below are the installation command examples provided in the verified documentation:
dsh plugin --profile web add /absolute/path/to/dsh-obsidian-export
Here, --profile web is an example profile mentioned in the documentation. The documentation does not specify if the web profile must be used; simply replace it with your target profile in actual use.
During installation, the documentation states that dsh plugin will:
- Install the package to the profile’s
node_modules; - Detect the
dsh.bundle.patchdeclaration; - Append the patch to
dsh.profile.bundlesin~/.dsh/profiles/<name>/package.json.
Note when activating the tool:
Bundle layers only mount at process boot, so a full restart of the profile is required to activate the tool.
In other words, plugin mounting occurs during the profile process startup phase. After installation, you need to restart the corresponding profile for the tool to take effect.
Before restarting, you can first check the configuration composition; the command provided in the documentation is:
dsh --profile web --dump-config
After restarting, you can start:
dsh --profile web
The plugin depends on the following peer packages being resolvable:
{
"peerDependencies": {
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
"@deepseek-ai/schemastery": "^3.18.1",
"@deepseek-ai/dsh-session-persistence": "^0.1.0-rc.6",
"@deepseek-ai/dsh-fs": "^0.1.0-rc.6"
}
}
The documentation also mentions that if installed via pnpm file: or link: from a directory, it is necessary to ensure these @deepseek-ai/* peer packages are resolvable, for example, by placing them in the plugin’s own node_modules, or relying on the profile’s node_modules hoisting.
Typical Usage¶
Below are model invocation examples provided in the documentation.
Export current session¶
obsidian_export(vaultDir="/path/to/vault", mode="auto")
Used to export the current session.
Export specific jsonl file¶
obsidian_export(vaultDir="/path/to/vault", path="exported/session.jsonl")
Used to import an exported session.jsonl.
Read note¶
obsidian_read(vaultDir="/path/to/vault", path="Inbox/My Note.md")
Used to read a specific Markdown note.
List directory¶
obsidian_list(vaultDir="/path/to/vault", subpath="Inbox")
Used to view notes and folders under a specific subpath.
Search filename¶
obsidian_search(vaultDir="/path/to/vault", query="rag")
The documentation states this is a filename match.
Search content¶
obsidian_search(vaultDir="/path/to/vault", query="embedding", field="content")
Used to search by content.
Search by tags¶
obsidian_search(vaultDir="/path/to/vault", query="rag", tags="pkms#research")
Used to narrow the scope in search results by tags.
Aggregate tags¶
obsidian_tags(vaultDir="/path/to/vault")
Used to view the different tags appearing in the vault and their note counts.
Find backlinks¶
obsidian_backlinks(vaultDir="/path/to/vault", target="Welcome")
Used to find notes linking to Welcome.
The documentation also provides a common workflow:
obsidian_list -> obsidian_read -> obsidian_search -> obsidian_backlinks -> obsidian_export
In other words, you can first see what is in the vault, then read specific notes, search for relevant content, follow backlinks to view related notes, and finally export the session to the vault.
If you are concerned that the export might overwrite existing content, you can first use dry-run:
obsidian_export(vaultDir="/path/to/vault", sessionId="session-<id>", mode="dry-run")
Used to preview whether the target will be created, skipped, updated, or overwritten.
Suitable Scenarios and Notes¶
This plugin is suitable for the following scenarios:
- You want to save DSH sessions as Markdown rather than leaving them in temporary output or logs;
- Your local knowledge base is an Obsidian vault, and you wish to maintain it directly via folders and Markdown files;
- You want the model to read, search, and associate existing notes during the session;
- You want to perform a
dry-runbefore executing the export to confirm whether it will cause creation, updates, or overwrites.
It is recommended to note the following before using:
- The plugin runs with the permissions of the current DSH process; you should check the source code before installing;
- The license is
MIT, but you should still confirm that the dependency versions match your local environment; - You need to restart the profile after installation because bundle layers are only mounted at process boot;
- The export operation writes to the vault; you can use
dry-runto preview the action before actual writing; - The documentation does not provide plugin category, star count, or directory page URL, so this will not be confirmed here.
Conclusion¶
The value of dsh-obsidian-export lies in connecting DSH sessions with the Markdown vault: exporting sessions, reading notes, searching content, counting tags, and viewing associations along backlinks.
Repository address: