disk usage analyzer with live sorted results
Project description
diskface
A command-line disk & file usage analyzer with live, sorted results. It walks a directory (the current one by default), sizes every folder du-style, and shows the biggest ones as an expandable, numbered tree built with rich — then lets you pick nested folders to delete, or sweep temp files first.
By default it scans from the directory you're in, sizes folders
recursively (a folder's size includes everything under it), and skips the
regenerable "app junk" that clutters a real answer — node_modules, .git,
.cache, __pycache__, virtualenvs, package caches, and so on. Only folders at
or above your minimum size are shown.
Install
From PyPI (any OS):
pip install diskface # or: pipx install diskface
Arch Linux (AUR):
yay -S diskface # or your AUR helper of choice
Both give you a diskface command. The only runtime dependency is rich.
First run
On first launch in a terminal, diskface runs a short setup wizard and writes your
answers to ~/.config/diskface/config.json. Just press enter to take the
recommended default for each question. Re-run it any time with:
diskface --setup
To skip the wizard entirely (e.g. in scripts) and take defaults, pass --yes.
Usage
diskface [options]
| Flag | Description |
|---|---|
-m, --min-size <MB> |
Minimum size for a folder/file to even show (default 100) |
-t, --top <N> |
How many results to show per level (default 20) |
-R, --recursive / --shallow |
Size folders du-style (default) vs. by their own files only |
--tree / --flat |
Show recursive results as a tree (default) or a flat leaderboard |
--tree-depth <N> |
How many folder levels to expand in the tree (default 3) |
--depth <N> |
Max scan depth to walk (0 = unlimited) |
-f, --files / --dirs |
Scan individual files instead of directories |
-r, --root / --here |
Scan from / (re-runs with sudo) instead of the cwd |
-d, --hide-dotfiles |
Skip dotfiles / dotfolders |
-e, --exclude <pat> |
Add an exclude pattern (repeatable) |
--no-excludes |
Ignore the built-in junk excludes |
-c, --clean |
Sweep temp files before scanning |
-i / --no-interactive |
Toggle the post-scan deletion prompt |
--setup |
(Re)run the interactive setup wizard |
-y, --yes |
Accept defaults, never prompt for setup |
--config <path> |
Use an alternate config file |
-V, --version |
Print version and exit |
The tree numbers every folder it shows. When the deletion prompt appears, enter those numbers (comma-separated) to remove nested folders — each is confirmed before it's deleted.
Examples
diskface # recursive folder tree under the current directory
diskface --flat # same sizes, flat top-N leaderboard instead of a tree
diskface --tree-depth 5 -m 500 # expand 5 levels deep, only folders >= 500 MB
diskface -f # largest individual files instead of folders
diskface --root # whole system (elevates with sudo)
diskface -e '*.iso' -e backups # add extra excludes on top of the defaults
diskface --no-excludes # show everything, junk included
Scan depth vs. accuracy
--depth bounds how deep diskface walks; --tree-depth bounds how deep the
tree is shown. Folder totals are accurate for everything within the scan
depth, so if a tree has very deep content, --depth 0 gives fully accurate
du-style totals at the cost of a slower walk.
Excludes
Exclusions come from three places, combined at scan time:
- Built-in app junk (
APP_EXCLUDESindiskface.py) — matched by folder/file name anywhere in the tree. Disable with--no-excludes. extra_excludesin your config — your own always-on additions.-e/--excludeflags — one-off additions for a single run.
Matching rules: an entry without a slash matches a basename anywhere
(node_modules, .cache, glob-aware); an entry with a slash matches the full
path (/var/lib/docker, or **/foo for any .../foo). When scanning with
--root, pseudo-filesystems like /proc, /sys, and /dev are always skipped.
Configuration
~/.config/diskface/config.json holds your saved defaults. Every value can be
overridden by the matching CLI flag. A broken config is backed up and recreated
automatically.
{
"min_size_mb": 100,
"top": 20,
"max_depth": 8,
"tree_depth": 3,
"recursive": true,
"tree_view": true,
"scan_files": false,
"hide_dotfiles": false,
"interactive": true,
"use_excludes": true,
"extra_excludes": []
}
You can also add an optional "temp_paths": [...] array to override what
--clean sweeps.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diskface-1.0.0.tar.gz.
File metadata
- Download URL: diskface-1.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3148435bb18088dbfaa36036fc3ccacec5ca88fc545a56b9462bb20ceb11e4c6
|
|
| MD5 |
f2b84e2bd0d46c1a26b468e2267dc1f6
|
|
| BLAKE2b-256 |
4ddcb36caedd5435bddc2beb776c2797244cc2d2b1e7713a7f7ccd8bb123b451
|
File details
Details for the file diskface-1.0.0-py3-none-any.whl.
File metadata
- Download URL: diskface-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b9384894ca175593c71727b4a7f4d2ed398f6114fde505179abffb5d5f366fe
|
|
| MD5 |
d869d079a6b46fe8b40fc038bf746750
|
|
| BLAKE2b-256 |
982b94215c6c88ca591354714cefc4b1b8ece3144a5686c7695bce4b30b9bf43
|