# Locoti
Locoti is a fork of [Locot](https://github.com/vacekj/locot). A simple utility for tracking lines of code over time in a Git repository. Outputs CSV for visualization and analysis.
## Performance
- Opens the target repository directly instead of cloning into a temporary checkout
- Reads Git trees/blobs directly instead of checking out every commit to disk
- Caches tree-level and blob-level line stats so repeated content is not re-parsed
- Provides a 10x speed up on large Git histories
## Install
From crates.io:
```bash
cargo install locoti
```
From this repository:
```bash
cargo install --path .
```
## Usage
Analyze the current repository and save the results:
```bash
locoti > results.csv
```
Analyze a specific repository path:
```bash
locoti /path/to/repo > results.csv
```
### CLI options
| `<PATH>` | Path to the repository to analyze (default: `.`) |
| `-f`, `--format <FORMAT>` | Output format (currently `csv`) |
| `-h`, `--help` | Print help |
| `-V`, `--version` | Print version |
## Output format
The CSV contains:
- `Commit`: commit hash
- `Time`: commit timestamp (UTC, RFC 3339 format)
- `Total`: total lines counted at that commit
- Language columns: one column per language with non-zero lines in at least one commit
### Example output
| b9d3f2b3ecc975870cdf9efc714ed441c81caed2 | 2023-05-11T14:11:12Z | 2 | 2 | 0 | 0 |
| 88ab06991a322fe6a731700c255b1a0b0ba5bddb | 2023-05-11T14:15:32Z | 7 | 7 | 0 | 0 |
| fa8e52ae130e1e47e5ec71ff84ec9b3f7d3aa48f | 2023-05-17T12:58:42Z | 76 | 2 | 63 | 11 |
| eb430bb6e3006974e42b67e8603fce10a6c10812 | 2023-05-17T13:02:03Z | 86 | 2 | 73 | 11 |
| 46c56a4a92310242ad17d245db4932f00f726e4a | 2023-05-17T13:03:08Z | 83 | 2 | 70 | 11 |
## License
GNU GPL v3