Local Graph View of Wiki-Link Connections in Markdown Files

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, 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

Example:

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


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.


The graph for same note, but with physics simulation enabled via pyvis, where the clusters naturally repel into formations based on connection strength.


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.

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 :backhand_index_pointing_right: here.

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.


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 :victory_hand:

Happy linking!

7 Likes

WOW! Thank you for sharing.

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

1 Like

As far as I know pydt3 has not been developed by the DT team. See PyDT3 - The Missing Python API for DEVONthink.

1 Like

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.

3 Likes