Skip to content
kikoz85Public

About

The disk analyzer for developers. Blazing fast, build-artifact aware, and a pleasure to explore.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

TreeX logo

TreeX

English · Italiano

The disk analyzer for developers. Blazing fast, build-artifact aware, and a pleasure to explore.

Download TreeX website Sponsor TreeX macOS · Windows · Linux

TreeX: your disk as an isometric city


TreeX scans millions of files in seconds using each operating system's native APIs. It recognizes the space wasted by node_modules, target/, DerivedData, .venv, and Gradle or package-manager caches. It shows everything as a 2D / 2.5D isometric treemap that you can explore as well as read.

TreeX runs on macOS, Windows and Linux, on Intel/AMD and ARM processors. macOS 13 Ventura or later (Apple Silicon and Intel), Windows 10/11 (x64, and ARM64 on Windows 11), Linux (x86_64 and ARM64, Raspberry Pi 4/5 included). Native everywhere: same app, same views, same commands.

Dev-Aware: find the space you can take back

Reclaim mode: build artifacts rise as coral towers

Run treex dev ~, or press 4 in the app. node_modules, target, Flutter builds, DerivedData, the simulator clones that cancelled or crashed Xcode test runs leave in XCTestDevices, vendor, virtualenvs, and the npm, pip, and Homebrew caches rise as coral towers. Each tower shows the command that recreates it and how long its project has been idle. TreeX recognizes 16 development ecosystems plus system caches, and you can customize the rules in TOML.

Home 2D with semantic zoom Search everything (⌘K)

What's new in 1.x

  • 1.5 · ARM64: native builds for Linux ARM64 (Raspberry Pi 4/5, ARM servers, virtual machines on Apple Silicon Macs) and Windows on ARM, built and tested on ARM machines. The app updates itself on ARM too.
  • 1.4 · Windows installer and honest numbers for APFS clones: a per-user installer for Windows (no administrator, optional treex in your PATH, uninstaller in Settings → Apps) next to the portable zip. On macOS, Reclaim tells how much cleaning really frees when files are APFS clones (Xcode simulators, cp -c copies), and whether they are clones of each other or of files you did not select.
  • 1.3 · treex tui and the command line everywhere: TreeX in the terminal, interactive, over SSH too; the treex command as a system command on every OS (.deb, .rpm, standalone archives), with man pages and Tab completion.
  • 1.2 · Rotate the 2.5D city: ↺ ↻ buttons, Q / E, right-drag or two fingers on the trackpad.
  • 1.1 · Updates from the app: one click on Updates downloads the new version, checks its digital signature, installs it and restarts TreeX.
  • 1.0 · Stable on all three systems: the same app, views and safety rules on macOS, Windows and Linux, the whole test suite passing on real machines (real-GPU rendering included), and the fastest of every tool we compared on each system. Everything goes to the Trash by default and every item is checked again right before it is touched.

Within 1.x the command-line interface and the analysis file format change only in a compatible way. Still to come in the next releases: code signing (so macOS and Windows stop asking for confirmation on first launch), app-store packages and a few engine improvements.

Performance

TreeX uses each system's own fast path: getattrlistbulk on macOS, getdents64 + statx on Linux, GetFileInformationByHandleEx on Windows, and on a whole NTFS drive (as administrator) it reads the Master File Table directly.

macOS

Apple M4, macOS, same trees for every tool (hyperfine, 5 runs).

From the second scan on, TreeX doesn't rescan. It loads its snapshot, asks macOS (FSEvents) what changed, and re-reads only that.

treex (second scan) treex (first scan) dua du
fixture, 324k entries 0.05 s 0.35 s 0.48 s 0.80 s
deep fixture, 1M entries 0.06 s 1.99 s 1.97 s 12.14 s
wide fixture, 1M entries 0.05 s 1.48 s 1.55 s 4.60 s
/Applications (808k entries) 0.06 s 1.70 s 1.56 s 8.60 s

Even on a first scan, TreeX matches or beats the fastest competitor (dua). It is 1.7–2.5× faster than pdu, ncdu, dust, and gdu.

Linux

Intel N95, ext4, Debian 13, warm cache (hyperfine, 5 runs). TreeX is the fastest on every tree:

