Skip to main content

vizzle

UML visualization for git: parse a codebase (or a git diff) and render UML diagrams — as Mermaid text or as an interactive d3-powered HTML page — with changes highlighted so a reader immediately sees what a change did to the shape of the code. Two diagram types so far: class (the shape of the code) and component (the shape of the application). Each type has a spec in docs/diagram-types/ — what an element is, how it is detected, what its diff means, and the modelling decisions behind it (e.g. why aggregation and composition diamonds are a convention rather than an inference: docs/diagram-types/class.md §5.4).

  • Rust core (crates/vizzle-core): tree-sitter parsing (Python, TypeScript + Rust), a language-neutral class graph + import graph, a component detector (manifest-driven), graph diff engines, and Mermaid renderers. Parses ~200 classes in well under a second.
  • PyO3 bindings (crates/vizzle-py): built with maturin into the private extension module vizzle_cli._core.
  • Click CLI (packages/vizzle-cli): the vizzle command. Python owns the git orchestration; Rust owns everything hot.

Three source layers ship as one wheel — pip install vizzle gets the CLI and the compiled core together, so their versions cannot drift apart.

Install

Nothing to install — run it straight from PyPI, with nothing added to the repo you are looking at:

uvx vizzle component ~/code/some-repo

Or keep it around: uv tool install vizzle (or pipx install vizzle). Needs Python ≥ 3.10 and git on PATH; on Linux, glibc ≥ 2.28. Why it is distributed this way is in docs/distribution.md.

For coding agents

vizzle ships a Claude Code plugin, so an agent knows to reach for a diagram instead of reading the repo file by file — a component diagram of a 358-file codebase costs about 1.5k tokens:

claude plugin marketplace add stiproot/vizzle
claude plugin install vizzle@vizzle-marketplace

From a clone

For development — requires uv and a Rust toolchain:

uv sync   # builds the Rust extension via maturin and installs the CLI

Working from a clone, read uv run vizzle … wherever the examples below say uvx vizzle …, so you exercise your build rather than the published one.

Usage

Full class diagram of a codebase:

uvx vizzle class ~/code/repo/h -o h-classes.mmd

Grouped into namespace blocks — --group-by component for one block per package, --group-by module for one per file:

uvx vizzle class ~/code/repo/h --group-by component --no-members

Component diagram — one box per build-level module (workspace package, app, service; any directory with a package.json/pyproject.toml/Cargo.toml/ go.mod), one dashed arrow per dependency derived from imports (spec: docs/diagram-types/component.md):

uvx vizzle component ~/code/repo/h -o h-components.mmd --weights
uvx vizzle component ~/code/repo/h -o h-components.html   # interactive

In the HTML view each app/package gets a labelled box you can drag as a unit, and every component carries a + toggle that explodes it into a full UML class diagram — boxes with stereotypes, fields and methods, data types on every member, and the association, dependency and inheritance edges between them (or use Show classes to open them all at once). Each explosion is laid out once at load and then only shown or hidden, so toggling stays instant. --no-classes omits that detail for a leaner file.

What changed, as a diagram (added = green ✚, removed = red ✖, modified = yellow ✱; unchanged classes in touched files render as context):

# working tree vs HEAD
uvx vizzle diff ~/code/repo/h

# between two revisions
uvx vizzle diff ~/code/repo/h --base HEAD~20 --head HEAD -o changes.mmd

# did the change rewire the application? (parses both full revisions;
# added/removed dependency edges render loudest)
uvx vizzle diff ~/code/repo/h --type component

# for a script: the verdict as JSON (changed, counts, rendered size), so it
# never has to read the diagram text
uvx vizzle diff ~/code/repo/h --type component -o changes.mmd --stats verdict.json

# make a point: light the classes an explanation is about and dim the rest,
# or keep only a class and its neighbours
uvx vizzle class src --no-members --highlight LaunchRunRequest,TaskAgent
uvx vizzle class src --around TaskAgent --depth 1

# one manifest but many subsystems: split the package into its subpackages,
# focus the diff on the changed ones and their neighbours, and zoom into the
# classes that changed inside them
uvx vizzle diff . --type component --split src/mypkg --focus -o shape.mmd --zoom inside.mmd

Interactive HTML (d3)

Write to a .html file (or pass --format html) and vizzle emits a fully self-contained page — d3 v7 is inlined, no network needed — that renders the class graph as SVG with zoom (scroll), pan (drag the background), draggable class boxes, a fit-to-view button, and a live filter box. Diff pages color whole classes and individual member rows (removed members are struck through). In a component diff, opening a changed component shows only the classes and members that changed, banded in their change colour, with the rest folded behind a count and a link to show them:

