Skip to main content

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 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 (--all to widen).
  • Exit codes: 0 complete, 1 fatal, 2 partial (unreadable entries warned).
  • Reports contain paths, sizes, and dates — review before sharing. Only --duplicates reads file contents.

License

Copyright (C) 2026 Sermet Pekin. GPL-3.0-or-later — see LICENSE.

Metadata

Release files for statsfolder 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsfolder 0.1.18
File Size Uploaded Provenance Actions
statsfolder-0.1.18.tar.gz 59.7 kB Without provenance Details for statsfolder-0.1.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for statsfolder 0.1.18
File Interpreter ABI Platform Actions
statsfolder-0.1.18-py3-none-any.whl Python 3 none any Details for statsfolder-0.1.18-py3-none-any.whl

Total release size: 109.0 kB

Release files / statsfolder-0.1.18.tar.gz

Download URL statsfolder-0.1.18.tar.gz
Size 59.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bb828647a7399c9dcf59dad6f097a935a61d499cd3984aeef34ed4e609318147
BLAKE2b-256 checksum
How to use checksums
084ac8fc0487d88fcf3ce7010bcb4f509f8441ba97335ee18c0cf16a06f1b5a5
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.18-py3-none-any.whl

Download URL statsfolder-0.1.18-py3-none-any.whl
Size 49.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10451b9bce0f0a454f6d8346c719931e80dd3eabb96f0eb835485aa1146c0767
BLAKE2b-256 checksum
How to use checksums
644bab780763db6eaffde4b5d0768f51bbcaa25ce16b130213ee588f11d0d350
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.18

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page