File Stats Counter
Analyze your codebase with beautiful, real-time statistics

A powerful VS Code extension that provides detailed statistics about your workspace files through an elegant, modern interface. Now with intelligent code-only filtering - excludes images, videos, binaries, and other non-code files!
✨ Features
📊 Comprehensive Statistics
- Total Lines - Complete line count across all code files
- Word Count - Total words in your codebase
- Character Count - Every character counted
- File Count - Number of files analyzed
- Total Size - Workspace size in MB
🎯 Smart Code-Only Analysis (NEW!)
- Intelligent File Filtering - Only counts programming and text files
- Excludes Binary Files - Automatically skips images, videos, audio, fonts, executables
- 60+ Language Support - JavaScript, TypeScript, Python, Java, C++, Go, Rust, and more
- Special File Recognition - Includes Makefile, Dockerfile, README, LICENSE, etc.
- Large File Protection - Skips files over 10MB to prevent memory issues
- Dedicated activity bar icon for quick access
- Beautiful, theme-adaptive UI
- Real-time statistics updates
- Interactive cards with smooth animations
📁 File Type Analysis
- Breakdown by file extension
- Visual progress bars showing distribution
- Line counts per file type
- Top 10 most common file types
📄 Largest Files Detection
- Top 5 largest files by line count
- File size information
- Quick file identification
🚀 Getting Started
Installation
- Open VS Code
- Press
Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac) to open Extensions
- Search for "File Stats Counter"
- Click Install
Usage
Method 1: Sidebar (Recommended)
- Click the 📊 chart icon in the Activity Bar (left sidebar)
- The File Stats panel opens with live statistics
- Click the 🔄 refresh button to update stats anytime
Method 2: Command Palette
- Press
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
- Type "Count Lines, Words, Chars"
- View results in a notification
🎯 What Gets Counted
✅ Included Files (Code Only!)
The extension counts only code and text files:
Web Development:
- JavaScript/TypeScript:
.js, .jsx, .ts, .tsx, .mjs, .cjs
- HTML/CSS:
.html, .htm, .css, .scss, .sass, .less
- Frameworks:
.vue, .svelte, .astro
Backend Languages:
- Python:
.py, .pyw, .pyx, .pyi
- Java:
.java
- C#:
.cs, .csx
- Go:
.go
- Rust:
.rs
- Ruby:
.rb
- PHP:
.php, .phtml
- Swift:
.swift
- Kotlin:
.kt, .kts
- Scala:
.scala
- And many more...
C/C++ Family:
.c, .cpp, .h, .hpp, .cc, .cxx, .hxx
- Objective-C:
.m, .mm
Shell & Scripts:
.sh, .bash, .zsh, .fish
.bat, .cmd, .ps1
Data & Config:
.json, .yaml, .yml, .toml, .ini, .xml
Documentation:
.md, .markdown, .rst, .txt, .adoc
Database:
.sql, .mysql, .pgsql, .sqlite
Special Files:
Makefile, Dockerfile, Rakefile, Jenkinsfile
README, LICENSE, CHANGELOG, TODO
.gitignore, .dockerignore, .npmignore
package.json, tsconfig.json, requirements.txt
- And many more configuration files
❌ Excluded Files
Binary & Media Files (NEW!):
- Images:
.png, .jpg, .jpeg, .gif, .bmp, .svg, .ico, .webp, .tiff, .psd
- Videos:
.mp4, .avi, .mov, .wmv, .flv, .mkv, .webm
- Audio:
.mp3, .wav, .flac, .aac, .ogg, .wma, .m4a
- Fonts:
.ttf, .otf, .woff, .woff2, .eot
- Archives:
.zip, .rar, .7z, .tar, .gz, .bz2, .iso
- Executables:
.exe, .dll, .so, .dylib, .app, .deb, .rpm
- Documents:
.pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx
- Compiled:
.pyc, .class, .o, .obj
Dependencies & Build Output:
node_modules, vendor, bower_components
dist, out, build, target, bin, obj
.next, .nuxt, .gradle
- Python environments:
venv, env, .virtualenv, __pycache__
Lock Files:
package-lock.json, yarn.lock, pnpm-lock.yaml
Gemfile.lock, Pipfile.lock, composer.lock
Minified Files:
.min.js, .min.css
.bundle.js, .bundle.css
Version Control:
📊 Statistics Provided
- Total Lines: Count of all lines in your code files
- Total Words: Count of all words across files
- Total Characters: Total character count
- Files Processed: Number of files analyzed
- Total Size: Combined size of all analyzed files
- File Type Breakdown: Statistics grouped by file extension
- Largest Files: Top 5 largest files by line count
- Average Lines per File: Calculated average
⚙️ Technical Details
- Language Support: 60+ programming languages and file types
- Performance: Efficiently handles large codebases with smart filtering
- File Size Limit: Automatically skips files larger than 10MB
- Error Handling: Gracefully handles permission errors and unreadable files
- Memory Efficient: Processes files incrementally to avoid memory issues
🎯 Use Cases
- Project Analysis: Get a quick overview of your codebase size and composition
- Code Reviews: Understand the scope of changes and file distributions
- Portfolio Stats: Showcase your coding metrics
- Team Metrics: Track project growth over time
- Language Distribution: See what languages dominate your workspace
🐛 Known Issues
- Very large files (>10MB) are skipped to prevent memory issues
- Binary files that cannot be read as UTF-8 text are automatically skipped
- Symbolic links are not followed to prevent infinite loops
📝 Changelog
See CHANGELOG.md for detailed release notes.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request on GitHub.
📮 Support
If you encounter any issues or have suggestions:
📄 License
MIT License - see LICENSE file for details.
Enjoy analyzing your code! 🎉
Made with ❤️ by Alexander Holm Mortensen
| |