Skip to main content

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.

Watch the demo


Installation

git clone https://github.com/cyberSapoPerro/zk-graph-view.git
cd zk-graph-view
pipx install -e .

Using pipx is recommended to isolate the CLI tool.


Requirements

  • zk installed 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).

Static Graph Example


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 --help to 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

zk_graph_view-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zk_graph_view-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file zk_graph_view-0.1.0.tar.gz.

File metadata

  • Download URL: zk_graph_view-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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

Hashes for zk_graph_view-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1aed72245a38cca314f54039f4c9611e0fa42edf7289b142e03482bd66315cc6
MD5 2dba11b42333f57c879a2746c15b8697
BLAKE2b-256 61461580ee7fc31be9791ece0b02c5b38fedaa60b024a1497353565ffe1df9d4

See more details on using hashes here.

File details

Details for the file zk_graph_view-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zk_graph_view-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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

Hashes for zk_graph_view-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1790de686f542370a68528745d58876e0df69232bff6461901cc81b1db4e9c54
MD5 bfd1d6eb4a374b7cb70bb726eb5640e1
BLAKE2b-256 59e318aea9cb2d3aa2fbf7dd959393a9ec061216ec675fadd8c70e46c41228d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page