Create directory treemaps (local, ssh, archives, s3, git, hg, docker, k8s), save in file, PNG, SVG, MP4, and MOV, open in viewer, display inline in terminals.
Repo deeplook/dirplot, read from GitHub 10 h ago. deeplook has not joined Take My Repo.
dirplot serve — interactive web treemap (experimental, undocumented) — new command that
starts a local FastAPI server and opens a D3.js treemap in the browser. This feature is still
under active development; the interface and API are subject to change in future releases, and
full documentation is forthcoming. Features include: zoomable tiles, breadcrumb navigation,
keyword and regex search, keyboard navigation (j/k, Enter, /, Esc), a sidebar with Settings,
Metrics, and Preview tabs, and instant (no Apply button) settings changes.
File preview in serve — the Preview tab renders syntax-highlighted source files (10 paired
dark/light code themes), PDF documents via iframe, a hex dump for binary files, and image/video
previews with embedded dirplot metadata. HEIC images are supported via pillow-heif or the
macOS sips fallback.
Source input and history in serve — a toolbar text field accepts any source supported by
dirplot (local path, archive, GitHub URL, Docker, K8s, S3). Previous sources are tracked in a
history dropdown.
HTTP(S) URL archive sources — dirplot now accepts https:// and http:// URLs pointing
to archive files (zip, tar, etc.) as a source in any command. Downloads are capped at 100 MB.
Docker, Kubernetes, and S3 as first-class sources — docker://, k8s://, and s3://
schemes are now registered in the global source registry, making them available wherever a
source path is accepted.
click declared as an explicit dependency — dirplot imports click directly in _overview.py, but relied on it being pulled in transitively by typer. Starting around typer 0.12, click became optional in some typer builds, causing ModuleNotFoundError: No module named 'click' when running the installed tool under Python 3.14. click>=8.0 is now a direct dependency.SVG snapshot output for git and hg — both commands now accept --output file.svg for single-frame snapshots, producing an interactive SVG (hover tooltips, CSS highlight) identical to map's SVG output. Animation output (APNG/MP4) is unchanged and still requires .png/.mp4/.mov.
Remote URL support for hg — dirplot hg now accepts https://, http://, and ssh:// URLs directly (e.g. dirplot hg https://hg.reportlab.com/hg-public/reportlab --inline). The repository is cloned into a temporary directory automatically, mirroring the GitHub URL support already available in dirplot git.
dirplot -h.read-meta renamed to meta — dirplot read-meta is now dirplot meta. The new command
also gains a --json flag that outputs structured JSON with fields file, has_metadata,
created, version, command, os, and python. Multiple files return a JSON array.
Human-readable output now uses friendlier labels (Created:, Version: instead of Date:,
Software:). Breaking change.
--size renamed to --canvas in map, diff, watch, git, hg, and replay — the
old flag controlled output pixel dimensions (e.g. --canvas 1920x1080). The name was freed up
so that --size can be used for file-size filtering (see below). Breaking change.
diff summary counts respect --include; --workers rejects non-positive values; the watch_events.py script ignores its own output file when placed inside a watched directory; GitHub tokens are no longer embedded in clone URLs; and various edge-case fixes across the k8s, S3, and animation subsystems.--size/-S file-size filter — available on map, diff, watch, and replay. Filters the
scanned tree to files whose byte size matches a range. Syntax: 10M..500M (between 10 MiB and
500 MiB), 100M.. (≥ 100 MiB), ..50K (≤ 50 KiB), 1G (exactly 1 GiB). Units: B K KB M MB G GB T TB (powers of 1024, case-insensitive). Repeatable — multiple --size flags combine
with OR logic. Pass --keep-empty-dirs to retain directories that become empty after filtering.
Filtering is post-scan; parent directory sizes are recalculated after pruning.
watch improvements:
--event-log renamed to --output/-o — the JSONL event log is now the primary namedwatch, consistent with all other commands. Breaking change.--append-event-log renamed to --append — shorter flag to append to an existing log--output after each regeneration--highlight/-H — highlight matching paths with a coloured border, same syntax asmap and diff. Patterns are re-evaluated on every regeneration.--include — show only a named subtree, same as the map command.--debounce validation — negative values are now rejected with an error.--snapshot help text clarified: PNG or SVG; best for small trees as rendering addssignal.signal(SIGINT, SIG_IGN) call in the--log-scale validation — values ≤ 1 (including negative values) are now rejected with an
error in all commands (map, diff, watch, git, hg, replay). Previously, invalid
values were silently ignored. The programmatic API (apply_log_sizes) raises ValueError.
--highlight/-H flag — available on map, diff, git, hg, and replay. Draws a
coloured border around tiles whose paths match a pattern. Accepts exact paths or glob patterns
including ** (e.g. src/**/*.py). Append @color to set the border colour
(e.g. --highlight "**/*.py@orange"); defaults to red. Repeatable — each --highlight
can target a different set of paths with its own colour. Works for both files and directories.
Renders in both PNG and SVG output. In diff, user highlights are layered on top of the
diff colour-coding. In git and hg, highlights appear in every animation frame.
Colour names and hex codes accepted (any value supported by Pillow / CSS).
Highlight step in dirplot demo — the demo now includes a map tests/ example that
highlights a single file (conftest.py@red), a glob (**/test_git*.py@cyan), and a folder
(tests/fixtures@lime) to demonstrate the feature.
replay shows full directory context by default — the initial frame now includes all files
in the watched directory tree, not just those that appear in the event log. Files touched during
recording use the first logged size as their baseline; untouched files use a live stat. Pass
--changed-only to revert to the old behaviour (event-log files only), which is faster for large
trees where the surrounding context is not needed.
-o name.svg no longer auto-opens a browser — defaults to --no-show; pass --show to override. PNG unchanged.VirtualPath protocol unifies filesystem/archive path handling;TreeSource registry replaces per-backend dispatch; RenderingPipeline centralisesConsoleSession replaces scattered terminal globals.--inline fills terminal width in iTerm2 — the iTerm2 inline image protocol nowwidth=<cols> parameter so the image always fills the full columndirplot diff command — compares two directory trees A and B as a treemap. Files are
sized by B. Borders show diff status: green = added, red = removed, blue = changed (content
differs). Unchanged files show no border. Supports --context/--no-context (default: on,
i.e. unchanged files are shown). A and B accept any source supported by dirplot map:
local directories, github://owner/repo[@ref], archives (.zip, .tar.gz, …), s3://,
ssh://, docker://, and pod://. All visual and remote-access options are available:
--output, --format, --show/--no-show, --inline, --font-size, --colormap,
--exclude, --depth, --size, --cushion/--no-cushion, --dark/--light,
--log-scale, --header/--no-header, --quiet, --ssh-key, --ssh-password-file,
--aws-profile, --no-sign, --github-token-file, --k8s-namespace,
--k8s-container, --password-file, and --no-input.
dirplot diff enhancements — single-argument shorthand: dirplot diff . diffs the
working tree against HEAD (git) or tip (hg). Supports <path>@<ref> syntax for local git
repos (e.g. dirplot diff .@HEAD~5 .@HEAD). When a source is a local git or hg repo,
only tracked files are scanned (untracked files ignored). Change detection uses blob hash
comparison — edits that don't change file size are caught, and Git LFS files are handled
transparently (pointer size vs disk size no longer causes false positives).
--include flag (replaces --subtree, which remains as a hidden alias) — available on
map, diff, and metrics. Keeps only the named subtrees after scanning; supports nested
paths (--include src/dirplot/fonts). Allowlist complement to --exclude.
Glob patterns in --exclude — the --exclude flag now accepts glob patterns on all
commands and all backends (local, git, hg, SSH, S3, GitHub, Docker, Kubernetes, archives).
Plain names (.git, node_modules) still work as before and match any path component.
New: single-component globs (*.egg-info), relative paths (src/vendor), and ** globs
(**/__pycache__). Matching is consistent across all backends — previously each backend
used a different comparison strategy (absolute paths, basenames, full URIs).
ISO 8601 timestamps in event log — dirplot watch --event-log now writes timestamps
as timezone-aware ISO 8601 strings (e.g. 2026-05-12T14:21:52.341+00:00) instead of raw
Unix epoch floats. dirplot replay still accepts both formats for backwards compatibility.
--inline on dirplot git and dirplot hg — displays the single-frame output
directly in the terminal (iTerm2, Kitty, Ghostty protocols). Only available in
single-frame mode (no --range or --period).
@ref on HTTPS GitHub URLs — https://github.com/owner/repo@v1.0 is now a valid
repo argument for dirplot git, equivalent to github://owner/repo@v1.0.
dirplot git and dirplot hg interface redesigned — the animation model is now
explicit: --range or --period triggers animation mode (APNG / MP4, one frame per
commit); neither flag produces a single static PNG of the last commit (HEAD / tip).
--animate removed (git, hg) — use --range or --period to produce an
animation. Without either, a single static frame is rendered.
--max-commits renamed to --first (git, hg) — keeps the first N commits
after the range/period filter is applied. The old name is no longer accepted.
--last N added (git, hg) — keeps the last N commits after the range/period
filter is applied. Counterpart to --first.
--last PERIOD renamed to --period (git, hg) — the time-period filter is now
--period 30d, --period 24h, etc. The old --last name for this flag is removed.
--period without --range triggers animation — commits within the period relative
to now are fetched and animated. GitHub URLs use --shallow-since for an efficient
date-bounded shallow clone.
--period with --range filters relative to range end — when both are given, the
period cutoff is anchored to the timestamp of the last commit in the range rather than
to now (e.g. "last 3 days of activity on this branch").
--first / --last slice post-fetch — the count cap is applied in Python after all
commits are fetched, not via git log -n. This ensures --first always gives the oldest
N commits and --last always gives the newest N commits.
--first no longer controls clone depth when --range is given — previously
--first N would pass --depth N to git clone, making tags outside the shallow history
unreachable. --depth is now only used when --range is absent.
Output extension .png for animations — APNG output uses .png (not .apng).
--output - implies --no-show — piping to stdout no longer opens a viewer window;
pass --show explicitly to override.
dirplot watch simplified — animation output removed from watch; use dirplot replay
on a --event-log file to produce APNG/MP4. New --snapshot FILE option writes the current
treemap PNG on each filesystem change (for external tools or wallpaper updaters).
matplotlib replaced by cmap — matplotlib is no longer a dependency. Colormap lookups
now use the cmap package instead, which is significantly smaller. All colormap names
previously accepted by matplotlib continue to work.
--github-token, --ssh-password, and --password$GITHUB_TOKEN / $SSH_PASSWORD--github-token-file, --ssh-password-file, and--password-file options instead. This prevents secrets from appearing in shellSSH_KEY and SSH_PASSWORD environment variables removed — SSH credentials--ssh-key / --ssh-password-file flags, ~/.ssh/configIdentityFile, the ssh-agent, or an interactive prompt. The non-standard env vars--logscale renamed to --log-scale — the flag now follows the standard--top -n short form removed (dirplot metrics) — -n is conventionally--dry-run; use --top N directly.--range -r, --max-commits -n, --workers -w short forms removed (git,hg) — these single-letter aliases conflicted with conventions or were too obscure--colormap -c, --subtree -s, --breadcrumbs -b/-B, --k8s-namespace -Ndirplot map anddirplot watch previously went to$COLUMNS / $LINES honoured for terminal size — when ioctl andos.get_terminal_size() are both unavailable (CI, SSH sessions, scripts), the$COLUMNS and $LINES environment variables are now checked before160×45 default.dirplot map with no arguments shows help — running dirplot map withoutdirplot metrics command — scans any source supported by dirplot map--sort-by count|size on dirplot metrics — controls extension ordering;count (default) sorts by number of files, size sorts by total bytes.--top N on dirplot metrics — caps the number of entries shown--json / --no-json on dirplot metrics — outputs all metrics as ajq or scripts.--metrics / --no-metrics on dirplot map — prints the full metricstree_metrics(root_node, t_scan, top_n, sort_by) → str indirplot.scanner — public API returning the human-readable metrics string.tree_metrics_dict(root_node, t_scan, top_n, sort_by) → dict indirplot.scanner — public API returning a structured dict with all metrics;--log/--logscale merged into a single --logscale parameter — the--log/--no-log flag has been removed from all commands (map, watch,git, hg, replay). Pass --logscale <ratio> (any value > 1) to enable0 to disable. The default is 0dirplot overview command — Resolves app name/description/version from
importlib.metadata so the overview output shows richer context without requiring
manual wiring.
macOS Keychain error during git clone — git clone is now invoked with
-c credential.helper= to suppress the system credential helper. This prevents
the -25308 Keychain error in non-interactive environments (CI, sandboxed runs).
Private repos are unaffected because the GitHub token is embedded directly in the
clone URL, so no credential helper is needed regardless.