A TUI-based Git commit assistant with LLM-powered message generation
git-rovo is a terminal user interface (TUI) based Git commit assistant that uses Large Language Models (LLM) to automatically generate Conventional Commits compliant commit messages. It provides an intuitive interface for Git operations without requiring an external editor.
- Modern terminal UI built with Bubble Tea
- Inspired by Emacs magit and gitu
- Rich keyboard shortcuts for efficient operation
- File organization by sections (staged/unstaged/untracked)
- Real-time diff display with scrolling and syntax highlighting
- Multiple view modes: Status, Diff, Log, and Help
- Analyzes Git diffs and generates appropriate commit messages
- Full Conventional Commits specification compliance
- OpenAI GPT integration with multiple model support:
- GPT-4o (latest and most capable)
- GPT-4o-mini (fast and cost-effective, default)
- GPT-4-turbo
- GPT-4
- GPT-3.5-turbo
- Multi-language support (English/Japanese)
- Confidence scoring for generated messages
- Customizable temperature and token limits
- Interactive file staging and unstaging
- Commit history browsing with detailed views
- Diff viewing with multiple display modes (unified, side-by-side, word-diff)
- One-command auto-commit workflow
- Commit amending - Modify the last commit with
1key - File change discarding - Discard changes with
kkey - Comprehensive logging of all Git operations
- Support for both staged and untracked file diffs
- TOML-based configuration system
- Environment variable overrides
- Customizable key bindings
- Flexible logging levels and output
- Theme customization support
- Git: Version 2.0 or higher
- Go: Version 1.24 or higher (for building from source)
- OpenAI API Key: Required for LLM functionality
# Download the latest release
curl -L https://github.com/mopemope/git-rovo/releases/latest/download/git-rovo-linux-amd64.tar.gz | tar xz
sudo mv git-rovo /usr/local/bin/
# Verify installation
git-rovo version# Clone the repository
git clone https://github.com/mopemope/git-rovo.git
cd git-rovo
# Install dependencies and build
make deps
make build
# Install to ~/.local/bin/
make install
# Verify installation
git-rovo version# Interactive configuration setup
git-rovo config initThis will prompt you for:
- OpenAI API Key
- Preferred language (english/japanese)
- OpenAI model selection
- Other preferences
Get your API key from OpenAI Platform:
# Set environment variable (recommended)
export OPENAI_API_KEY="sk-proj-xxxxxxxxxxxxxxxx"
# Or use git-rovo specific variable
export GIT_ROVO_OPENAI_API_KEY="sk-proj-xxxxxxxxxxxxxxxx"git-rovo config show# In any Git repository
cd /path/to/your/git/repository
git-rovo
# Or use auto-commit mode
git-rovo autoLaunch the full TUI interface:
git-rovoKey Bindings:
q,Ctrl+C: Quit applicationh: Show helpr: Refresh current views: Switch to status viewd: Switch to diff viewl: Switch to log view
Status View:
↑/↓: Navigate filesSpace/Enter: Toggle file stagings: Stage current fileu: Unstage current filea: Stage all filesA: Unstage all filesg: Generate commit messageG: Regenerate commit messagec: Execute commitC: Quick commit (generate + commit)1: Amend last commit ⭐ New Featurek: Discard file changes ⭐ New FeatureR: Reset current fileTab: Toggle section visibility
Diff View:
↑/↓: Scroll content←/→: Navigate between filesm: Cycle diff display modes (unified/side-by-side/word-diff)n: Toggle line numbersw: Toggle line wrapping
Log View:
↑/↓: Navigate commitsEnter: Show commit detailsd: Show commit diffCtrl+C: Copy commit hash
Automatically stage all changes, generate commit message, and commit:
# Basic auto-commit
git-rovo auto
# Preview what would be done
git-rovo auto --dry-runThis performs:
git add .(stage all changes)- Generate commit message with LLM
git commit -m "<generated message>"
Default: ~/.config/git-rovo/config.toml
[llm]
provider = "openai"
language = "english" # or "japanese"
[llm.openai]
api_key = "your-openai-api-key" # Optional if using env vars
model = "gpt-4o-mini" # Default model
temperature = 0.7
max_tokens = 1000
[git]
show_untracked = true
[ui]
theme = "default"
[ui.key_bindings]
# Custom key bindings (optional)
# quit = "x"
# generate_message = "m"
[logger]
level = "info" # debug, info, warn, error
file_path = "~/.local/share/git-rovo/git-rovo.log"OPENAI_API_KEY: OpenAI API keyGIT_ROVO_OPENAI_API_KEY: git-rovo specific API key (overrides OPENAI_API_KEY)GIT_ROVO_OPENAI_MODEL: Override model selectionGIT_ROVO_LANGUAGE: Override language settingGIT_ROVO_LOG_LEVEL: Override log level
# Show current configuration
git-rovo config show
# Reinitialize configuration
git-rovo config init
# Use custom config file
git-rovo --config /path/to/config.tomlModify your last commit easily:
- Make additional changes to files
- Stage the changes (optional)
- Press
1in the TUI to amend the last commit - The tool will use generated message if available, or keep the existing commit message
Note: Amending changes the commit hash and rewrites history. Be careful when amending commits that have been pushed to remote repositories.
Safely discard unwanted changes:
- Navigate to the file you want to discard changes for
- Press
kto discard changes - The tool handles different file states:
- Untracked files: Completely removed
- Modified files: Changes reverted to last commit
- Staged files: Unstaged and changes reverted
Warning: This operation cannot be undone. Make sure you want to discard the changes.
Cycle through different diff display modes with m:
- Unified: Traditional unified diff format
- Side-by-side: Split view showing old and new versions
- Word-diff: Highlights changes at word level
cmd/git-rovo/: Main application entry point and CLI commandsinternal/config/: Configuration management (TOML-based)internal/git/: Git operations wrapper with comprehensive diff supportinternal/llm/: LLM provider abstraction with OpenAI implementationinternal/tui/: Terminal user interface componentsinternal/logger/: Structured logging system
- Language: Go 1.24
- TUI Framework: Bubble Tea
- Styling: Lipgloss
- CLI Framework: Cobra
- Configuration: TOML
- LLM Integration: go-openai
- Total Go Files: 34 files (~9,257 lines of code)
- Test Files: 15 files (~4,021 lines of test code)
- Test Coverage: 41.4% overall coverage
- Dependencies: Minimal, well-maintained dependencies
# Clone and setup
git clone https://github.com/mopemope/git-rovo.git
cd git-rovo
# Install development dependencies
make dev-setup
# Run tests
make test
# Run with coverage
make test-coverage
# Lint code
make lint
# Build
make buildmake help # Show all available targets
make build # Build the application
make test # Run all tests
make test-coverage # Run tests with coverage
make lint # Run linter
make clean # Clean build artifacts
make install # Install to ~/.local/bin/
make dev-setup # Setup development environmentThe project includes comprehensive testing:
- Unit Tests: Individual component testing
- Integration Tests: End-to-end workflow testing
- Mock Providers: LLM provider testing without API calls
# Run all tests
make test
# Run specific test package
go test ./internal/git/...
# Run with verbose output
go test -v ./...# Check configuration
git-rovo config show
# Recreate configuration
git-rovo config init# Verify API key is set
echo $OPENAI_API_KEY
# Check configuration
git-rovo config show# Ensure you're in a Git repository
git status
# Or specify working directory
git-rovo --work-dir /path/to/git/repo# Run with debug logging
git-rovo --log-level debug
# Check log file
tail -f ~/.local/share/git-rovo/git-rovo.logWe welcome contributions! Please see our development setup above.
- Follow Go best practices
- Add tests for new features
- Update documentation
- Run
make lintbefore submitting
MIT License - see LICENSE file for details.
- Inspired by magit and gitu
- Built with Bubble Tea TUI framework
- Uses Conventional Commits specification



