fdu
Fastest native du replacement and detailed file analytics for Python and Rust
fdu answers, for every directory in a tree at once: how big is it, how many files does it hold, what changed most recently, and what kinds of files live in it. One walk, many metrics, with reusable metadata and content state.
This crate is the fdu command line.
It is also a library that re-exports the whole
fdu-core engine, so there is one name to know for
installing the tool and for depending on it.
Status: 0.x. A new minor release may change the Rust API, the Python API, or the command line; the release process states the compatibility rules.
Set Up with Any Coding Agent
Give the agent this instruction:
Run
uvx --no-build fdu@latest --install-skillfrom the project root to install fdu’s self-contained skill for current and future agent sessions.
The installer writes .agents/skills/fdu/SKILL.md and .claude/skills/fdu/SKILL.md.
The skill needs no prior session context; fdu --skill prints it.
Install the Command Line
With uv, run the prebuilt command without a Rust toolchain
or a persistent install, or keep it on your PATH:
uvx --no-build fdu@latest .
uv tool install --no-build fdu
fdu .
--no-build requires a compatible wheel and fails instead of compiling from source.
The Python package publishes wheels for GIL-enabled
CPython 3.12 and newer on Linux glibc (x86-64 and arm64), macOS (x86-64 and arm64), and
Windows x86-64. No Python version is needed in normal use.
If uv selects free-threaded CPython, such as 3.14t, retry with --python 3.14.
uv tool upgrade fdu updates a persistent install.
To install the Rust crate from source, use Rust 1.85 or newer:
cargo install --locked fdu
fdu --help
--locked builds against the Cargo.lock published with the crate.
Without it Cargo re-resolves every dependency to the newest compatible release, which
bypasses the review and release cool-off
the supply-chain policy
applies to the dependency set.
Use
fdu requires a path; bare fdu prints help and scans nothing.
fdu . # directory tree: allocated sizes, largest first
fdu . --view=summary # one total for the tree
fdu . --view=languages # which languages occupy space
fdu . --view=recent --limit=10 # the ten most recently modified files
fdu . --ignored=exclude # leave out entries .gitignore rules match
fdu . --analyze=code # standard lines of code; reads file contents
fdu . --view=summary,types --format=json # versioned machine output
fdu --docs # the offline usage guide
Without --analyze, fdu reads metadata and .gitignore files but never opens a regular
file for its contents.
--view chooses what is reported and never enables analysis.
As a Library
cargo add fdu
The default watch build feature adds the OS-native watch layer;
cargo add fdu --no-default-features leaves it out.
The command line’s own dependencies come with fdu either way, so an embedding that
wants none of them depends on fdu-core instead.
The API is documented on docs.rs, and
the repository README has examples.
Documentation
- Usage guide: every view, analyzer, cache policy, selection, and automation contract
- Repository README: performance evidence, cost layers, and how the engine works
- 0.2.1 release notes and changelog
- Security policy
License: MIT.