Skip to content

Repository files navigation

duex

duex - Disk Usage Explorer

CI GitHub Release

duex is a fast, interactive terminal-based disk usage utility written in Go. It helps you understand what is consuming space on your drives by providing a navigable, visual breakdown of folders and files.

duex demo

Features

  • Interactive TUI: Built with the Charm ecosystem (Bubble Tea, Bubbles, Lip Gloss) for a modern, responsive terminal experience.
  • Accurate Sizing: Calculates actual physical disk usage, properly handling hard links (no double-counting) and sparse files.
  • Fast & Concurrent: Uses Go routines for rapid, non-blocking directory traversal.
  • Real-time Progress: Visual feedback with an animated spinner and scrolling file list during heavy scans.
  • Instant Breakdowns: Automatically computes and displays a file extension breakdown for directories.
  • Top Files View: Switch tabs to view the largest files in the scanned tree (capped at 500 entries for speed).
  • Filter & Search: Quickly find specific files in large directories.
  • File Deletion: Safely delete files or directories directly from the TUI with confirmation prompts.
  • Safe Navigation: Cancel long-running scans instantly with esc.

Installation

Using Homebrew

brew install evilmarty/duex/duex

Using Go

Install the latest version directly using go install:

go install github.com/evilmarty/duex@latest

Ensure your go/bin directory (typically $HOME/go/bin or $GOPATH/bin) is in your system's $PATH.

Pre-built Binaries

You can download the latest release from GitHub Releases.

Building from Source

Make sure you have Go installed.

Clone the repository and build the executable:

git clone https://github.com/evilmarty/duex
cd duex
go build -ldflags="-X main.Version=v1.0.0" -o duex

You can then move the duex binary to a location in your $PATH.

Usage

Run duex in your current directory:

./duex

Or provide a specific path to scan:

./duex /path/to/scan

CLI Flags

Flag Description
-h, --help Show usage instructions
-v, --version Show application version
-c, --cross-mounts Allow crossing filesystem boundaries
-m, --min-size Minimum file size to include in top files (default: 100mb)

Keyboard Shortcuts

Key Action
/ k Move cursor up
/ j Move cursor down
enter Open selected directory / Jump to file's location
backspace Go up to parent directory
esc Cancel active scan / Go back
r Refresh (rescan current directory)
/ Filter files in current directory
tab Switch views (Directory / Top Files)
d Delete selected file or directory
q / ctrl+c Quit application

Testing and Coverage

The project maintains a high standard of test coverage (95%+ for core packages).

To run the test suite:

go test ./...

To generate and view the detailed code coverage profile:

go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out

Contributing

We welcome contributions to duex! If you would like to help improve this utility:

  1. Read our Contributing Guide to understand our development workflow, core architectural patterns (e.g., Bubble Tea TUI conventions, concurrent scan synchronization), and testing requirements.
  2. Search through existing issues or open a new issue to report bugs or discuss feature suggestions.
  3. Fork the repository, implement your changes (with tests to maintain 95%+ coverage for core packages), and open a pull request.

Please make sure all concurrent code passes the Go race detector before submitting a PR.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Duex is a Go-based terminal utility for visualizing and analyzing disk usage, featuring interactive navigation, accurate sizing, and real-time feedback.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages