Skip to content

A modern disk usage analyzer for the command line and desktop

Notifications You must be signed in to change notification settings

jguida941/disk-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disk Analyzer

A modern disk usage analyzer for the command line and desktop.

Features

  • Top folders by size: Identify which directories are consuming the most space
  • Top file types by size: View disk usage grouped by file extension
  • Recently modified files: List files changed within the last 24 hours
  • Suspicious growth detection: Flag log and cache files that may be accumulating
  • Flexible output: Use flags to display only relevant information

Quick Start

macOS: Double-click scripts/launch.command

Windows: Double-click scripts/launch.bat

Both scripts automatically create a virtual environment, install PyQt6, and launch the GUI.

Manual Installation

pip install -r requirements.txt

Usage

CLI

python src/main.py <path> [options]

GUI

python src/gui.py

Options

Flag Description
--folders Show only top folders by size
--types Show only top file types by size
--recent Show only recently modified files
--suspicious Show only suspicious growth files
--help Show help message

Examples

python src/main.py .                      # Scan current directory (show all)
python src/main.py ~/Desktop              # Scan Desktop (show all)
python src/main.py ~/Desktop --folders    # Only show top folders
python src/main.py ~/Desktop --types      # Only show file types
python src/main.py ~/Desktop --suspicious # Only show log/cache files
python src/main.py . --folders --types    # Show folders and types only

Screenshots

Top Folders

See which directories are using the most disk space.

Top Folders

File Types

Identify which file extensions consume the most space.

File Types

Recent Files

View files modified in the last 24 hours.

Recent Files

Suspicious Files

Find log and cache files that may be growing unexpectedly.

Suspicious Files

CLI Output Example

Found 8 files

Top folders by size:
  .: 7.82 KB
  ./__pycache__: 5.31 KB

Top file types by size:
  .py: 6.77 KB
  .pyc: 5.31 KB
  .md: 1.06 KB

Recently modified files:
  ./scanner.py: 2.99 KB, 2026-01-19 10:51
  ./main.py: 1.22 KB, 2026-01-19 11:04

Suspicious growth files:
  (shows top 10 largest .log and .cache files)

Project Structure

disk-analyzer/
├── src/
│   ├── __init__.py   # Package init
│   ├── main.py       # CLI entry point - parses arguments
│   ├── gui.py        # PyQt6 GUI entry point
│   ├── theme.py      # Qt stylesheet for GUI theming
│   ├── scanner.py    # Walks directories, collects file info
│   ├── analyzer.py   # Processes data, calculates top folders/types
│   └── formatter.py  # Converts bytes to human-readable sizes
├── imgs/             # Screenshots for README
├── scripts/
│   ├── launch.command # Double-click to launch (macOS)
│   └── launch.bat     # Double-click to launch (Windows)
├── requirements.txt  # Python dependencies
└── README.md         # This file

Future Improvements

  • --depth flag to limit scan depth
  • Exclude patterns (skip node_modules, .git, etc.)
  • Progress indicator for large directories

About

A modern disk usage analyzer for the command line and desktop

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published