kgdistiller
A local research knowledge base of source-backed records in your Obsidian vaults.
[](LICENSE)
[](pyproject.toml)
[](manifest.json)
[](https://github.com/qiulinfan/kgdistiller/releases)
[](https://github.com/qiulinfan/kgdistiller/actions/workflows/ci.yml)
**English** · [简体中文](README_zh-CN.md)
## Highlights
- Keep definitions, results and the relations between them as Markdown records
next to the papers and notes they cite, each with a verbatim quote and a line
range.
- Bind a relation to any number of participants by role, using kinds and roles
you declare per document type.
- Search every registered vault at once through one SQLite index; `kgd search`
fuses full-text, dense-embedding (for example BGE-M3) and name matches.
- Review and edit records in Obsidian, with a typed graph view, and let coding
agents capture, compile and query them through Skills and an MCP server.
This repository holds the Obsidian plugin and the Python core, both at
**1.0.0**, the first stable release. They are versioned and tagged separately: plugin tags are bare
`x.y.z`, core tags are `core-x.y.z`.
## Why the knowledge graph comes first
> 我们这个 research oriented 的知识库,我之所以把知识图谱作为其最根本的核心,本质上是我认为:
>
> 一篇知识密集、研究性的知识源并不是每段文字都是关键,有很多东西是规范性目的或者“向读者证明我这个研究/架构有意义”。但是,它们进入我的眼睛的时候,我早就确认了它们是有意义的,因而我们真正需要的知识仅仅只是这个文章的一些知识节点而已。
>
> 这个 philosophy 是这个图谱的关键,因而检索“到底在哪篇文章的哪个段落”是完全依赖知识图谱的,向量和 bm25 检索也仅仅针对每个知识节点。
An agent can first find a record, then inspect its original context:
```sh
kgd get research:sigma-algebra --source-lines 20
```
This reads the live cited range with 20 lines on either side. For more context,
the agent uses the base root from `kgd base list` and the record's relative
`source` path to read the original file. Context stays in the source; the
record's base, path, lines and evidence already provide the connection.
## Obsidian plugin
Open the [kgdistiller community listing](https://community.obsidian.md/plugins/kgdistiller),
choose **Add to Obsidian**, then enable **kgdistiller**. For a manual install,
download `main.js`, `manifest.json` and `styles.css` from the
[plugin release](https://github.com/qiulinfan/kgdistiller/releases) into
`