kodo
A CLI tool for analyzing Git commit statistics with TUI visualization.
Features
- Analyze commit history with date range filtering
- Interactive TUI with bar and line charts
- Split view showing all metrics simultaneously
- Export data in JSON or CSV format
- Filter by branch and file extensions
- Daily, weekly, monthly, and yearly aggregation
- Multi-repository configuration support
Installation
mise (Recommended)
crates.io
From Releases
Download the appropriate binary for your platform from the Releases page.
From Source
Usage
# Analyze all configured repositories (last 7 days, TUI mode)
# Analyze specific repositories by name
# JSON output
# CSV output
# Specify repository path
# Filter by branch
# Filter by file extensions
# Weekly aggregation
# Single metric view (default is split view)
TUI Controls
| Key | Action |
|---|---|
q / Esc |
Quit |
m |
Toggle view mode (Split/Single) |
Tab / → / l |
Next metric (single view) |
Shift+Tab / ← / h |
Previous metric (single view) |
Configuration
Create a config file at ~/.config/kodo/config.json:
CLI Options
| Option | Short | Description | Default |
|---|---|---|---|
--config |
-c |
Path to config file | ~/.config/kodo/config.json |
--repo |
-r |
Repository path | Current directory |
--days |
-d |
Number of days to analyze | 7 |
--output |
-o |
Output format (tui/json/csv) | tui |
--period |
-p |
Aggregation period (daily/weekly/monthly/yearly) | daily |
--branch |
-b |
Branch to analyze | Default branch |
--ext |
File extensions to include (comma-separated) | All files | |
--include-merges |
Include merge commits | false | |
--single-metric |
Show single metric in TUI | false (split view) | |
--repo-name |
Filter repositories by name (comma-separated) | All repos |
Metrics
- Commits: Number of commits
- Additions: Lines added
- Deletions: Lines deleted
- Net Lines: Additions - Deletions (can be negative)
- Files Changed: Number of files modified
Environment Variables
| Variable | Description |
|---|---|
KODO_CONFIG |
Path to config file |
License
MIT License - see LICENSE for details.