File Size ViewerA free, open-source VS Code extension for instantly inspecting file and folder storage sizes right in your editor.
💡 What is File Size Viewer?File Size Viewer is a fast, lightweight, and open-source VS Code extension built to give developers instant visibility into workspace file and folder storage sizes. Instead of freezing your editor UI or forcing you to leave your IDE, File Size Viewer runs non-blocking Node.js Worker Threads in the background to calculate exact physical disk allocations (
🎯 What Problem Does This Solve?Every developer encounters disk space mysteries while coding:
Without this extension, developers must pause their workflow, open a terminal, and run system commands like ⚡ Quick Install
⚡ Features, Architecture & Performance🚀 Off-Thread Background ScanningTraditional extensions scan files on VS Code's main Extension Host thread, causing noticeable editor lag. File Size Viewer offloads all directory traversal to background Node.js Worker Threads ( 📏 Exact Physical Disk Allocation (
|
| Command | Title | Description |
|---|---|---|
fileSizeViewer.refresh |
File Size Viewer: Refresh |
Clears the size cache and forces an immediate background re-scan of the workspace. |
fileSizeViewer.toggle |
File Size Viewer: Toggle |
Focuses the Explorer view sidebar. |
🔒 Privacy & Security
- No Remote Network Requests: The extension makes zero HTTP/HTTPS requests.
- No Telemetry: No tracking, analytics, or user metrics collected.
- Local-Only Processing: All disk operations occur strictly on your local device.
💻 Compatibility
- VS Code Engine:
^1.80.0or higher - Operating Systems: macOS, Windows, Linux
- Architectures: x64, ARM64 (Apple Silicon M1/M2/M3)
🏋️ Performance Considerations
- Large Repositories: For repositories exceeding 200,000 files (like massive monorepos), initial background indexing streams progressively without impacting typing speed.
- Ignored Directories: Adding heavy build outputs (e.g.
dist,build) tofileSizeViewer.excludespeeds up initial background scanning even further.
⚠️ Known Limitations
- Native Explorer Text API: Microsoft's public VS Code Extension API currently restricts inserting custom text directly inline inside native Explorer file tree rows. Therefore, full size strings are provided via hover tooltips, the File Sizes view, and the Status Bar.
🗺️ Roadmap
- [ ] Custom size color thresholds configuration via settings.
- [ ] Export size breakdown report as Markdown / JSON.
- [ ] Visual disk usage pie/treemap breakdown view.
🤝 Contributing
Contributions, issues, and feature requests are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
🛠️ Development & Local Setup
Prerequisites
- Node.js
^18.0.0or higher - npm
^9.0.0or higher
Installation
# Clone the repository
git clone https://github.com/buildwithfiroz/vscode-file-size-viewer.git
# Navigate to project directory
cd vscode-file-size-viewer
# Install dependencies
npm install
# Compile TypeScript
npm run compile
🧪 Testing
Run extension compilation and local development host:
- Open the project folder in VS Code.
- Press
F5to open an Extension Development Host window. - Test hovering over files and viewing the File Sizes sidebar panel.
🐛 Reporting Issues
If you encounter a bug or have a feature suggestion, please open an issue on GitHub: 👉 Report Issue on GitHub
❓ Frequently Asked Questions (FAQ)
Q1: How does File Size Viewer calculate folder sizes without slowing down VS Code?
A: File Size Viewer uses Node.js Worker Threads (worker_threads) to move directory traversal off the main Extension Host thread. Scanning thousands of files happens in the background with zero UI stutter and 0% idle CPU overhead.
Q2: Why does du -sh show 34M while File Size Viewer shows 33.6 MB?
A: du -sh rounds up to the nearest whole integer for quick terminal display (e.g. 33.58 MB $\rightarrow$ 34M). File Size Viewer provides exact decimal precision (33.6 MB), giving you a more accurate representation of your disk space.
Q3: How do I exclude heavy build folders like node_modules or .next?
A: Add your custom glob patterns under "fileSizeViewer.exclude" in your VS Code settings.json. By default, internal .git directories are automatically excluded.
Q4: Is File Size Viewer free, open source, and privacy-friendly?
A: Yes! File Size Viewer is 100% free and open-source under the MIT license. It runs entirely on your local machine and collects zero user data or telemetry.
🔄 Alternatives / When to Use Something Else
- Terminal (
du -sh *): Useful for one-off CLI terminal checks. Use File Size Viewer when you want continuous, automated visibility inside VS Code while coding. - Disk Visualizers (NCurses/DaisyDisk): Useful for full system hard-drive cleanups. Use File Size Viewer for project-level development inspection.
📄 License
Distributed under the MIT License. See LICENSE for details.
👨💻 Author - Contact Information
This project is proudly built and maintained by @buildwithfiroz — focused on making AI tools more accessible, efficient, and developer-friendly.
If you found this useful, consider giving it a ⭐️ on GitHub or contributing to improve it further!
Made with ❤️ by Firoz