Metadata-Version: 2.4
Name: gitlines
Version: 1.0.1
Summary: Analyze git commits with per-file line statistics and running totals
Home-page: https://github.com/saurabhv749/gitlines
Author: Saurabh Verma
Author-email: saurabhv749@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/saurabhv749/gitlines/issues
Project-URL: Documentation, https://github.com/saurabhv749/gitlines#readme
Keywords: git statistics analysis commits lines-of-code
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Version Control
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# gitlines

Analyze git commits with detailed per-file line statistics and running totals. See exactly how your codebase evolved over time!

![Python 3.8+](https://img.shields.io/badge/python-3.8%2B-blue)
![License MIT](https://img.shields.io/badge/license-MIT-green)
![PyPI](https://img.shields.io/badge/pypi-git--stats-blue)

## Features

- 📊 **Detailed commit analysis**: Insertions, deletions, and total lines per commit
- 📈 **Running totals**: Track how file line counts evolved over time
- 🎨 **Beautiful terminal output**: Color-coded statistics for easy scanning
- 📁 **Per-file breakdown**: See which files changed the most in each commit
- 🏆 **Summary statistics**: Top files by line count with visual progress bars
- 🔄 **Chronological order**: Commits processed from oldest to newest
- 🚫 **Smart color handling**: Disables colors when output is piped

## Installation

### Via pip (recommended)
```bash
pip install gitlines
```

### Manual installation
```bash
git clone https://github.com/saurabhv749/gitlines.git
cd gitlines
pip install -e .
```

## Usage

Navigate to any git repository and run:

```bash
gitlines
```

This will output a detailed analysis of every commit, including:
- Commit hash and date
- Total insertions and deletions
- Running total of lines in repository
- Per-file breakdown for each commit
- Summary statistics and top files

## Example Output
![screenshot-1](./assets/gitlines.jpg)
![screenshot-2](./assets/gitlines-results.jpg)

## How it works

1. Fetches all commits in chronological order (oldest → newest)
2. For each commit:
   - Gets file-level insertions and deletions using `git show --numstat`
   - Updates running total for each file
   - Displays statistics with color-coded output
3. Shows final summary with top files by line count

## Requirements

- Python 3.8+
- Git (installed and in PATH)
- Any operating system: macOS, Linux, Windows

## Options

Currently `gitlines` has no command-line flags. Run it from any directory inside a git repository.

Future versions may support:
- `--no-color` - Disable colored output
- `--json` - Output as JSON
- `--since <date>` - Analyze commits since specific date
- `--until <date>` - Analyze commits until specific date

## Contributing

Contributions are welcome! Please feel free to submit a pull request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Author

Created with ❤️ for developers who want to understand their codebases better.

## Changelog

### v1.0.0 (2024-01-15)
- Initial release
- Commit analysis with per-file statistics
- Color-coded terminal output
- Running line count tracking
