Skip to content

quantmind-br/get-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

get-lines

A powerful Python tool to analyze code files and count lines in your project. Instantly identify large files that may be candidates for refactoring.

Features

  • πŸ” 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

Installation

Install via pip:

pip install get-lines

Usage

Navigate to your project directory and run:

get-lines

That's it! The tool will:

  1. Scan the current directory and all subdirectories
  2. Find all code files
  3. Count lines in each file
  4. Display a beautiful report sorted by line count (largest first)
  5. Show refactoring candidates and summary statistics

Supported File Types

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...

Example Output

                           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)

Requirements

  • Python 3.7+
  • Rich library (automatically installed with pip)

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages