Skip to main content Switch to mobile version treespeak 0.8.6 Treespeak draws a git repository as a growing plant: the live viewer, as a command.
pip install treespeak Copy PIP instructions
pallets/flask at 49943b5 (30 October 2026), growth since 1 June 2025: tree_watch.py --repo flask --since 2025-06-01 --png flask.png
"If the AI can communicate at terabits per second, and you're communicating at bits per second, it's like talking to a tree." — Elon Musk, Lex Fridman Podcast #438, 2 August 2024; first said at the World AI Conference, Shanghai, 29 August 2019.
This is the tree. Treespeak draws a git repository as a growing plant — directories as branches, files as leaves sized by written lines, hotspots by churn, growth rendered since a start date. Ships as a skill plus an MCP server for architecture-facts queries (fat files, thin or fat directories, hotspots, growth since start). A "file tree" button adds a classic directory list beside the drawing, hover-linked both ways.
A leaf wears its technology's brand: a natural leaf on its stalk, turned at its habit's angle, painted in the brand's colours with the brand's mark along the blade — Angular's red leaf with the white A, TypeScript's blue TS, JavaScript's yellow JS, Python's blue-and-yellow leaf with the two eyes, the C family's blues, Rust's gear, Go's cyan, Java's cup, Ruby's gem, React's atom, Vue's V, and some sixty more; a file of a technology the viewer does not know is the plain lens leaf. A brand that already has a leaf-like shape of its own keeps it, hung from the stalk by its flat edge and turned with the twig like every other leaf: Angular's, HTML5's and CSS3's shields, Vue's V, Ruby's gem. Size is still lines. The wood itself ends in rounded caps, so every joint is a smooth knee rather than a notch. Git state is the leaf's outline (green added, orange modified, blue moved, red deleted) and an untouched leaf is faded, so growth still reads. A limb's wood takes the brand colour of what the limb is mostly made of, so an Angular app is a red tree with a blue Python limb before any name is read, and a "Made of" card draws each technology's leaf beside its share, for the whole tree or the focused limb. Within a technology a file's role shapes the blade: a header or a declaration is a half leaf, a test has a toothed edge. Each technology family also keeps a twig habit (needles for the C family, pairs for the Java family, fronds for the web, scales for config, drooping for prose, broad for scripting). Hover a leaf and the tip shows its leaf and names its technology and role; hover a limb and it says what the limb is mostly made of. Zoom in and a tree under 2,500 parts is redrawn as vectors, so the leaves and their letters stay crisp. A directory's children fan out as a leader and sectors: the heaviest continues the parent's line, the rest alternate to either side by rank, each with room proportional to the square root of its file count, so a chain of single directories goes straight and a big subtree gets a big sector. A day's work turns no limb: each child's place is kept until the directory grows by a tenth, a newcomer takes the fan's edge, and the drawing keeps its scale while it still fits.
On a touch screen, a tap reveals what a hover reveals — the name of the leaf, branch or twig under the finger. A second tap on the same branch or twig focuses it, the way a click does with a mouse. A tap on empty ground clears. The tip stays inside the drawing box on every side.
Two zones: product and lab
plugin/ is the product: what the marketplace ships (source: ./plugin), whole, to any project that installs it — stdlib Python and git only. lab/ is the laboratory, whose front door is the workbench: the viewer's box (the tree drawing with the file-tree panel) wrapped by toolbars of orthogonal arguments, one realm per toolbar, redrawing live as controls move.
python3 lab/workbench.py --repo
claude plugin marketplace add NivDvir/treespeak claude plugin install treespeak@treespeak-marketplace After a version bump in plugin/.claude-plugin/plugin.json:
claude plugin marketplace update treespeak-marketplace claude plugin update treespeak@treespeak-marketplace Without Claude Code
The viewer is also a plain Python command, with no MCP server and no dependencies beyond git. It is on PyPI as treespeak, for Python 3.7 or newer:
uvx treespeak --repo
Claude Code on Windows runs with Git for Windows, whose bash runs the plugin's launcher. A Python 3.10 or newer must answer as py, python or python3 for the MCP tools, since the mcp package needs it. The PNG export finds Chrome or Edge under Program Files or LocalAppData. The viewer is stopped with TerminateProcess. Windows support is built from the documentation and has not yet been run on a Windows machine.
The tree on every pull request (GitHub Action)
action.yml at this repository's root draws the repository in a workflow and puts the tree on the pull request as a comment, light and dark, refreshed on every push to the branch. Growth is measured from where the branch left the default branch, so the outlines show what the pull request touches.
name: treespeak on: pull_request permissions: contents: write # the images are committed to the treespeak-images branch pull-requests: write # the comment jobs: tree: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # growth needs the history - uses: NivDvir/treespeak@main On a push (say to main), the action publishes latest/light.png and latest/dark.png on the treespeak-images branch instead, at fixed addresses a README can show:
, light-url, dark-url, comment-url.
Run the viewer by hand
python3 plugin/server/tree_watch.py --repo
tree_start(repo, port, since) — start the viewer, return its URL.
tree_status(repo) — running or not, on which port, what it last drew; also sees a viewer a launcher or a hand-run command already started on the repo's configured port.
tree_stop(repo) — stop the viewer this plugin started.
tree_snapshot(repo, facts, files, since, path, limit, depth) — the facts alone, without a server; compact by default: each list cut to limit (20), directories to depth (2) levels, path narrows everything to one directory, counts says how many entries each list had before the cut; limit=0, depth=0 gives everything.
tree_export(repo, path, width, height, scale, theme, focus) — write the drawing to a PNG; by default tree.png under the repo's state dir, never into the repository.
tree_init(repo, write) — propose a .treespeak.json (trunk, port, and skip for directories that are mostly data, generated or vendored), list those heavy directories, and give the launch.json recipe; write=True writes the file when none exists.
Embedding the drawing under another interface
The drawing is meant to sit behind a list that already exists, a file browser or a repository page. Open the page with ?bare=1 and it shows the canvas alone: no header, breadcrumb, counts, cards, zoom buttons or file tree, and a transparent background, so only wood, leaves and marks are drawn over whatever is underneath. Hover, click to focus, Escape and Tab still work. The same query works on a --static page opened from a file.
A page in a frame named by host talks to its parent with postMessage. Every message carries type: 'treespeak'.
{type: 'treespeak', action: 'hover', path} lights the leaf or branch at path, as a mouse hover would.
{type: 'treespeak', action: 'clear'} clears the hover.
{type: 'treespeak', action: 'focus', path} focuses that directory.
{type: 'treespeak', action: 'export', format: 'png', scale} asks for the canvas; the page answers the sender with {type: 'treespeak', event: 'export', dataURL}.
The page sends its parent:
{type: 'treespeak', event: 'hover', path, kind} whenever the hover changes; kind is 'leaf', 'branch', 'twig' or null.
{type: 'treespeak', event: 'focus', path} whenever the focus changes.
{type: 'treespeak', event: 'ready', name, tracked} once, after the first snapshot is drawn.
Without host the bridge is off: the page posts nothing, not even ready, and ignores every message. With host it posts only to that origin and hears only messages from it, so another website that frames the page learns nothing. host=null is for a host page opened from a file, whose origin is null; it is the weakest setting, since any page with a null origin can talk to it.
To get a picture instead, the PNG button beside the zoom buttons downloads the canvas as
Both draw a snapshot, not the live page. The live page keeps an event stream open, and headless Chrome's virtual clock waits on any open fetch, so a screenshot of it would never be taken; the export serves the snapshot page, without the stream, on a free loopback port for the length of the shot. When a viewer already runs, tree_export draws what that viewer last served. The window is passed to Chrome as --window-size=W,H: Chrome misreads the WxH form.
.treespeak.json at a repository's root
A repository configured before Treespeak keeps its .growing-tree.json: it is still read when .treespeak.json is absent.
A worked example, for a repo with an Angular front end, a Swift back end and a corpus:
{ "start": "2026-09-05 17:40", "port": 8770, "trunk": "reticle-access", "skip": ["angular/node_modules/", "swift/.build/", "angular/dist/", "angular/.angular/", "data/"], "keep": ["data/*/baseline/*"], "kinds": { "generated": {"names": ["package-lock.json", "Package.resolved"], "suffixes": [".lock", ".min.js", ".min.css"], "segments": ["dist", ".angular"]}, "vendored": {"prefixes": [".vale/styles/ai-tells/", ".vale/styles/ai-tells-commits/", "angular/tools/"]}, "data": {"prefixes": ["corpus/", "data/", "tests/fixtures/"], "suffixes": [".png", ".jpg", ".pdf"]} }, "leaf_cap": 24, "warn_lines": 400, "max_read": 2097152 } The viewer as a project's preview server
A project that wants the tree in its Browser pane adds to its .claude/launch.json:
{ "version": "0.0.1", "configurations": [ { "name": "tree", "runtimeExecutable": "/Users/
~/.treespeak/venv/ the mcp dependency, bootstrapped on first run ~/.treespeak/bootstrap.log what that bootstrap printed ~/.treespeak/bin/treespeak the launcher shim, rewritten at every MCP server start ~/.treespeak/
docs/surveys/tree_survey_2026-09-06.md
docs/surveys/tree_survey_academic_2026-09-06.md
docs/surveys/botany_survey_2026-09-07.md
The drawing itself — layout, colours, geometry, interaction — changes only on the owner's word.
Released: Dec 4, 2026
1 file in this release has provenance metadata.
View provenance details
Other/Proprietary License
License Other/Proprietary License
Release files for treespeak 0.8.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
Release files / treespeak-0.8.6-py3-none-any.whl
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 Dec 4, 2026.
Security for treespeak 0.8.6
1 file in this release has been uploaded with provenance metadata.
With provenance treespeak-0.8.6-py3-none-any.whl Dec 4, 2026
Attestation for treespeak-0.8.6-py3-none-any.whl
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.
Release history Release notifications | RSS feed
Dec 4, 2026 1 release file Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 4d99e05











