statsfolder
Scan a folder and get an interactive HTML report: a storage treemap, largest files, file types with per-folder drilldown, duplicate detection, stale-folder analysis, and change tracking between scans. Reports are single offline files — no uploads, no external assets.
Docs: https://statsfolder.readthedocs.io/ · Examples: USAGE.md
Install
Requires Python 3.11+.
pip install statsfolder
Usage
statsfolder ./my-project
Saves my-project-statsfolder-report.html in the current directory and opens it
in your browser (--no-open to skip, -o FILE to pick the path).
# quick stats in the terminal, no report file
statsfolder ./my-project --summary
# find files by pattern, largest first
statsfolder ./Downloads --include "*.exe" --sort size
# skip dependencies and caches
statsfolder . --exclude .git --exclude node_modules --exclude "*cache*/"
# find duplicate files (reads contents, slower)
statsfolder ./my-project --duplicates
# save a baseline, then see what changed later
statsfolder ./my-project --json -o scans/baseline.json
statsfolder ./my-project --compare scans/baseline.json -o changes.html
Exclude patterns can also live in a .statsfolderignore file in the scanned
folder. Patterns are globs or re: regexes, matched against names or relative
paths; a trailing / matches folders only.
The report
- Treemap — drill into folders or file types by size.
- Storage composition — click an extension to rank the folders containing those files, largest first.
- Largest files, age/size buckets, and duplicate sets (with
--duplicates). - Explorer — search, filter, and sort every entry; export any view as CSV.
- Folder timeline and activity — find big folders untouched for 6+ months.
- Comparison — new/removed/changed files, folder growth, and file-type growth against a saved JSON baseline (by size and mtime, not content hashes).
Options
| Option | Description |
|---|---|
-o, --output FILE |
Output path. |
--include PATTERN |
Only matching entries (matching folders include contents); repeatable. |
--exclude PATTERN |
Skip matching entries; repeatable. |
--ignore-file FILE |
Load exclude patterns from a file. |
--sort path|size|modified |
Order for report, JSON, and CSV output. |
--min-size SIZE |
Ignore files below SIZE (e.g. 10KB, 1.5MB). |
--exclude-hidden |
Skip dotfiles and dotfolders. |
-a, --all |
Include entries not owned by you. |
--duplicates |
Hash same-sized files (≥ --min-duplicate-mb, default 1). |
--json / --csv |
Write JSON or CSV inventory instead of HTML. |
--summary |
Print stats to the terminal; write nothing. |
--compare SNAPSHOT |
Diff against a saved JSON scan of the same folder. |
--timestamp |
Timestamp output filenames to keep history. |
--progress / --no-progress |
Toggle scan progress output. |
--streamlit |
Launch the optional dashboard (pip install "statsfolder[streamlit]"). |
statsfolder --help shows the full list with examples.
Python API
from statsfolder import scan, write_report
result = scan("./my-project", exclude=(".git", ".venv"))
print(f"{len(result.files):,} files, {result.total_size:,} bytes")
write_report(result, "reports/project.html")
Also available: render_report(), result.to_dict(), load_snapshot(),
compare_scans(), and a progress= callback for scan().
Notes
- Sizes are logical bytes, not disk usage. Folder totals include subfolders.
- Symlinks are recorded but never followed. Only your own entries are scanned
by default (
--allto widen). - Exit codes:
0complete,1fatal,2partial (unreadable entries warned). - Reports contain paths, sizes, and dates — review before sharing. Only
--duplicatesreads file contents.
License
Copyright (C) 2026 Sermet Pekin. GPL-3.0-or-later — see LICENSE.
Metadata
Release files for statsfolder 0.1.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| statsfolder-0.1.17.tar.gz | 58.4 kB | Without provenance | Details for statsfolder-0.1.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| statsfolder-0.1.17-py3-none-any.whl | Python 3 | none | any | Details for statsfolder-0.1.17-py3-none-any.whl |
Total release size: 106.6 kB
Release files / statsfolder-0.1.17.tar.gz
| Download URL | statsfolder-0.1.17.tar.gz |
|---|---|
| Size | 58.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40d3c5b6e8f8a401437a3f9568d767bf8e2f20ba4fb3d3287386dee91761d090
|
|
BLAKE2b-256 checksum How to use checksums |
d8382caa293c0aec0b3786e778b2601eac713480b509f0099a338405f46b0520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / statsfolder-0.1.17-py3-none-any.whl
| Download URL | statsfolder-0.1.17-py3-none-any.whl |
|---|---|
| Size | 48.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e47bd283214eeec6c58d7bce7307dbd996c9583c7e698bca4198110590aa4fa4
|
|
BLAKE2b-256 checksum How to use checksums |
56c0317e5bc326ca7cdc4660315466fc4161df6e2397397fcd493a083b80b8f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for statsfolder 0.1.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.