Ruby gem to scan file trees from the terminal and generate a fully offline interactive HTML report with the items that consume the most disk space.
- Recursively scans a directory.
- Computes cumulative size per directory and size per file.
- Generates an HTML report with:
- Expand/collapse file tree.
- Text and minimum-size filters.
- Ranking of the largest files.
- No external dependencies (works offline).
ruby bin/file-tree-visualizer /path/to/scan -o report.htmlGem page: https://rubygems.org/gems/file_tree_visualizer
gem install file_tree_visualizer
file-tree-visualizer /path/to/scan -o report.htmlInstall a specific version:
gem install file_tree_visualizer -v 0.2.1bundle install
gem build file_tree_visualizer.gemspec
gem install ./file_tree_visualizer-0.2.1.gem
file-tree-visualizer /path/to/scan -o report.htmlfile-tree-visualizer [path] [options]
If no `path` is provided, the current directory is scanned by default.
During scanning, an interactive terminal shows a progress bar with processed files/directories vs discovered totals.
-o, --output FILE Output HTML file (default: file-tree-report.html)
-t, --top N Number of largest files to keep in ranking (default: 200)
--follow-symlinks Follow symbolic links
--no-progress Disable progress bar
--exclude PATTERNS Exclude patterns (comma-separated or repeated)
--summary Print summary to terminal
--json FILE Export full result as JSON
--csv FILE Export top files as CSV
--lang LANG Language for CLI and report (en|es)
-v, --version Print version
-h, --help Show help
Language resolution priority:
- `--lang`
- `LANG` environment variable (for example `es_CL.UTF-8`)
- fallback to English (`en`)Print current gem version:
file-tree-visualizer --versionSummary only (no HTML file generated unless --output is explicitly provided):
file-tree-visualizer --summarySummary + HTML report:
file-tree-visualizer . --summary --output report.htmlExclude directories and files by pattern:
file-tree-visualizer . --exclude "node_modules,.git,*.log" --exclude "tmp/**"Export JSON and CSV in one run:
file-tree-visualizer . --summary --json scan.json --csv top-files.csv- Create a feature branch from
main. - Implement your change and run tests locally.
- Push your branch and open a Pull Request.
- Wait for CI to pass and at least one approval.
git checkout -b feat/short-description
bundle exec rake test
git push origin feat/short-descriptionBranch policy:
- For collaborators,
mainis protected and requires PR + CI + approval. - Repository admins can bypass these rules when needed.
- This repository publishes the gem automatically when pushing a tag with format
v*(for examplev0.2.1). - Before using it, configure the
RUBYGEMS_API_KEYsecret in GitHub Actions. - You can also trigger the workflow manually from GitHub Actions (
workflow_dispatch).
git tag v0.2.1
git push origin v0.2.1Reusable release notes template:
gh release create v0.2.1 --title "v0.2.1" --notes-file .github/release-template.md