{"id":29086342,"url":"https://github.com/mopemope/git-rovo","last_synced_at":"2025-07-14T22:40:11.191Z","repository":{"id":300493305,"uuid":"1005241456","full_name":"mopemope/git-rovo","owner":"mopemope","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-22T01:44:35.000Z","size":332,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T02:28:35.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mopemope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T23:09:27.000Z","updated_at":"2025-06-22T01:44:37.000Z","dependencies_parsed_at":"2025-06-22T02:28:58.656Z","dependency_job_id":"86373505-2c33-45be-996a-39869eab68de","html_url":"https://github.com/mopemope/git-rovo","commit_stats":null,"previous_names":["mopemope/git-rovo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mopemope/git-rovo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mopemope%2Fgit-rovo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mopemope%2Fgit-rovo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mopemope%2Fgit-rovo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mopemope%2Fgit-rovo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mopemope","download_url":"https://codeload.github.com/mopemope/git-rovo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mopemope%2Fgit-rovo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262352626,"owners_count":23297689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-28T00:06:17.695Z","updated_at":"2025-06-28T00:06:18.261Z","avatar_url":"https://github.com/mopemope.png","language":"Go","readme":"# GIT-ROVO\n\nA TUI-based Git commit assistant with LLM-powered message generation\n\n## Overview\n\n`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.\n\n![Stage view demo](./images/stageview.png)\n\n![Log view demo](./images/logview.png)\n\n![Diff view demo](./images/diffview.png)\n\n![Auto demo](./images/auto.png)\n\n## Key Features\n\n### 🎨 Intuitive TUI Interface\n- Modern terminal UI built with [Bubble Tea](https://github.com/charmbracelet/bubbletea)\n- Inspired by Emacs [magit](https://magit.vc/) and [gitu](https://github.com/altsem/gitu)\n- Rich keyboard shortcuts for efficient operation\n- File organization by sections (staged/unstaged/untracked)\n- Real-time diff display with scrolling and syntax highlighting\n- Multiple view modes: Status, Diff, Log, and Help\n\n### 🤖 LLM-powered Commit Message Generation\n- Analyzes Git diffs and generates appropriate commit messages\n- Full Conventional Commits specification compliance\n- OpenAI GPT integration with multiple model support:\n  - GPT-4o (latest and most capable)\n  - GPT-4o-mini (fast and cost-effective, default)\n  - GPT-4-turbo\n  - GPT-4\n  - GPT-3.5-turbo\n- Multi-language support (English/Japanese)\n- Confidence scoring for generated messages\n- Customizable temperature and token limits\n\n### ⚡ Comprehensive Git Operations\n- Interactive file staging and unstaging\n- Commit history browsing with detailed views\n- Diff viewing with multiple display modes (unified, side-by-side, word-diff)\n- One-command auto-commit workflow\n- **Commit amending** - Modify the last commit with `1` key\n- **File change discarding** - Discard changes with `k` key\n- Comprehensive logging of all Git operations\n- Support for both staged and untracked file diffs\n\n### 🔧 Advanced Configuration\n- TOML-based configuration system\n- Environment variable overrides\n- Customizable key bindings\n- Flexible logging levels and output\n- Theme customization support\n\n## Installation\n\n### Prerequisites\n\n- **Git**: Version 2.0 or higher\n- **Go**: Version 1.24 or higher (for building from source)\n- **OpenAI API Key**: Required for LLM functionality\n\n### From Binary Release\n\n```bash\n# Download the latest release\ncurl -L https://github.com/mopemope/git-rovo/releases/latest/download/git-rovo-linux-amd64.tar.gz | tar xz\nsudo mv git-rovo /usr/local/bin/\n\n# Verify installation\ngit-rovo version\n```\n\n### Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/mopemope/git-rovo.git\ncd git-rovo\n\n# Install dependencies and build\nmake deps\nmake build\n\n# Install to ~/.local/bin/\nmake install\n\n# Verify installation\ngit-rovo version\n```\n\n## Quick Start\n\n### 1. Initialize Configuration\n\n```bash\n# Interactive configuration setup\ngit-rovo config init\n```\n\nThis will prompt you for:\n- OpenAI API Key\n- Preferred language (english/japanese)\n- OpenAI model selection\n- Other preferences\n\n### 2. Set Up OpenAI API Key\n\nGet your API key from [OpenAI Platform](https://platform.openai.com/):\n\n```bash\n# Set environment variable (recommended)\nexport OPENAI_API_KEY=\"sk-proj-xxxxxxxxxxxxxxxx\"\n\n# Or use git-rovo specific variable\nexport GIT_ROVO_OPENAI_API_KEY=\"sk-proj-xxxxxxxxxxxxxxxx\"\n```\n\n### 3. Verify Configuration\n\n```bash\ngit-rovo config show\n```\n\n### 4. Start Using git-rovo\n\n```bash\n# In any Git repository\ncd /path/to/your/git/repository\ngit-rovo\n\n# Or use auto-commit mode\ngit-rovo auto\n```\n\n## Usage Modes\n\n### Interactive TUI Mode (Default)\n\nLaunch the full TUI interface:\n\n```bash\ngit-rovo\n```\n\n**Key Bindings:**\n- `q`, `Ctrl+C`: Quit application\n- `h`: Show help\n- `r`: Refresh current view\n- `s`: Switch to status view\n- `d`: Switch to diff view\n- `l`: Switch to log view\n\n**Status View:**\n- `↑/↓`: Navigate files\n- `Space/Enter`: Toggle file staging\n- `s`: Stage current file\n- `u`: Unstage current file\n- `a`: Stage all files\n- `A`: Unstage all files\n- `g`: Generate commit message\n- `G`: Regenerate commit message\n- `c`: Execute commit\n- `C`: Quick commit (generate + commit)\n- `1`: **Amend last commit** ⭐ *New Feature*\n- `k`: **Discard file changes** ⭐ *New Feature*\n- `R`: Reset current file\n- `Tab`: Toggle section visibility\n\n**Diff View:**\n- `↑/↓`: Scroll content\n- `←/→`: Navigate between files\n- `m`: Cycle diff display modes (unified/side-by-side/word-diff)\n- `n`: Toggle line numbers\n- `w`: Toggle line wrapping\n\n**Log View:**\n- `↑/↓`: Navigate commits\n- `Enter`: Show commit details\n- `d`: Show commit diff\n- `Ctrl+C`: Copy commit hash\n\n### Auto-Commit Mode\n\nAutomatically stage all changes, generate commit message, and commit:\n\n```bash\n# Basic auto-commit\ngit-rovo auto\n\n# Preview what would be done\ngit-rovo auto --dry-run\n```\n\nThis performs:\n1. `git add .` (stage all changes)\n2. Generate commit message with LLM\n3. `git commit -m \"\u003cgenerated message\u003e\"`\n\n## Configuration\n\n### Configuration File Location\n\nDefault: `~/.config/git-rovo/config.toml`\n\n### Configuration Structure\n\n```toml\n[llm]\nprovider = \"openai\"\nlanguage = \"english\"  # or \"japanese\"\n\n[llm.openai]\napi_key = \"your-openai-api-key\"  # Optional if using env vars\nmodel = \"gpt-4o-mini\"  # Default model\ntemperature = 0.7\nmax_tokens = 1000\n\n[git]\nshow_untracked = true\n\n[ui]\ntheme = \"default\"\n\n[ui.key_bindings]\n# Custom key bindings (optional)\n# quit = \"x\"\n# generate_message = \"m\"\n\n[logger]\nlevel = \"info\"  # debug, info, warn, error\nfile_path = \"~/.local/share/git-rovo/git-rovo.log\"\n```\n\n### Environment Variables\n\n- `OPENAI_API_KEY`: OpenAI API key\n- `GIT_ROVO_OPENAI_API_KEY`: git-rovo specific API key (overrides OPENAI_API_KEY)\n- `GIT_ROVO_OPENAI_MODEL`: Override model selection\n- `GIT_ROVO_LANGUAGE`: Override language setting\n- `GIT_ROVO_LOG_LEVEL`: Override log level\n\n### Configuration Commands\n\n```bash\n# Show current configuration\ngit-rovo config show\n\n# Reinitialize configuration\ngit-rovo config init\n\n# Use custom config file\ngit-rovo --config /path/to/config.toml\n```\n\n## Advanced Features\n\n### Commit Amending\n\nModify your last commit easily:\n\n1. Make additional changes to files\n2. Stage the changes (optional)\n3. Press `1` in the TUI to amend the last commit\n4. The tool will use generated message if available, or keep the existing commit message\n\n**Note**: Amending changes the commit hash and rewrites history. Be careful when amending commits that have been pushed to remote repositories.\n\n### File Change Discarding\n\nSafely discard unwanted changes:\n\n1. Navigate to the file you want to discard changes for\n2. Press `k` to discard changes\n3. The tool handles different file states:\n   - **Untracked files**: Completely removed\n   - **Modified files**: Changes reverted to last commit\n   - **Staged files**: Unstaged and changes reverted\n\n**Warning**: This operation cannot be undone. Make sure you want to discard the changes.\n\n### Diff View Modes\n\nCycle through different diff display modes with `m`:\n\n- **Unified**: Traditional unified diff format\n- **Side-by-side**: Split view showing old and new versions\n- **Word-diff**: Highlights changes at word level\n\n## Project Architecture\n\n### Core Components\n\n- **`cmd/git-rovo/`**: Main application entry point and CLI commands\n- **`internal/config/`**: Configuration management (TOML-based)\n- **`internal/git/`**: Git operations wrapper with comprehensive diff support\n- **`internal/llm/`**: LLM provider abstraction with OpenAI implementation\n- **`internal/tui/`**: Terminal user interface components\n- **`internal/logger/`**: Structured logging system\n\n### Technical Stack\n\n- **Language**: Go 1.24\n- **TUI Framework**: [Bubble Tea](https://github.com/charmbracelet/bubbletea)\n- **Styling**: [Lipgloss](https://github.com/charmbracelet/lipgloss)\n- **CLI Framework**: [Cobra](https://github.com/spf13/cobra)\n- **Configuration**: [TOML](https://github.com/BurntSushi/toml)\n- **LLM Integration**: [go-openai](https://github.com/sashabaranov/go-openai)\n\n### Project Statistics\n\n- **Total Go Files**: 34 files (~9,257 lines of code)\n- **Test Files**: 15 files (~4,021 lines of test code)\n- **Test Coverage**: 41.4% overall coverage\n- **Dependencies**: Minimal, well-maintained dependencies\n\n## Development\n\n### Development Setup\n\n```bash\n# Clone and setup\ngit clone https://github.com/mopemope/git-rovo.git\ncd git-rovo\n\n# Install development dependencies\nmake dev-setup\n\n# Run tests\nmake test\n\n# Run with coverage\nmake test-coverage\n\n# Lint code\nmake lint\n\n# Build\nmake build\n```\n\n### Available Make Targets\n\n```bash\nmake help          # Show all available targets\nmake build         # Build the application\nmake test          # Run all tests\nmake test-coverage # Run tests with coverage\nmake lint          # Run linter\nmake clean         # Clean build artifacts\nmake install       # Install to ~/.local/bin/\nmake dev-setup     # Setup development environment\n```\n\n### Testing\n\nThe project includes comprehensive testing:\n\n- **Unit Tests**: Individual component testing\n- **Integration Tests**: End-to-end workflow testing\n- **Mock Providers**: LLM provider testing without API calls\n\n```bash\n# Run all tests\nmake test\n\n# Run specific test package\ngo test ./internal/git/...\n\n# Run with verbose output\ngo test -v ./...\n```\n\n## Troubleshooting\n\n### Common Issues\n\n#### Configuration File Not Found\n```bash\n# Check configuration\ngit-rovo config show\n\n# Recreate configuration\ngit-rovo config init\n```\n\n#### OpenAI API Key Issues\n```bash\n# Verify API key is set\necho $OPENAI_API_KEY\n\n# Check configuration\ngit-rovo config show\n```\n\n#### Not a Git Repository\n```bash\n# Ensure you're in a Git repository\ngit status\n\n# Or specify working directory\ngit-rovo --work-dir /path/to/git/repo\n```\n\n### Debug Mode\n\n```bash\n# Run with debug logging\ngit-rovo --log-level debug\n\n# Check log file\ntail -f ~/.local/share/git-rovo/git-rovo.log\n```\n\n## Contributing\n\nWe welcome contributions! Please see our development setup above.\n\n### Code Style\n\n- Follow Go best practices\n- Add tests for new features\n- Update documentation\n- Run `make lint` before submitting\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by [magit](https://magit.vc/) and [gitu](https://github.com/altsem/gitu)\n- Built with [Bubble Tea](https://github.com/charmbracelet/bubbletea) TUI framework\n- Uses [Conventional Commits](https://www.conventionalcommits.org/) specification\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmopemope%2Fgit-rovo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmopemope%2Fgit-rovo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmopemope%2Fgit-rovo/lists"}