I created an Obsidian plugin that creates a new and much more functional graph view to Obsidian. It does so by connecting
to a Neo4j database. Features:
- Color nodes by tags
- Selective expansion and hiding of nodes
- Typed links using
- linkType [[note 1]], [[note 2|alias]]
- Hierarchical layout
Obsidian is a very powerful graph-based Markdown editor with many features for quickly authoring complex knowledge graphs.
- Make sure you have Python 3.6+ installed
- Make sure you have Neo4j desktop installed
- Create a new database in Neo4j desktop and start it. Record the password you use!
- In the settings of the plugin, enter the password. Then run the restart command.
On an open note in Obsidian, use the command "Neo4j Graph View: Open local graph of note".
- Click on a node to open it in the Markdown view
- Double-click on a node to expand its neighbors
- Shift-drag in the graph view to select nodes
- Use E to expand the neighbors of all selected nodes
- Use H or Backspace to hide all selected nodes from the view
- Use I (invert) to select all nodes that are not currently selected
- Use A to select all nodes
- All notes visited are added to the graph
All changes made in obsidian should be automatically reflected in Neo4j, but this is still very buggy. There also seem to be problems with duplicate nodes in the graph.
This collects all notes with extension .md in the input directory (default:
markdown/). Each note is interpreted as follows:
- Interprets tags as entity types
- Interprets YAML frontmatter as entity properties
- Interprets wikilinks as links with type
inline, and adds content
- Lines of the format
"- linkType [[note 1]], [[note 2|alias]]"creates links with type
linkTypefrom the current note to
- The name of the note is stored in the property
- The content of the note (everything except YAML frontmatter and typed links) is stored in the property
- Links to notes that do not exist yet are created without any types.
This uses a very simple syntax for typed links. There is no agreed-upon Markdown syntax for this as of yet.
If you are interested in using a different syntax than the list format
"- linkType [[note 1]], [[note 2|alias]]",
please submit an issue.
Other visualization and querying options
Another use case for this plugin is to use your Obsidian vault in one of the many apps in the Neo4j desktop Graph Apps Store. Using with this plugin active will automatically connect it to your vault. Here are some suggestions: