Skip to content

alex404hm/file-stats-counter

Repository files navigation

File Stats Counter

Analyze your codebase with beautiful, real-time statistics

Visual Studio Marketplace Version License: MIT GitHub

A powerful VS Code extension that provides detailed statistics about your workspace files through an elegant, modern interface. Get instant insights into lines of code, file distributions, and more.

✨ Features

📊 Comprehensive Statistics

  • Total Lines - Complete line count across all 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

🎨 Modern Sidebar Interface

  • 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

⚡ Smart Scanning

  • Excludes dependencies - node_modules, vendor, bower_components, virtual environments
  • Skips build outputs - dist, out, build, target, .next, .nuxt
  • Ignores lock files - package-lock.json, yarn.lock, composer.lock, etc.
  • Skips minified files - .min.js, .min.css, bundled files
  • Fast, efficient directory traversal
  • Graceful error handling for unreadable files
  • Non-blocking background processing

🚀 Getting Started

Installation

  1. Open VS Code
  2. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac) to open Extensions
  3. Search for "File Stats Counter"
  4. Click Install

Usage

Method 1: Sidebar (Recommended)

  1. Click the 📊 chart icon in the Activity Bar (left sidebar)
  2. The File Stats panel opens with live statistics
  3. Click the 🔄 refresh button to update stats anytime

Method 2: Command Palette

  1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Type "Count Lines, Words, Chars"
  3. View results in a notification

📸 Screenshots

Sidebar Statistics View

Beautiful, organized display of your workspace metrics with file type breakdown and largest files.

Quick Stats Card

At-a-glance summary showing total lines, words, characters, and files processed.

⚙️ What Gets Counted

The extension counts only your source code, automatically excluding:

Dependencies & Packages:

  • node_modules, vendor, bower_components
  • Python virtual environments (venv, env, .virtualenv)
  • __pycache__, .pytest_cache

Build Outputs:

  • dist, out, build, target, bin, obj
  • .next, .nuxt, .gradle

Lock & Config Files:

  • package-lock.json, yarn.lock, pnpm-lock.yaml
  • Gemfile.lock, Pipfile.lock, composer.lock

Minified & Bundled Files:

  • .min.js, .min.css
  • .bundle.js, .bundle.css

Version Control:

  • .git, .vscode, .idea

🎯 Use Cases

  • Code Auditing - Understand the size and scope of your projects
  • Project Planning - Estimate project complexity
  • Code Reviews - Quickly assess contribution sizes
  • Documentation - Generate accurate project metrics
  • Learning - Track your coding progress over time

🛠️ Development

Want to contribute or modify the extension?

# Clone the repository
git clone https://github.com/alex404hm/file-stats-counter.git

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Run in development mode
# Press F5 in VS Code to launch Extension Development Host

👨‍💻 About the Developer

Created by Alexander Holm Mortensen - A passionate software developer and tech enthusiast, exploring the world of coding, AI, and creative solutions. I enjoy building tools that make life easier for developers and users alike.

🐛 Known Issues

None at this time. Please report issues on GitHub.

📝 Release Notes

1.0.0 (October 2025)

Initial release with:

  • Modern sidebar interface with custom activity bar icon
  • Real-time statistics for lines, words, and characters
  • File type distribution analysis
  • Largest files detection
  • Beautiful, theme-adaptive UI
  • Command Palette integration
  • Smart folder exclusion

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This extension is licensed under the MIT License.

💡 Feedback

Found a bug or have a feature request? Please open an issue.

Enjoying the extension? Leave a review on the marketplace!


Made with ❤️ by Alexander Holm Mortensen

About

File Stats Counter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published