Skip to content

DementevVV/commitsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š GitHub Commit Summarizer

SSH Notification Mascot

Go Version License Platform

Commitsum turns your GitHub commits into a clean, shareable summary in seconds. It’s a beautiful Go-powered CLI with a modern Bubble Tea TUI, plus local caching and detailed logs so you can move fast and troubleshoot quickly.

🎬 Demo

See the complete keyboard-driven flow: date selection β†’ repo selection/filtering β†’ summary β†’ export.

Commitsum Demo


✨ Features

  • πŸ“… Flexible date selection β€” Today, yesterday, last week, last month, or custom date
  • πŸ” Repository filtering β€” Filter repos by pattern (e.g., *project* or org/*)
  • 🎯 Multi-repository support β€” See all your commits across different repositories
  • βœ… Smart selection β€” Select all, none, or individual repositories
  • πŸ“‹ One-click copy β€” Cross-platform clipboard support (macOS, Linux, Windows)
  • πŸ“€ Multiple export formats β€” Export to Text, Markdown, or JSON
  • πŸ“Š Commit statistics β€” Visualize commits per repository with charts
  • πŸ—‚οΈ Local caching β€” Speeds up repeated queries with a short-lived cache
  • 🧾 Logs for debugging β€” Daily log files stored locally
  • βš™οΈ Configuration file β€” Optional. You can create ~/.config/commitsum/config.json manually to set defaults
  • 🎨 Modern terminal UI β€” Beautiful interface with soft purple gradient theme
  • ⌨️ Keyboard navigation β€” Efficient keyboard-driven workflow

πŸš€ Quick Start

Prerequisites

  • Go
  • GitHub CLI (gh) must be installed and authenticated
  • Terminal with ANSI color support

Installation

Option 1: Download a prebuilt binary

Download the appropriate archive for your OS/CPU from the GitHub Releases page and extract it:

https://github.com/DementevVV/commitsum/releases

Option 1b: One-line install (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/DementevVV/commitsum/master/install.sh | sh

Option 1c: One-line install (Windows PowerShell)

irm https://raw.githubusercontent.com/DementevVV/commitsum/master/install.ps1 | iex

Option 2: Build from source

# Clone the repository
git clone https://github.com/DementevVV/commitsum.git
cd commitsum

# Install dependencies
go mod tidy

# Build the binary
go build -o commitsum ./cmd/commitsum

# Run the application
./commitsum

Alternative: Direct build and run

go run ./cmd/commitsum

First Run

  1. Select time range β€” Choose from presets or enter custom date
    • Today, Yesterday, Last 7 days, Last 30 days
    • Or enter a custom date (YYYY-MM-DD format)
  2. Review commits β€” Browse your commits across all repositories
  3. Filter repositories β€” Press f to filter by pattern (optional)
  4. Select repositories β€” Use space to toggle, a for all, n for none
  5. Generate summary β€” Press Enter to view the formatted summary
  6. Export or copy β€” Press c to copy, e to export to file

That's it! You now have a beautiful summary of your day's work.

πŸ“– Usage

Date Range Selection

Key Action
j or ↓ Move cursor down
k or ↑ Move cursor up
enter Select date range
esc Quit application
q Quit application

Repository Selection

Key Action
space Select/unselect repository
a Select all repositories
n Deselect all
f or / Filter by pattern
s Show statistics
r Change date range
j or ↓ Move cursor down
k or ↑ Move cursor up
enter Show summary
q Quit application

Summary Screen

Key Action
c Copy to clipboard
e Export to file
s Show statistics
b Back to selection
esc Back to selection
q Quit application

Export Screen

Key Action
enter Save to file
c Copy in selected format
b Back to summary
esc Back to summary
q Quit application

πŸ“‹ Export Formats

Text Format (.txt)

Commit Summary - 2026-02-02

[username/project-one]
  - Add new feature for user authentication
  - Fix bug in login flow

---
Statistics: 5 commits across 2 repositories
Most active: username/project-one (3 commits)

Markdown Format (.md)

# Commit Summary

**Date:** 2026-02-02

## Statistics

- **Total Commits:** 5
- **Repositories:** 2
- **Most Active:** username/project-one (3 commits)

## Commits

### username/project-one

- Add new feature for user authentication
- Fix bug in login flow

---

_Generated by commitsum on 2026-02-02 09:41:12_

JSON Format (.json)

{
  "date": "2026-02-02",
  "total_repos": 2,
  "total_commits": 5,
  "commits": {
    "username/project-one": [
      { "repository": "username/project-one", "message": "Add new feature" }
    ]
  },
  "stats": {
    "total_commits": 5,
    "total_repositories": 2,
    "most_active_repo": "username/project-one",
    "max_commits": 3,
    "commits_per_repo": { "username/project-one": 3 }
  },
  "generated_at": "2026-02-02T09:41:12Z"
}

βš™οΈ Configuration

Configuration is optional and is read from ~/.config/commitsum/config.json if the file exists. You can create it manually:

{
  "default_date_range": "today",
  "repo_filter": "",
  "output_format": "text",
  "custom_template": "",
  "auto_copy": false,
  "show_stats": true
}
Option Description
default_date_range Default preset: today, yesterday, week, month (reserved for UI)
repo_filter Default repository filter pattern (pre-fills the filter input)
output_format Default export format: text, markdown, json (reserved for export UI)
custom_template Custom template for exports (use case available, UI pending)
auto_copy Automatically copy summary to clipboard (reserved for UI)
show_stats Show statistics in summaries (reserved for UI)

πŸ”§ Development

Building from Source

# Build for current platform
go build -o commitsum ./cmd/commitsum

# Build for all platforms
GOOS=linux GOARCH=amd64 go build -o commitsum-linux-amd64 ./cmd/commitsum
GOOS=darwin GOARCH=amd64 go build -o commitsum-darwin-amd64 ./cmd/commitsum
GOOS=darwin GOARCH=arm64 go build -o commitsum-darwin-arm64 ./cmd/commitsum

Project Structure

commitsum/
β”œβ”€β”€ cmd/
β”‚   └── commitsum/         # Application entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ domain/            # Entities and domain contracts
β”‚   β”œβ”€β”€ infrastructure/    # GitHub client, config, cache, clipboard, logger
β”‚   β”œβ”€β”€ ui/                # Bubble Tea UI state, views, and styles
β”‚   └── usecase/           # Business logic (commits + export)
β”œβ”€β”€ docs/                  # Images and docs assets
β”œβ”€β”€ go.mod                 # Go dependencies
β”œβ”€β”€ go.sum                 # Dependency checksums
β”œβ”€β”€ Makefile               # Build automation
β”œβ”€β”€ README.md              # This file
└── LICENSE                # MIT License

πŸ” How It Works

  1. GitHub CLI Integration β€” Uses gh CLI to authenticate and fetch commit data
  2. GitHub Search API β€” Queries commits by author and date using GitHub's search API (up to 1000 results)
  3. Local Cache β€” Stores short-lived results in ~/.config/commitsum/cache for faster repeat runs
  4. Interactive UI β€” Bubble Tea framework provides the terminal user interface
  5. Lipgloss Styling β€” Modern terminal styling with soft purple/violet gradient theme
  6. Logs β€” Writes daily logs to ~/.config/commitsum/logs

πŸ› οΈ Troubleshooting

GitHub CLI not authenticated

# Login to GitHub CLI
gh auth login

No commits found

  • Ensure you have commits on the selected date
  • Verify GitHub CLI has access to your repositories
  • Check that your commits are authored with the correct GitHub email

Date format errors

  • Use the format YYYY-MM-DD (e.g., 2026-02-02)
  • Year must be 4 digits, month and day must be 2 digits

Clipboard not working (Linux)

  • Install one of: xclip, xsel, or wl-copy

Need more details

  • Logs are written to ~/.config/commitsum/logs
  • Set DEBUG=1 to also print logs to stderr

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/commitsum.git
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Make your changes and test thoroughly
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Please ensure your code:

  • Follows Go best practices and conventions
  • Includes comments for exported functions
  • Is properly formatted with gofmt

πŸ“„ License

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

πŸ™ Acknowledgments

  • Bubble Tea β€” The TUI framework powering the interface
  • Lip Gloss β€” Terminal styling and layout
  • Bubbles β€” Reusable TUI components (textinput)
  • GitHub CLI β€” GitHub integration and authentication

πŸ“ž Support

If you have any questions or issues, please:

  1. Check existing Issues
  2. Create a new issue with details (OS, Go version, error messages)
  3. Provide steps to reproduce any problems

πŸš€ Future Enhancements

  • Cross-platform clipboard support (Linux, Windows)
  • Export summaries to file (Markdown, JSON)
  • Date range selection (e.g., last week, last month)
  • Filter commits by repository pattern
  • Commit statistics and visualization
  • Configuration file support
  • Template-based exports (use case available, UI pending)
  • Git integration (local repository commits)
  • Multiple GitHub accounts support
  • Interactive commit message editing
  • Slack/Discord integration
  • Daily/weekly digest scheduling

Made with ❀️ by DementevVV

About

An interactive terminal TUI for exploring and summarizing GitHub commits. Built in Go with Bubble Tea and GitHub CLI, featuring multi-repo support, filtering, statistics, and export to text, Markdown, or JSON.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors