A lightweight Visual Studio Code extension that automatically indexes your workspace on startup and displays code statistics per file type in the status bar.
- Counts total lines of code (LOC) per file type
- Shows minimum, maximum, and average LOC per file
- Shows minimum, maximum, and average file size (bytes)
- Excludes files matched by
.gitignore, hidden files, symlinks, and common binary formats - Runs automatically when a workspace opens—no manual trigger required
- Quick summary in the VS Code status bar, with a detailed tooltip and an output panel via the
Show Code Statisticscommand
Method 1: From GitHub Releases (Recommended)
- Go to the Releases page
- Download the latest
.vsixfile - In VS Code, go to Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Click the "..." menu and select "Install from VSIX..."
- Select the downloaded
.vsixfile
Method 2: From VS Code Marketplace (if published)
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+XorCmd+Shift+X) - Search for "Repository Code Statistics"
- Click Install
-
Clone the repository.
-
Run
npm installto install dependencies. -
Build the extension:
npm run compile
-
Launch for testing:
code .Press F5 to open a new Extension Development Host.
See RELEASE_GUIDE.md for detailed instructions on creating releases.
Open any workspace folder. After the initial scan, the status bar displays something like:
Repo Stats: 128 files, 42 367 lines
- Hover the item for a Markdown table with detailed per‑type stats.
- Click the item or run
Show Code Statisticsfrom the Command Palette to open the full report in an output panel.
- Source TypeScript lives in
src/; compiled JavaScript inout/. - Update metadata in
package.jsonbefore publishing. - Pull requests are welcome!
MIT