| Crates.io | mcdu |
| lib.rs | mcdu |
| version | 0.3.5 |
| created_at | 2025-12-31 03:57:53.22855+00 |
| updated_at | 2025-12-31 12:43:41.220687+00 |
| description | A modern disk usage analyzer with a terminal UI, inspired by ncdu |
| homepage | |
| repository | https://github.com/mikalv/mcdu |
| max_upload_size | |
| id | 2013873 |
| size | 132,375 |
A fast, modern, and safe disk usage analyzer with integrated file deletion capabilities, written in Rust. Spiritual fork of ncdu with enhanced performance and features.
~/.mcdu/logs/# Build from source
cargo build --release
# Run
./target/release/mcdu
# Optional: Install to system
cargo install --path .
↑/k - Move cursor up↓/j - Move cursor downEnter/→/l - Enter directoryBackspace/←/h - Go to parent directoryd - Delete selected file/directoryr - Refresh current view (uses cache)c - Clear cache and hard refresh? - Show help screenq/Esc - Quit application[Yes] [No] [Dry-run][YES, DELETE] [Cancel]Press d on target, then select [d] Dry-run to see what would be deleted without actually deleting anything.
r - Refresh (uses cache for speed)c - Clear cache and rescan (force accurate sizes)The cache automatically invalidates based on directory modification times, ensuring you see up-to-date information.
📊 mcdu v0.2.0 | /Users/username/Repos 42 items | 15 cached | 💾 42GB/460GB (91%)
Shows: current path, item count, cached entries, and disk space (available/total/percent used)
┌────────────────────────────────────────┐
│ ⟳ Scanning directory... │
│ │
│ 22 / 135 items (16%) │
│ │
│ evesrc │
│ │
│ Please wait │
└────────────────────────────────────────┘
Shows: progress counter, current directory being scanned, and percentage complete.
┌─────────────────────────────────────────────────────────┐
│ 📊 mcdu v0.2.0 | /Users/username/Projects │
├─────────────────────────────────────────────────────────┤
│ Path: /Users/username/Projects │
│ │
│ 📁 node_modules 123.4 GB ▓▓▓▓▓░░░░░░ ⬆ 5% │
│ 📁 .git 45.2 GB ▓▓▓░░░░░░░░ │
│ 📁 target 12.1 GB ▓░░░░░░░░░░ │
│ 📄 large-file.iso 2.3 GB ░░░░░░░░░░░ │
│ │
├─────────────────────────────────────────────────────────┤
│ [↑↓jk] Navigate [Enter] Open [h] Parent │
│ [d] Delete [r] Refresh [c] Clear cache [?] Help │
│ [q/Esc] Quit │
└─────────────────────────────────────────────────────────┘
⬆/⬇ arrows show size changes since last scan.
All deletions and dry-runs are logged to ~/.mcdu/logs/delete-YYYY-MM-DD.log
{
"timestamp": "2025-01-10T14:23:45Z",
"action": "delete",
"path": "/Users/username/Projects/node_modules",
"size_bytes": 132548901234,
"dry_run": false,
"status": "success",
"files_deleted": 45821,
"duration_ms": 3421,
"errors": null
}
src/
├── main.rs # Event loop and input handling
├── app.rs # Application state and logic
├── ui.rs # TUI rendering with ratatui
├── scan.rs # Async directory scanning
├── delete.rs # Optimized file deletion
├── modal.rs # Modal dialog system
├── platform.rs # Platform-specific (statvfs, disk space)
├── cache.rs # Size caching with mtime validation
├── changes.rs # Directory fingerprinting & change detection
└── logger.rs # JSON structured logging
f_frsize# Debug build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test
# Run with debug logging
RUST_LOG=debug cargo run
# Check documentation
cargo doc --open
Scanning 100k files:
Deletion:
MIT
Pull requests welcome! Please ensure:
cargo clippy)cargo test)For issues or feature requests, please open an issue on GitHub.
Inspired by ncdu - the original ncurses disk usage analyzer.