uvx vizzle class ~/code/repo/h -o h-classes.html
uvx vizzle diff ~/code/repo/h --base HEAD~20 --head HEAD -o changes.html
open changes.html

Layout is a d3 force simulation (link + charge + rectangle collision) with a weak per-module gravity, ticked synchronously before first paint so the page opens settled. The component view adds a two-level relaxation pass — components separate within their group, then groups separate as blocks — so group boxes never overlap, including after a component is expanded.

Both views are built from one shared core (assets/viz-core.{css,js}, inlined into every page): the palette, geometry, viewport, filter, and header. A template only describes what its own nodes look like.

Comprehension first. Nothing here needs a git diff: vizzle class and vizzle component are for reading unfamiliar code. The diff is a lens laid over the same diagram — under it, unchanged elements fade to neutral context and only what changed keeps saturated color, so the change reads instantly without losing its surroundings.

On a pull request

.github/workflows/pr-diagram.yml posts a focused component diff as a PR comment, with a zoom on the changed classes and a glyph legend, so reviewers see what a change did to the shape of the application without installing anything. GitHub renders ```mermaid blocks natively, so there is no image hosting involved. Copy the file into any repo with Python or TypeScript in it — the only requirement is uvx on the runner.

It edits one comment rather than appending, says so in a single line when nothing structural moved (or "Tests only" when just test files changed, once the pin reaches the release that excludes tests by default; until then they are drawn), falls back to a link to the run when a diagram is too large for a comment, and skips fork PRs (which get a read-only token) rather than failing them. It deliberately does not use pull_request_target; the reasoning is in docs/distribution.md §2.3.

Live server with hot reload

vizzle serve hosts the diagram and watches the source tree; every save re-parses and pushes a reload to connected browsers (stdlib http.server + server-sent events + watchfiles — no web framework). Your zoom/pan position survives reloads.

uvx vizzle serve ~/code/repo/h                  # live class diagram
uvx vizzle serve ~/code/repo/h --diff --open    # watch your working-tree
                                                # changes vs HEAD reshape
                                                # the UML as you edit
uvx vizzle serve ~/code/repo/h --type component --diff   # live rewiring view

Defaults to http://127.0.0.1:8499/; see --port, --host, --base. The server answers only requests addressed to this machine; --host 0.0.0.0 publishes the repository's structure to the network, and says so.

Useful flags (class and diff): --no-members, --modules (add a «module» box per module holding its public module-level functions), --group-by module|component (mermaid namespace blocks per module or per component), --externals (edges to types outside the parsed set), --direction LR (mermaid), -I/-E include/exclude globs and -l language (every command; on diff they apply to both revisions, so a filtered file never reads as added or removed), --title, -f/--format mermaid|html. serve takes the same selection flags plus --no-members, --modules, --externals and --title.

-f json prints the graph a page is drawn from. vizzle overlay GRAPH OVERLAY merges planned parts into a component graph (--check for CI: exit 0 current, 1 stale, 2 cannot run), and vizzle draw GRAPH renders a graph as html or mermaid. vizzle component --overlay FILE does all three in one step. See docs/plans/impl/atoms-and-overlay.md.

Render the .mmd output with mermaid-cli:

npx -y @mermaid-js/mermaid-cli -i changes.mmd -o changes.svg

Or let vizzle drive it, which is usually what you want:

uvx vizzle render changes.mmd out/            # one source
uvx vizzle render docs/diagrams out/ -f svg   # a directory, README excluded

vizzle render finds mmdc on PATH or runs it through bunx/npx, points puppeteer at a browser you already have rather than letting it download a redundant one, and raises Mermaid's default 50,000-character maxTextSize — past which a whole-repo diagram renders a small error graphic instead of failing loudly. The HTML output has no such limit.

Committed diagrams that stay true

A Markdown file can carry a gen:c4-code manifest naming the classes its diagram covers, or a source path to cover in full. vizzle doc regenerates the fence from the code, and --check fails when the committed diagram has drifted, which is the shape a lint step wants:

uvx vizzle doc docs/architecture.md      # regenerate one document
uvx vizzle doc --dir docs --check        # verify every managed doc, write nothing

The manifest format and what --check guarantees are in docs/curated-diagrams.md.

Architecture pictures: hybrid

For what runs — processes, stores and the runtime edges between them, opened up to the modules each one runs — write a JSON spec with the runtime layer and a coarse layout, and let vizzle supply the modules and check the two agree:

uvx vizzle hybrid --dir examples/hybrid --png    # examples/vizzle-runtime.svg (+ a 2x PNG)
uvx vizzle hybrid --check --dir examples/hybrid  # CI: 0 current, 1 drift/lint/stale, 2 cannot run

vizzle at runtime, drawn in the hybrid style

The spec format, the shapes and what drift means are in docs/diagram-types/hybrid.md.

How the diff works

vizzle diff asks git for the changed files (git diff --name-status -M -z), pulls the base-revision contents via git show, and hands both revisions to the Rust core. The core parses each side into a class graph, diffs the graphs (classes keyed by qualified name, members fingerprinted by signature), and renders a single diagram where every class and member carries its change status.

Mermaid 11 quirk, learned the hard way: in classDiagram, classDef statements only take effect when they appear after the cssClass attachments. The renderer emits them last.

Development

uv sync                                  # also installs dev tools (ruff, pre-commit)
uv run pre-commit install                # one-time: enable the git hook

cargo test -p vizzle-core                 # core unit tests
uv run pytest packages/vizzle-cli/tests   # CLI end-to-end tests
uv sync --reinstall-package vizzle       # rebuild after Rust changes

Formatting and linting run on every commit via pre-commit: ruff format + ruff check --fix (Python), cargo fmt + cargo clippy -D warnings (Rust), plus whitespace/YAML/TOML hygiene checks. Run everything manually with uv run pre-commit run --all-files. Vendored (assets/d3.*) and generated (examples/) files are excluded.

JS dependencies (bun)

The d3 bundle inlined into HTML output is a real dependency managed with bun in web/, then vendored into the Python package so wheels stay self-contained:

cd web
bun install            # or: bun update d3
bun run sync-assets    # copies node_modules/d3/dist/d3.min.js into assets/

The vendored copy is committed; re-run sync-assets after bumping d3.

Example outputs generated from the h codebase live in examples/.

Metadata

Release files for vizzle 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vizzle 0.15.0
File Size Uploaded Provenance Actions
vizzle-0.15.0.tar.gz 265.1 kB With provenance Details for vizzle-0.15.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vizzle 0.15.0
File Actions
vizzle-0.15.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for vizzle-0.15.0-cp310-abi3-manylinux_2_28_x86_64.whl
vizzle-0.15.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for vizzle-0.15.0-cp310-abi3-manylinux_2_28_aarch64.whl
vizzle-0.15.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for vizzle-0.15.0-cp310-abi3-macosx_11_0_arm64.whl
vizzle-0.15.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for vizzle-0.15.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 8.9 MB

Release files / vizzle-0.15.0.tar.gz

Download URL vizzle-0.15.0.tar.gz
Size 265.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3b6f0795417b2e639c43c1366318908fddac5ea347e72d6781f3df02d667264f
BLAKE2b-256 checksum
How to use checksums
370e4ddd2053393c5779647b353f1831ecd7b5dab1e2151bab57ce4fdb6ab239
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / vizzle-0.15.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL vizzle-0.15.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0834a5435c50c3b2ee33593d69ff6d721c8f491832216d570574d6af1d68c3ee
BLAKE2b-256 checksum
How to use checksums
71c5e447dd95fa8379ac2a84a2c776cefa38c3d538397f1128ccb0c6b54fc0d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / vizzle-0.15.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL vizzle-0.15.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 2.2 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
819d74ced6553fa725c638579083e34b245a7b971f2ebe8f71f69fa610b21a43
BLAKE2b-256 checksum
How to use checksums
37f91c14beee4200a333d34e944c02866aa891a6043c5fce5d983f6073ed5bed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / vizzle-0.15.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL vizzle-0.15.0-cp310-abi3-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
343e755bd4c6c63ae0c29656bcb0d1dead59aded6c9e9b53fda24f519918d8ef
BLAKE2b-256 checksum
How to use checksums
52463a42d231c7934ed6ce909faa60a4eaa5adb78dde100fea15a3dd3c79ef15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / vizzle-0.15.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL vizzle-0.15.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.1 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
51fab387073fff78869211e3474ccfe6388637b1c45e8398cd95752beb4f6835
BLAKE2b-256 checksum
How to use checksums
e03e0ac3738d686145a92c4ff4bb2c555ab30455febe985b21271896160451e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for vizzle 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for vizzle-0.15.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page