GitHub Commit Summarizer is a terminal-based user interface (TUI) application for summarizing GitHub commits. It allows users to view, select, and generate formatted summaries of their GitHub commits for a specified date. The application is built using the Bubble Tea framework and integrates with the GitHub CLI (gh) for fetching commit information.
- Select a specific date for commit summarization (defaults to today)
- View commits across multiple repositories
- Interactively select repositories of interest
- Generate and copy formatted summaries of selected commits
- Navigate through repositories using keyboard controls
- Supports clipboard integration for summary copying
- GitHub CLI (gh) must be installed and authenticated
- Terminal with ANSI color support
-
Clone the repository
-
Install dependencies:
go mod tidy
-
Build the application:
go build -o commitsum
-
Run the application:
./commitsum
When you first start the application, you'll be presented with a date input screen:
- The current date is pre-filled by default
- You can edit the date in YYYY-MM-DD format
- Press
Enterto confirm and fetch commits for that date
After selecting a date, use the following keyboard controls to interact with the application:
Space: Toggle repository selectionjor↓: Move cursor downkor↑: Move cursor upEnter: Generate summaryc: Copy summary to clipboardq: Quit application
When you run the application, you will see a list of repositories with today's commits. Use the keyboard controls to navigate and select repositories. Once you have selected the repositories of interest, press Enter to generate a summary. You can then press c to copy the summary to your clipboard.
- Model: Holds the application state, including commits, repository list, cursor position, selection state, and error state.
- getGitHubUser: Retrieves the authenticated GitHub username using the GitHub CLI.
- getCommits: Fetches commits from the GitHub API and groups them by repository.
- generateSummary: Creates a formatted string containing a summary of today's commits from selected repositories.
- generatePlainSummary: Creates a plain text summary of selected repository commits.
- View: Renders the terminal user interface for the commit summary tool.
- Update: Handles UI interactions and keyboard events.
The application uses the lipgloss package for styling the UI elements, including titles, repository names, commit messages, cursor, footer, and checkboxes.
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.