Directory Usage STatistics sYstem
A beautiful terminal-based directory size analyzer, similar to Linux's du command or Windows TreeSize Free. Built with Go and features an interactive TUI (Terminal User Interface).
- Recursive Directory Scanning: Calculates cumulative storage usage for all folders and files
- Interactive Navigation: Browse through your directory tree with keyboard controls
- Visual Size Bars: See relative sizes at a glance with progress bars
- Multiple Sort Options: Sort by size or name
- Colorful Display: Syntax-highlighted output with distinct colors for directories and files
- Human-Readable Sizes: Automatic formatting (B, KB, MB, GB, TB, PB, EB)
- Percentage Display: Shows what percentage each item takes of its parent directory
- Fast Performance: Concurrent scanning for quick results
Download the latest release for your platform from the Releases page.
Linux/macOS:
# Download and install (replace URL with actual release URL and platform)
curl -L https://github.com/twiddles/dusty/releases/latest/download/dusty-linux-amd64 -o dusty
chmod +x dusty
sudo mv dusty /usr/local/bin/Windows:
Download the .exe file and add it to your PATH.
go install github.com/twiddles/dusty@latest# Clone the repository
git clone https://github.com/twiddles/dusty.git
cd dusty
# Build the binary
go build -o dusty
# Optional: Install to your PATH
go installScan the current directory:
./dustyScan a specific directory:
./dusty /path/to/directoryOr if installed:
dusty ~/Documents| Key | Action |
|---|---|
↑ / k |
Move cursor up |
↓ / j |
Move cursor down |
→ / Enter / l |
Enter selected directory |
← / Backspace / h |
Go back to parent directory |
d |
Delete highlighted file or folder |
s |
Toggle sort (size/name) |
Home |
Return to root directory |
q / Ctrl+C |
Quit application |
- Scanning Phase: The application recursively walks through the directory tree, calculating the size of each file and aggregating sizes up the tree
- Interactive Display: Uses Bubble Tea framework for a smooth TUI experience
- Navigation: You can drill down into directories to see their contents and sizes
- Sorting: Toggle between sorting by size (largest first) or alphabetically by name
- Language: Go 1.21+
- UI Framework: Bubble Tea - Terminal UI framework
- Styling: Lip Gloss - Style definitions for terminal output
- Architecture: Clean separation between data model and view
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/lipgloss v1.1.0
dusty/
├── main.go # Main application code
├── go.mod # Go module definition
├── go.sum # Dependency checksums
├── Makefile # Build automation
├── .goreleaser.yml # GoReleaser configuration
├── .github/workflows/ # GitHub Actions for releases
├── LICENSE # MIT License
└── README.md # This file
make build # Build for current platform
make build-all # Build for all platforms (Linux, macOS, Windows)
make install # Install to $GOPATH/bin
make test # Run tests
make clean # Remove build artifacts
make help # Show all available commandsNote for Windows users: If you don't have make, you can build directly with:
go build -o dusty.exe- For very large directory trees (millions of files), the initial scan may take some time
- The application skips directories it doesn't have permission to access
- Symbolic links are followed, which may lead to duplicate counting if they point within the scanned tree
- Does not detect hard links (files may be counted multiple times)
- Symbolic links are treated as regular files/directories
- Requires read permissions for all directories you want to scan
Feel free to open issues or submit pull requests with improvements!
MIT License - Feel free to use this project for any purpose.
Built with:
- Bubble Tea by Charm
- Lip Gloss by Charm