A powerful Python tool to analyze code files and count lines in your project. Instantly identify large files that may be candidates for refactoring.
- 🔍 Comprehensive File Support: Supports all major programming languages and file types
- 📊 Beautiful Terminal Output: Rich, colored tables with clear formatting
- 🚀 Zero Configuration: Just run and get results immediately
- 🔄 Cross-Platform: Works on Windows (PowerShell) and Linux (Bash)
- 📈 Smart Analysis: Identifies refactoring candidates and provides summary statistics
- 🎯 Performance Optimized: Fast scanning even for large codebases
Install via pip:
pip install get-linesNavigate to your project directory and run:
get-linesThat's it! The tool will:
- Scan the current directory and all subdirectories
- Find all code files
- Count lines in each file
- Display a beautiful report sorted by line count (largest first)
- Show refactoring candidates and summary statistics
The tool supports over 80 file extensions including:
- Python:
.py,.pyx,.pyi - JavaScript/TypeScript:
.js,.jsx,.ts,.tsx,.mjs,.cjs - Java:
.java - C/C++:
.c,.cpp,.cc,.cxx,.h,.hpp - C#:
.cs - Go:
.go - Rust:
.rs - PHP:
.php,.php3,.php4,.php5,.phtml - Ruby:
.rb,.rbw - Swift:
.swift - Kotlin:
.kt,.kts - Scala:
.scala,.sc - R:
.r,.R - Shell:
.sh,.bash,.zsh,.fish - Web:
.html,.css,.scss,.sass,.vue,.svelte - Config:
.json,.yaml,.yml,.toml,.xml - And many more...
Code Lines Analysis Report
┌─────────────────────────────────────┬────────┬─────────────────┐
│ File Path │ Lines │ Size Indicator │
├─────────────────────────────────────┼────────┼─────────────────┤
│ src/main/java/Application.java │ 1,547 │ 🔥 Large │
│ frontend/src/components/Dashboard.js│ 892 │ ⚠️ Medium │
│ backend/models/user.py │ 456 │ 📄 Small │
│ utils/helpers.js │ 123 │ 📝 Tiny │
└─────────────────────────────────────┴────────┴─────────────────┘
Summary
Total Files: 47
Total Lines: 12,456
Average Lines per File: 264
Largest File: src/main/java/Application.java (1,547 lines)
🔧 Refactoring Candidates (>500 lines):
• src/main/java/Application.java (1,547 lines)
• frontend/src/components/Dashboard.js (892 lines)
- Python 3.7+
- Rich library (automatically installed with pip)
MIT License