Skip to content

AloysAugustin/diskatlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiskAtlas

A free, native macOS disk space analyzer that shows you what's taking up space. Scan any volume or folder and see where the gigabytes went — at a glance — with a cushion treemap: every file is a rectangle sized by how much space it uses and colored by kind, so the big space hogs jump right out.

DiskAtlas showing a cushion treemap of /Applications — every file is a rectangle sized by how much disk space it uses and colored by file kind, so large files and folders stand out at a glance

DiskAtlas is a modern, clean-room reimagining of the classic Disk Inventory X for current macOS (Apple Silicon, macOS 14+). If you've reached for WinDirStat on Windows, or GrandPerspective / DaisyDisk on the Mac, to figure out why your disk is full and find large files to clean up — this is the same idea, rebuilt native and fast.

It pairs the treemap (squarified layout + Van Wijk/van de Wetering cushion shading) with a file-tree outline and a File Kinds breakdown. Built as a pure SwiftPM project — no Xcode required, just Command Line Tools.

Features

  • Cushion treemap of an entire volume or any folder — instantly see what's using disk space.
  • File-tree outline with per-row size and percentage bars, sorted by size.
  • File Kinds panel — disk usage grouped by file type (video, photos, code, caches, …).
  • Handles huge disks — millions of files, via a memory-efficient struct-of-arrays model.
  • Click anywhere in the treemap to select a file; cross-highlights the outline.
  • File actions — reveal in Finder, Get Info, move to Trash.
  • Physical vs. logical size toggle; whole-volume or single-folder scans.
  • Fast, native Swift / SwiftUI / AppKit; Apple Silicon.

Requirements

  • macOS 14+ (developed/tested on macOS 26, Apple Silicon)
  • Swift 6.2 toolchain (Xcode Command Line Tools is enough: xcode-select --install)

Build & run

# Build the app and assemble a signed .app bundle under ./dist
./Scripts/build-app.sh debug        # or: release

# Launch it
open "dist/DiskAtlas.app"

Then use Open… in the toolbar to pick a folder or volume to scan.

Install to /Applications

cp -R "dist/DiskAtlas.app" /Applications/
codesign --force --sign - "/Applications/DiskAtlas.app"   # re-sign after the copy

App icon

The icon (a cushion-treemap in a macOS squircle) is generated from code — no Xcode, no image editor:

./Scripts/make-icon.sh        # renders the master + packs Resources/AppIcon.icns

build-app.sh copies AppIcon.icns into the bundle (and regenerates it automatically if it's missing).

Headless render (no GUI)

Render a folder's treemap straight to a PNG — handy for scripting/CI or quick checks:

swift build
DISKINV_SCAN_PATH=/some/folder \
DISKINV_RENDER_PNG=/tmp/treemap.png \
"$(swift build --show-bin-path)/DiskAtlas"

The app also auto-scans a path passed as its first argument: open "dist/DiskAtlas.app" --args /some/folder.

Test

Command Line Tools ship no XCTest, so tests are lightweight assertion executables:

./Scripts/run-tests.sh              # builds, runs every *Checks target

Architecture

Non-UI logic lives in small, independently testable Swift packages; the app target is a thin SwiftUI/AppKit shell over them.

Module Responsibility
DiskModel Memory-efficient struct-of-arrays node store (millions of nodes), NodeRef, size/aggregation, names in one UTF-8 blob.
DiskScanner Concurrent readdir+lstat volume walker → fills a NodeStore. (dev,inode) dedup for both hard links and APFS firmlinks (so the Data volume isn't double-counted when scanning /), symlink/package/permission handling, mount-boundary stop, progress + cancellation.
TreemapEngine Squarified layout + cushion shading rendered to an offscreen bitmap (CGImage) plus a parallel ID-buffer for O(1) click hit-testing.
FileKinds Classifies nodes by UTType into kinds, assigns interned kindIDs, aggregates per-kind sizes, deterministic color palette + user overrides (persisted).
DiskInventoryApp SwiftUI app: toolbar, treemap view (NSView), file-tree outline (NSOutlineView with % bar), File Kinds inspector, cross-selection, file actions, zoom, physical/logical toggle, Full Disk Access onboarding.
TestKit Tiny dependency-free assertion harness used by the *Checks executables.

Notes on macOS specifics

  • Non-sandboxed by design — a whole-disk scanner can't live in the App Sandbox (so it is not Mac App Store eligible, same as DaisyDisk/GrandPerspective). For complete results on a full volume, grant the app Full Disk Access in System Settings → Privacy & Security; the app detects unreadable folders and surfaces a banner with a deep link.
  • For distribution to other Macs, sign with a Developer ID cert + notarize (Resources/DiskAtlas.entitlements is the non-sandboxed entitlements file; notarytool requires full Xcode).
  • Sizes are reported as physical (allocated) by default, with a toggle to logical.
  • macOS volume layout: on modern macOS, / (read-only System volume) and the Data volume share a st_dev and the same directories appear at two paths via firmlinks (/Users/System/Volumes/Data/Users). The scanner deduplicates directories by (dev,inode), so scanning / reports each inode once (≈ matches df) instead of double-counting the Data volume. Hard links are likewise counted once. APFS clones inherently over-count physical usage (as does du).

License & provenance

Licensed under the MIT License.

This is an independent, clean-room reimplementation inspired by the original Disk Inventory X by Tjark Derlien (which is GPL). No source code from the original is used — only the concept (treemap disk visualization) and published algorithms (squarified treemaps; Van Wijk & van de Wetering cushion treemaps) are reimplemented from scratch. This project is not affiliated with or endorsed by the original author. "Disk Inventory X" is the original's name; this project ships under the distinct name DiskAtlas to avoid confusion.

About

Free, native macOS disk space analyzer — see what's taking up disk space with a cushion treemap. A modern Swift/SwiftUI reimagining of Disk Inventory X (like WinDirStat / GrandPerspective / DaisyDisk).

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors