Skip to content
CAI
Software that uses CAICheck a score

Byron/dua-cli

68.3

Adequate · 29 September 2026

25.1k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a disk usage analysis and cleanup tool that provides both a command-line interface and an interactive terminal UI for scanning file systems. It features high-performance directory traversal with accurate storage accounting, including support for APFS clones, and offers capabilities for comparing usage snapshots, aggregating data, and identifying cleanup candidates. The tool supports parallel deletion, customizable visualizations, and multi-language localization, packaged as a Rust workspace with a dedicated library for filesystem operations.

How it got here

2019 — interactive UI rewrite and snapshot features

8 changes.

This period focused on rewriting the interactive TUI with a component-based architecture, introducing localization, parallel deletion, and Git-aware cleanup. It also added snapshot-based diff and aggregate commands for disk usage analysis, supported by a new binary snapshot codec and extensive test coverage.

2020–2026 — dua-lib extraction and CI automation

5 changes.

The project extracted the core filesystem traversal logic into a new dua-lib crate, optimizing performance on macOS with native bulk APIs and adding comprehensive integration tests. Concurrently, CI infrastructure was enhanced with scripts for automated GitHub release installation and validation.

Features

Add GitHub release installation script and CI validation

Introduces a new \ci/install.sh\ script that allows users to install the \dua\ binary directly from GitHub releases, supporting options for specifying the crate, version tag, target platform, and installation directory (defaulting to \$CARGO\_HOME/bin\). The change also adds platform-specific package installation helpers (\ci/ubuntu-install-packages\, \ci/macos-install-packages\) and a validation script (\ci/validate-release-install.sh\) to verify the installation process works correctly for specific release tags.

ci · high confidence

Extracted filesystem walker into the new dua-lib crate

The filesystem traversal logic has been extracted into a new \dua-lib\ crate, providing a parallel, work-stealing directory walker. This library supports streaming roots, cancellable walks, and configurable entry ordering (parent-first or completion-based) across Windows and macOS platforms, while optimizing performance by reusing workers and avoiding unnecessary metadata queries.

crates/dua-lib/src · high confidence

Interactive mode rewritten with new UI components and parallel deletion

The interactive application has been completely refactored to use a new component-based architecture (tui-react) and a modernized event loop. This introduces several new capabilities: parallel file deletion with progress tracking, a dedicated 'Clean Hub' view for grouping cleanup candidates, and Git-aware cleanup marking that respects .gitignore rules. Users can now cycle through multiple byte visualization modes (percentage, bar, long bar), toggle sorting by modification time with different scopes (entry, recursive newest/oldest), and configure keybindings via a configuration file. The UI also supports terminal focus notifications, case-sensitive glob search, and improved handling of symlinks and broken entries during traversal and deletion.

src/interactive/app · high confidence

Introduce snapshot-based diff and aggregate commands with Git-aware cleanup

The tool now supports comparing disk usage via a new \diff\ command that reads traversal snapshots, and an \aggregate\ command that summarizes multiple paths with optional totals and sorting. A new \clean\ subcommand identifies cleanup candidates (like \node\_modules\ or \target\) using Git-aware heuristics and supports background deletion. These features rely on a new binary snapshot codec (\snapshot/mod.rs\) for storing and replaying traversal data, and a new \diff.rs\ module for computing and displaying added, removed, and modified entries between snapshots.

src · high confidence

Behavioural changes

Interactive UI rewritten with new widget components and localization

The interactive interface has been rebuilt using a new set of dedicated widget modules (entries, footer, glob, header, help, mark, and main) that replace the previous rendering logic. This change introduces a localized UI that automatically detects the user's language from environment variables (supporting English, German, Japanese, Korean, and Chinese) and renders all interface text accordingly. The new layout includes a dedicated help pane, a glob search pane with case-sensitivity toggling, and a mark pane for managing deletion candidates, all integrated into a main window that handles focus, scrolling, and pane minimization.

src/interactive/widgets · high confidence

New interactive module structure with path utility

The src/interactive directory now contains a new mod.rs file that establishes the module structure for the interactive component. This file declares the app and widgets submodules, re-exports app components, and provides a path\_of utility function that retrieves the file system path for a given tree node index. This change reorganizes the interactive module's public interface and adds a helper for resolving paths within the tree structure.

src/interactive · high confidence

macOS directory scanning now uses native bulk attribute APIs for accurate APFS clone accounting

The macOS directory scanner has been rewritten to use the native \getattrlistbulk\ API instead of per-entry system calls. This change significantly improves scan performance by batching metadata requests and allows the tool to correctly identify and count APFS copy-on-write clones, ensuring that shared storage is not double-counted in disk usage reports. The implementation also introduces compact in-memory structures for metadata and entries to reduce memory overhead during traversal.

crates/dua-lib/src/macos · high confidence

Test coverage

Added comprehensive integration tests for the interactive app; Added comprehensive test coverage for disk usage analysis features; Added snapshot tests for disk usage analysis features; Added tests for filesystem walker behavior and options; Expanded test fixtures for Unicode, grapheme, and file system edge cases.

Dependencies

dua-cli v2.45.0 release with workspace restructuring and dependency upgrades

This release updates the project to version 2.45.0 and restructures the codebase into a workspace containing the main CLI and a new \dua-core\ library (v4.1.0). Key dependency upgrades include switching the argument parser from \structopt\ to \clap\ v4, the TUI backend from \tui\ to \ratatui\ v0.30.2, and the trash library to v5.2.0. The project also adopts the Rust 2024 edition, enables fat LTO for smaller binaries, and updates various other crates such as \crossbeam\, \anyhow\, and \gix\.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 68 → 68 (-0.0)
  • Rubric changed (rubric-2026.09.9 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 84 → 84 (+0.0)
  • Architecture 100 → 95 (-4.7)
  • Maturity 60 → 60 (-0.0)
  • Readiness 68 → 68 (-0.2)
  • Security 72 → 76 (+4.4)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (5)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Hotspot: src/config.rs (src/config.rs)
  • Hotspot: src/diff.rs (src/diff.rs)
  • Hotspot: src/interactive/widgets/i18n.rs (src/interactive/widgets/i18n.rs)

New (22)

  • Duplicate method signatures across platform modules. FileType methods are identical in macos and windows submodules, reinforcing the duplication issue found in Entry.
  • Duplicate method signatures across platform modules. Metadata methods are largely identical in macos and windows submodules.
  • Duplicate type definitions across platform modules. The Entry type is defined identically in dua_core, dua_core.macos, and dua_core.windows. This suggests a lack of abstraction or conditional compilation that results in redundant API surface definitions.
  • Inconsistent callback signatures for filtering. RootSender.add_root uses Fn(&Entry), while walk also uses Fn(&Entry). However, walk_roots uses Fn(usize, &Entry). While distinct domains (single root vs multiple roots), the inconsistency in whether the root index is passed to the filter function is confusing. add_root requires the user to manage the index externally, whereas walk_roots provides it.
  • Medium advisory (unsound): RUSTSEC-2026-0306 (Cargo.lock)
  • Off the main sequence: dua-core
  • Outdated: anyhow
  • Outdated: bstr
  • Outdated: byte-unit
  • Outdated: chrono
  • Outdated: clap
  • Outdated: clap_complete
  • Outdated: human_format
  • Outdated: jiff
  • Outdated: libc
  • Outdated: log
  • Outdated: open
  • Outdated: owo-colors
  • Outdated: serde
  • Outdated: toml
  • …and 2 more

Changes since last survey

  • 6 commits — 4 feature/other, 2 fixes

By area

  • (repo) — 3 commits
  • crates/dua-lib — 1 commit
  • src/interactive — 1 commit
  • src/options.rs — 1 commit

Notable commits

  • fix: Merge pull request #407 from Mathjk/fix/verbatim-path
  • fix: fix: keep verbatim paths verbatim when resolving relative paths on Windows
  • change: Merge pull request #404 from Likio3000/docs/dua-cli-behavior-20260923
  • change: Merge pull request #405 from Byron/del-remaining
  • change: Show deleted bytes in the deletion status line
  • change: docs: correct platform defaults in threads help

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Byron/dua-cli was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8f8d25b95963523be973243f9a23dfdbf15f8bb1 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-c4983f2d4e5c.