# Local Graph View of Wiki-Link Connections in Markdown Files

**URL:** <https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294>\
**Category:** Tips\
**Tags:** devonthink3\
**Created:** [July 11, 2025, 8:27pm UTC](https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294 "2025-07-11T20:27:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PixelTracker](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/pixeltracker/32/9318_2.png) [@PixelTracker](https://discourse.devontechnologies.com/u/PixelTracker)\
**Post date:** [July 11, 2025, 8:27pm UTC](https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294/1 "2025-07-11T20:27:05Z")

</div>

Hi everyone,

I’d like to share a new tool I built that might be useful to some of you working with interconnected Markdown notes in DEVONthink 3. The tool creates **interactive HTML graphs** of outgoing and incoming Wiki-links for any selected Markdown document in your database. It reveals the local network around a note, including not just direct links but also cross-links between neighbours. It’s not meant to compete with DEVONthink 4’s new graph view, but rather to complement it — and it’s limited to DEVONthink 3 anyway. I think it’s a helpful addition for exploring and clarifying structural relationships between notes, especially in dense or research-oriented setups.

### What it does:

- Visualizes your note connections as an **interactive graph** inside DEVONthink
- Supports **multi-note selection** , **bidirectional linking** , and **cross-linked neighborhoods**
- Creates a **local HTML file** that is saved into your database and **automatically embedded** into the original Markdown note (an `<iframe>` inclusion is added at the end)
- Offers dual display: a fast-loading static layout plus an optional dynamic layout with a physics engine
- Uses [`pydt3`](https://pypi.org/project/pydt3/), the Python API for DEVONthink 3, and AppleScript, which launches the Python script
- All the user needs to do is set up a corresponding Python environment using Conda
- Detailed installation instructions and background information are provided in the [GitHub repository](https://github.com/FabrizioMusacchio/DEVONthink_Note_Graphs)

### Example:

Here’s what a graph might look like (featuring both static layout and a toggle for the physics-based layout):

 ![dt_graph_view_networkx_result](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/e/2/e2828df4d4d07d9cf7bbb20336c6af03e06e5cb2.jpeg)  
Example of a generated graph (here: a note containing all my favorite Sci-Fi movies). Shown is the initial, static `networkx` layout: a clean radial overview centered around the Sci-Fi movies note, with all direct neighbours and visible cross-links.

 ![dt_graph_view_pyvis_simulation](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/5/2/5282d4612e35ee371067e9f0cee46c6113a5c759.jpeg)  
The graph for same note, but with physics simulation enabled via `pyvis`, where the clusters naturally repel into formations based on connection strength.

 ![dt_graph_view_pyvis_simulation_star_wars_cluster](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/9/1/91969c129f4a5aee2d508c65a201331fa315cf50.jpeg)  
Zoomed-in view, showing distinct clusters, here: **Star Wars** cluster that links to a note about **Ritter (Knights)** , suggesting a thematic bridge.

Graph nodes represent DEVONthink Markdown notes; edges are Wiki-links. Color and size reflect node degree and link type.

If you want to see the graph in action, you can do so in this [blog post](https://www.fabriziomusacchio.com/blog/2025-07-02-devonthink_graph_view//#examples).

### Limitations:

The tool currently only works with DEVONthink 3. As soon as the Python library `pydt3` supports DEVONthink 4, I’ll update the script accordingly.

### GitHub:

All code, screenshots, and installation instructions are available 👉 [here](https://github.com/FabrizioMusacchio/DEVONthink_Note_Graphs).

### DEVONthink To Go:

The generated HTML graphs can be opened, rendered, and interacted with on **DEVONthink To Go** (iOS/iPadOS) as well. While you can’t run the script on mobile, the graphs created on macOS remain fully functional and navigable when viewed on your iPad or iPhone.

 ![Bildschirmfoto 2025-07-11 um 22.23.33](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/e/e/ee00c2db7822d7390e3fae9cf4656f011655fca7.jpeg)  
The same graph as above, but viewed on iOS in DEVONthink To Go. The graphs are fully interactive, allowing you to explore clusters and connections just like on the desktop version. The physics simulation works seamlessly in the mobile browser context, providing a dynamic view of your note networks.

* * *

I built this because I often lost track of structural connections in my PKM system — especially in dense research notes. A visual overview of local link neighborhoods helps me find clusters and spot missing links. I’m sharing the tool in case it’s useful to others as well.

If you have questions, ideas, or bug reports, feel free to open an issue on GitHub. Contributions are very welcome ✌

Happy linking!

---

<div class="post-metadata">

**Author:** ![shiiko](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@shiiko](https://discourse.devontechnologies.com/u/shiiko)\
**Post date:** [July 11, 2025, 11:54pm UTC](https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294/2 "2025-07-11T23:54:55Z")

</div>

WOW! Thank you for sharing.

> [@PixelTracker](#):
>
> The tool currently only works with DEVONthink 3. As soon as the Python library `pydt3` supports DEVONthink 4, I’ll update the script accordingly.

Any estimate from DT development as to the ETA of DT4 support for pydt3?

---

<div class="post-metadata">

**Author:** ![manfred9](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/manfred9/32/35082_2.png) [@manfred9](https://discourse.devontechnologies.com/u/manfred9)\
**Post date:** [July 12, 2025, 12:18am UTC](https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294/3 "2025-07-12T00:18:58Z")

</div>

As far as I know pydt3 has not been developed by the DT team. See [PyDT3 - The Missing Python API for DEVONthink](https://discourse.devontechnologies.com/t/pydt3-the-missing-python-api-for-devonthink/75595).

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [July 12, 2025, 12:40pm UTC](https://discourse.devontechnologies.com/t/local-graph-view-of-wiki-link-connections-in-markdown-files/84294/4 "2025-07-12T12:40:51Z")

</div>

The necessary changes should be minimal, namely using `Application("DEVONthink")` instead of `Application("DEVONthink 3)`

PyDT3 is just an interface to the JXA scripting methods of DT. And AFAICT, it simply passes parameters on to DT.

So, users must make sure to call (for example) `createRecordWith` with the parameter `recordType` for DT4, not with `type` as for DT3.

One can either pull the repository, make the necessary change(s) locally, and install the modified version. Or wait for the author to update their code.
