Visualize zk graphs using python
Project description
zk-graph-view
Visualize your Zettelkasten graph from zk as an interactive HTML network.
zk-graph-view consumes the output of zk graph --format=json and renders it using pyvis.
Installation
Using pipx
pipx install zk-graph-view
or using uv:
uv tool install zk-graph-view
Using
uvis recommended.
Manual
git clone https://github.com/cyberSapoPerro/zk-graph-view.git
cd zk-graph-view
pipx install -e .
Requirements
zkinstalled and configured- Python 3.13+
Usage
Run the tool inside a valid zk notebook directory:
zk-graph-view
This will internally call:
zk graph --format=json
and generate an interactive HTML visualization.
Static Graph
For large graphs (1k+ notes) or when you need a static image, use the --static flag:
zk-graph-view --static -o graph.png
This renders a high-resolution PNG using matplotlib with the same tag-based coloring and node sizing. The layout is computed automatically (Kamada-Kawai for small graphs, spring layout for larger ones).
Configuration
You can integrate zk-graph-view as a zk alias for convenience.
Add this to your global config (~/.config/zk/config.toml) or a notebook-specific config:
[alias]
vis = "zk-graph-view"
Then run:
zk vis
Notes
- The tool must be executed inside a directory containing a
.zk/folder. - Ensure your notes are properly tagged if you rely on tags for visualization or filtering.
- Interactive mode outputs HTML files; static mode outputs PNG images.
- Use
--helpto see all available options.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zk_graph_view-0.1.1.tar.gz.
File metadata
- Download URL: zk_graph_view-0.1.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f70f27d2d4f6f1260e6588140764582008a3091a965a659dbeb6aa7fc7a8b7c4
|
|
| MD5 |
2ac0d7c23016e71126ff80de1e81193f
|
|
| BLAKE2b-256 |
67a4f4d590d2503bee38018476ee91e9b8fa7a08e1e1971f7eaf7c1ada04f559
|
File details
Details for the file zk_graph_view-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zk_graph_view-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03988ab7df1860f6871969a1189bd0096f3c327c6a873fa2425380798a0f7ec6
|
|
| MD5 |
cdfd5feb9ac12003cf28b740ce751777
|
|
| BLAKE2b-256 |
b67eca94a1e7d4a738c16a5c22a1a3222b7331e0c6798e2a677a019ec3484130
|