Metadata-Version: 2.4
Name: codelines
Version: 0.1.0
Summary: A blazing-fast, parallel Lines of Code counter with Rich terminal UI
Project-URL: Homepage, https://github.com/muneer320/codelines
Project-URL: Repository, https://github.com/muneer320/codelines
Project-URL: Issues, https://github.com/muneer320/codelines/issues
Author-email: Muneer Alam <muneer.alam320@gmail.com>
License: MIT
License-File: LICENSE
Keywords: cli,code-metrics,developer-tools,lines-of-code,loc
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# codelines 🚀

**A blazing-fast, parallel Lines of Code counter with a beautiful terminal UI.**

Count lines of actual code in any project — respects `.gitignore` and `.ignore` files, uses multi-threaded parallel counting, and displays results in rich, interactive tables.

## Features

- ⚡ **Parallel counting** — uses all CPU cores for maximum speed
- 🎨 **Rich terminal UI** — live progress bars, spinners, and formatted tables
- 📁 **Git-aware** — automatically respects `.gitignore` and `.ignore` patterns
- 📊 **Smart stats** — breakdowns by file extension, directory, and root folder
- 🔧 **Flexible output** — table (default), JSON, CSV formats
- 🎯 **Filtering** — include/exclude specific file extensions
- 📏 **Depth control** — limit directory traversal depth

## Installation

```bash
pip install codelines
```

## Quick Start

```bash
# Count lines in current directory
codelines .

# Count lines in a specific directory
codelines ~/my-project

# Output as JSON
codelines . --format json

# Only count Python and JavaScript files
codelines . --include .py .js

# Limit to 3 levels deep
codelines . --max-depth 3
```

## Usage

```
Usage: codelines [OPTIONS] [DIRECTORY]

Options:
  --format [table|json|csv]   Output format (default: table)
  --include EXT [EXT ...]     Only count files with these extensions
  --exclude EXT [EXT ...]     Skip files with these extensions
  --max-depth N              Maximum directory depth to traverse
  --workers N                Number of worker threads (default: CPU count × 2)
  --ignore-file PATH         Additional ignore file to use
  --detail / --no-detail     Show per-file line counts (default: --no-detail)
  --sort-by [ext|dir|lines]  Sort results by (default: lines)
  --top N                    Show top N results (default: 5)
  --version                  Show version and exit
  --help                     Show this message and exit
```

## Example Output

```
                    Summary
┌─────────────────────────┬─────────┐
│ Metric                  │ Value   │
├─────────────────────────┼─────────┤
│ Total Files (counted)   │ 847     │
│ Total Lines (real code) │ 124,532 │
│ Workers                 │ 16      │
│ Skipped Directories     │ 23      │
│ Skipped Files           │ 156     │
└─────────────────────────┴─────────┘

             Top File Types (Actual Code)
┌───────────┬─────────┐
│ Extension │ Lines   │
├───────────┼─────────┤
│ .py       │ 52,341  │
│ .js       │ 28,912  │
│ .ts       │ 18,234  │
│ .css      │ 12,567  │
│ .html     │  8,901  │
└───────────┴─────────┘
```

## License

MIT © Muneer Alam