treex pdu gdu dust dua du
fixture, 324k entries 0.21 s 0.28 s 0.47 s 0.44 s 0.59 s 0.69 s
deep fixture, 1M entries 0.66 s 0.88 s 1.35 s 1.51 s 1.69 s 2.28 s
/usr 0.29 s 0.33 s 0.51 s 0.49 s 0.57 s 0.84 s
home, 3.8M entries 2.82 s 3.64 s 4.73 s 6.14 s 7.07 s 9.33 s

Windows

Windows 11, 8 cores, SATA SSD, NTFS, as administrator, warm cache (hyperfine). TreeX is the fastest on every tree:

treex gdu dua pdu dust
fixture, 324k entries 0.56 s 0.76 s 0.87 s 6.20 s 6.74 s
C:\Program Files 0.50 s 0.76 s 0.90 s 3.76 s 4.02 s
C:\Users, 703k entries 2.68 s 2.86 s 3.31 s 15.03 s 16.73 s
whole C: drive, 1.56M entries 5.82 s 11.29 s 12.53 s 27.96 s 32.19 s

From the second analysis on, the USN change journal updates the whole C: drive in 0.2 s.

While the app is open, the map updates live on all three systems: TreeX re-reads only the folders that changed (FSEvents on macOS, the USN journal and ReadDirectoryChangesW on Windows, inotify on Linux).

Smooth on any GPU

The 2.5D city runs on the GPU. TreeX measures every frame: on powerful GPUs it keeps full 4× antialiasing, and only when a huge map is too heavy for a small integrated GPU does it lower antialiasing to stay smooth. On an Intel UHD 620 laptop, a 143,000-block map runs at 60 fps in 2D and 2.5D.

Safe cleaning

Pick items in the Dev-Junk panel (or run treex clean --apply), confirm, and watch the towers sink. Right before deleting each folder, TreeX checks it again:

  • it is still the same folder;
  • it is not a symlink;
  • its project markers are still there;
  • there is no git repository inside.

By default, items go to the Trash. Every operation is logged (treex history).

Pick Confirm Done

File types and duplicates

Press T to see where the space goes by file extension. Click a type and only its files stay lit in the map, in 2D and 2.5D. Press U to find duplicate files: TreeX compares sizes first, then the beginning and end of each file, and reads whole contents only for files that still match. Build artifacts are left out by default, since they are full of identical package files. Pick which copy to keep (the oldest by default) and delete the others: each one is compared again with the copy kept right before it goes. From the terminal, use treex types and treex dupes --delete.

File types (T) Duplicates (U)

Every file, every volume, any deletion

  • File list (L): every file or folder of the analysis, with wildcard search (*.mov, Downloads/*.dmg), size and age filters, sortable columns and CSV / JSON export (treex export).
  • Delete anything: ⌘-click to select, then ⌘⌫ to move to the Trash, or ⌥⌘⌫ to delete permanently. TreeX checks each item again right before touching it, never follows symlinks, and always refuses system locations and your top-level folders (treex delete).
  • Right-click for Quick Look, Open with, Get Info, Show in Finder and more.
  • This Mac / This PC / This computer: your disks, external drives, disk images and network shares, with their free space (treex volumes).
  • Save an analysis (⌘S) and reopen it later, or on another Mac, without rescanning (⇧⌘O, --save / --from).

More than a disk map

  • What changed? (C, treex diff): TreeX quietly keeps the previous analysis of every folder, so it can tell you what is new, what grew and what was removed since yesterday — no saving needed.
  • APFS clones: copies made on the same volume often share their blocks. TreeX shows the space a deletion really frees, marks clone copies among duplicates and never promises space that won't come back.
  • Purgeable space: each volume shows what macOS will free by itself (caches, local Time Machine snapshots, downloaded iCloud files).

What changed since the previous analysis

File list (L) Delete with confirmation

Command line: treex

TreeX is also a complete command-line tool: the same engine, the same Dev-Aware rules and the same safety checks as the app, on macOS, Windows and Linux, and on headless servers over SSH. It ships inside every app package and on its own, installs as a system command, and comes with manual pages (man treex) and Tab completion.

Interactive: treex tui

treex tui: folders by size

Explore a folder as in the app, inside the terminal:

  • Folders by size, with bars, item counts and age. Arrows move, → opens, ← goes back; the mouse works too (click, double click, wheel).
  • Dev-Junk (2): every build artifact and cache that can be rebuilt (node_modules, target, .venv, DerivedData, npm, Cargo and Gradle caches…), with its ecosystem and how long its project has been idle. Mark with space, d moves them to the Trash.
  • File types (3): the space by extension, in the app's colors.
  • Safe deletion: d to the Trash, D permanently, always after a confirmation; each item is checked again right before it goes, and protected system folders are never touched.
  • The app's look: Aurora colors in 24-bit where the terminal supports them, the 256-color palette otherwise, none with NO_COLOR.
Dev-Junk (2) File types (3)
Delete with confirmation Every key (?)
Key Action
↑ ↓ j k · PgUp PgDn · g G move · page · first, last
→ Enter / ← Backspace open the folder / back to the parent
1 2 3 Tab Folders · Dev-Junk · File types
space · Esc mark / unmark · clear the marks
d · D move to the Trash · delete permanently (both ask first)
/ · s filter by name · sort by size, name, items or date
r · R update the analysis · rescan everything
? · q every key · quit

Reports and scripts

Every analysis is also a command that prints a report; most of them add --json for scripts. Like the app, a command reuses the previous analysis of the same folder, so the second run takes a fraction of a second.

treex dev: build artifacts and caches by ecosystem

treex scan treex clean (dry run)
Command What it does
treex tui [PATH] the interactive explorer above
treex scan [PATH] the largest entries, -d levels deep, -n per level; --json
treex dev [PATH] build artifacts and caches you can regenerate, by ecosystem; --json
treex clean [PATH] the cleaning plan (dry run); --apply moves to the Trash; --permanent, --min-age DAYS, --ecosystem, --rule
treex types [PATH] space by file extension; --json
treex dupes [PATH] duplicate files; --delete --keep oldest|newest|shortest removes the extra copies (dry run unless --apply); --json
treex export [PATH] every file as CSV or JSON (-o, --format), filtered with --name, --ext, --min-size, --older-than…
treex delete PATH… to the Trash (or --permanent) with safety checks
treex diff [PATH] what changed since the previous analysis, or --against a saved one; --json
treex volumes the mounted disks with their space; --json
treex history the cleanings done, with their space
treex rules list | check | test inspect, validate and debug the Dev-Aware rules
treex completions SHELL the Tab-completion script for bash, zsh, fish, PowerShell, elvish

Every command is described in its own manual page (man treex-scan, man treex-clean…) and in treex <command> --help; the full reference, in Italian, is in docs/user/cli.md.

treex as a system command

System How
macOS With Homebrew the cask installs treex too, with its manual pages and completions. From the DMG: in the app, ⌘K → Install the treex command in the terminal. Command line only: treex-cli-<version>-macos-universal.tar.gz → ./install.sh
Linux (On ARM64: arm64 instead of amd64, aarch64 instead of x86_64.) Debian, Ubuntu: sudo apt install ./treex_<version>_amd64.deb. Fedora, RHEL, openSUSE: sudo dnf install ./treex-<version>-1.x86_64.rpm. Any distribution, servers included: treex-cli-<version>-linux-x86_64.tar.gz → ./install.sh (--user: no root). AppImage: Ctrl+K → Install the treex command in the app
Windows (On ARM64: arm64 instead of x64.) The app's installer (TreeX-<version>-windows-x64-setup.exe) adds treex to your PATH (an option, on by default). Command line only: treex-cli-<version>-windows-x64.zip → double-click install.cmd (adds treex to your PATH, no administrator). With the portable zip: Ctrl+K → Install the treex command in the app

Then man treex (macOS, Linux) or treex --help, and Tab completion in bash, zsh, fish and PowerShell. To remove it: ./install.sh --uninstall, sudo apt remove treex, sudo dnf remove treex, install.cmd -Uninstall. The copy inside the app updates with the app; the standalone packages update by installing the new version over the old one.

Install

From the releases, pick your system and processor:

System Processor App Command line only
macOS 13+ Apple Silicon and Intel TreeX-<version>-macos-universal.dmg treex-cli-<version>-macos-universal.tar.gz
Windows 10/11 x64 (Intel, AMD) TreeX-<version>-windows-x64-setup.exe (installer) or TreeX-<version>-windows-x64.zip (portable) treex-cli-<version>-windows-x64.zip
Windows 11 ARM64 (Snapdragon) TreeX-<version>-windows-arm64-setup.exe or TreeX-<version>-windows-arm64.zip treex-cli-<version>-windows-arm64.zip
Linux x86_64 TreeX-<version>-x86_64.AppImage, TreeX-<version>-x86_64.flatpak, treex-<version>-linux-x86_64.tar.gz treex_<version>_amd64.deb, treex-<version>-1.x86_64.rpm, treex-cli-<version>-linux-x86_64.tar.gz
Linux ARM64 (Raspberry Pi 4/5, ARM servers) TreeX-<version>-aarch64.AppImage, TreeX-<version>-aarch64.flatpak, treex-<version>-linux-aarch64.tar.gz treex_<version>_arm64.deb, treex-<version>-1.aarch64.rpm, treex-cli-<version>-linux-aarch64.tar.gz
  • macOS: open the DMG and drag TreeX into Applications. The treex command-line tool ships inside the app.
  • Windows: the installer sets TreeX up for your user, no administrator needed, with a Start menu entry, the treex command in your PATH if you keep that option, and an uninstaller in Settings → Apps. Prefer a portable copy? Unzip the zip and run TreeX.exe (the command-line tool is bin\treex.exe). Run as administrator for the fastest whole-drive analysis (Master File Table) and instant re-analysis (USN journal). On a Windows on ARM PC, the ARM64 installer replaces an x64 TreeX in place.
  • Linux: the AppImage is one file that runs on most distributions; the Flatpak installs with flatpak install --user …; the archive installs with ./install.sh (no root needed). Everything needs glibc 2.28 or later. Not sure which processor you have? uname -m says x86_64 or aarch64.
  • Command line only (servers too): see treex as a system command.

First-launch steps, Homebrew and uninstalling: docs/user/install.md.

Updating: click Updates in the bottom-right corner of the home screen (or ⌘K → Check for updates). TreeX asks GitHub for the latest release and, if you choose to update, downloads it, checks its digital signature, replaces itself and restarts. Flatpak can't update apps itself: install the new .flatpak file.

Quick start

treex tui ~                      # explore interactively (arrows, ? for every key)
treex scan ~/Developer -d 2      # sizes, two levels deep
treex dev ~                      # build artifacts and caches you can reclaim
treex clean ~/Developer          # dry run; add --apply to move them to the Trash
treex types ~                    # space by file extension
treex dupes ~/Pictures           # duplicate files (≥ 1 MiB by default)
treex export ~ --name '*.mov' -o movies.csv   # every .mov, as CSV
treex delete ~/Downloads/old.iso # to the Trash, with safety checks
treex diff ~/Developer           # what changed since the previous analysis

In the app:

  • Tab switches between 2D and 2.5D; in 2.5D, ↺ ↻ (or Q / E) turn the city, as do two fingers on a Mac trackpad;
  • the scroll wheel zooms into detail;
  • ⌘K searches everything;
  • 4 turns on Reclaim mode;
  • T shows file types, U finds duplicates, L lists every file and C shows what changed;
  • ⌘-click selects, ⌘⌫ moves to the Trash, right-click opens the menu (on Windows and Linux: Ctrl-click, Delete).

Documentation

The user guides are in docs/ (in Italian): installation, the app, the command line, configuration and macOS permissions. What changed in each version is in the release notes.

TreeX uses the network only when you click Updates: one request to GitHub for the latest release, plus the download if you choose to update. Nothing about you or your disk is sent. Scans read only metadata (names, sizes, dates). File contents are read only when you start a duplicate search, and only for files that share their size with another one.

Support TreeX

TreeX is free. If it saved you some gigabytes (or some time), you can support its development on GitHub Sponsors. Sponsorships pay for what a free app needs to grow:

  • code-signing certificates, so macOS and Windows stop asking for confirmation on first launch;
  • app-store packages (Homebrew, winget, Flathub);
  • test machines for the three systems, and the time to keep TreeX the fastest of its kind.

Sponsor TreeX on GitHub

You can also find the ♥ Support TreeX button in the bottom-right corner of the app's home screen. Starring the repository and telling other developers about TreeX helps too.

License

Your choice of MIT or Apache-2.0. Dependency licenses are listed in THIRD_PARTY_LICENSES.md.

About

The disk analyzer for developers. Blazing fast, build-artifact aware, and a pleasure to explore.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors