{"id":29873131,"url":"https://github.com/inflixop/gitpilot","last_synced_at":"2025-07-30T22:16:08.839Z","repository":{"id":304391201,"uuid":"1018646255","full_name":"InflixOP/GitPilot","owner":"InflixOP","description":"GitPilot is an intelligent AI-powered Git assistant that bridges the gap between natural language and Git commands. It's designed to make Git more accessible and efficient by allowing developers to express their intentions in plain English, while providing context-aware suggestions and safety checks.","archived":false,"fork":false,"pushed_at":"2025-07-22T17:01:32.000Z","size":185,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T19:04:18.953Z","etag":null,"topics":["artificial-intelligence","claude","conflict-resolver","deepseek","gemini-api","gemini-flash","generative-ai","git","git-commands","gitcommands","github","gpt","groq","llama3","natural-language-processing","openai","version-control"],"latest_commit_sha":null,"homepage":"","language":"Python","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/InflixOP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-12T18:01:52.000Z","updated_at":"2025-07-22T17:01:36.000Z","dependencies_parsed_at":"2025-07-12T20:44:56.571Z","dependency_job_id":"84f10b39-d73d-451d-a0a5-5ffacc7545fe","html_url":"https://github.com/InflixOP/GitPilot","commit_stats":null,"previous_names":["inflixop/gitpilot"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/InflixOP/GitPilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InflixOP%2FGitPilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InflixOP%2FGitPilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InflixOP%2FGitPilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InflixOP%2FGitPilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InflixOP","download_url":"https://codeload.github.com/InflixOP/GitPilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InflixOP%2FGitPilot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267951747,"owners_count":24171094,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["artificial-intelligence","claude","conflict-resolver","deepseek","gemini-api","gemini-flash","generative-ai","git","git-commands","gitcommands","github","gpt","groq","llama3","natural-language-processing","openai","version-control"],"created_at":"2025-07-30T22:16:02.605Z","updated_at":"2025-07-30T22:16:08.827Z","avatar_url":"https://github.com/InflixOP.png","language":"Python","readme":"# GitPilot \n\n**GitPilot** is an intelligent AI-powered Git assistant that bridges the gap between natural language and Git commands. It's designed to make Git more accessible and efficient by allowing developers to express their intentions in plain English, while providing context-aware suggestions and safety checks.\n\n## 🌟 Key Features\n\n### 🧠 AI-Powered Command Generation\n- **Natural Language Processing**: Converts plain English requests into precise Git commands\n- **Context-Aware Intelligence**: Analyzes your repository state to provide relevant suggestions\n- **Multi-Model Support**: Choose from multiple AI providers and models:\n  - **Google Gemini**: Gemini 2.0 Flash for fast, accurate responses\n  - **Groq**: Lightning-fast inference with Llama 3.1 8B Instant, Llama 3.3 70B Versatile\n  - **DeepSeek**: Advanced reasoning with R1 Distill Llama 70B\n- **Intelligent Response Parsing**: Enhanced parsing handles various response formats from different AI models\n\n### 🛡️ Safety \u0026 Security\n- **Destructive Operation Detection**: Identifies potentially dangerous commands and requires confirmation\n- **Command Validation**: Prevents command injection and validates Git syntax\n- **Dry-Run Mode**: Preview commands before execution\n- **Context Warnings**: Alerts about uncommitted changes, remote status, and other potential issues\n\n### 📊 Repository Analysis\n- **Branch Status**: Current branch, detached HEAD detection\n- **Working Directory State**: Staged, unstaged, and untracked files\n- **Remote Synchronization**: Ahead/behind status with remote repositories\n- **Stash Management**: Stash count and status\n- **Commit History**: Last commit information and analysis\n\n### 🎯 User Experience\n- **Rich Terminal Interface**: Beautiful, colorized output with progress indicators\n- **Command History**: Track and review previously executed commands\n- **Detailed Explanations**: Optional explanations for generated commands\n- **Interactive Prompts**: Confirmation dialogs for destructive operations\n\n## 🏗️ Architecture\n\nGitPilot is built with a modular architecture:\n\n```\n├── cli.py              # Command-line interface and user interaction\n├── ai_engine.py        # Multi-model AI integration (Gemini, Groq, DeepSeek)\n├── context_analyzer.py # Git repository state analysis\n├── git_executor.py     # Safe Git command execution\n├── logger.py          # Logging and command history\n└── prompts.py         # AI prompt templates\n```\n\n### Core Components\n\n1. **CLI Interface**: Rich terminal interface with colorized output and interactive prompts\n2. **AI Engine**: Multi-provider AI integration supporting:\n   - Google Gemini (gemini-2.0-flash)\n   - Groq (llama-3.1-8b-instant, llama-3.3-70b-versatile)\n   - DeepSeek (deepseek-r1-distill-llama-70b)\n3. **Context Analyzer**: Analyzes Git repository state and provides contextual information\n4. **Git Executor**: Safely executes Git commands with validation and safety checks\n5. **Logger**: Tracks command history and provides debugging information\n\n## 📦 Installation\n\n### Prerequisites\n- Python 3.8 or higher\n- Git installed and configured\n- At least one AI provider API key:\n  - Google Gemini API key (set as `GEMINI_API_KEY` environment variable)\n  - Groq API key (set as `GROQ_API_KEY` environment variable) - for Groq models\n  - Both keys can be used simultaneously for maximum flexibility\n\n### From PyPI (Recommended)\n```bash\npip install gitpilot\n```\n\n### From Source\n```bash\ngit clone https://github.com/InflixOp/gitpilot.git\ncd gitpilot\npip install -e .\n```\n\n### Development Installation\n```bash\ngit clone https://github.com/InflixOp/gitpilot.git\ncd gitpilot\npip install -e .[dev]\n```\n\n## 🎨 VS Code Extension\n\n**GitPilot is also available as a VS Code extension!** Get the same AI-powered Git assistance directly integrated into your favorite editor.\n\n### 🚀 Install from VS Code Marketplace\n\n#### Method 1: VS Code Extensions Tab\n1. Open VS Code\n2. Go to the Extensions view (`Ctrl+Shift+X`)\n3. Search for **\"GitPilot\"**\n4. Click **\"Install\"** on the GitPilot - AI Git Assistant extension\n\n#### Method 2: Direct Link\n**[Install GitPilot Extension](https://marketplace.visualstudio.com/items?itemName=InflixOP.gitpilot)**\n\n#### Method 3: Command Line\n```bash\ncode --install-extension InflixOP.gitpilot\n```\n\n### ✨ VS Code Extension Features\n- **🤖 AI-Powered Panel**: Beautiful integrated sidebar panel\n- **📋 Command Palette Integration**: Access via `Ctrl+Shift+P`\n- **🎯 Context Menu**: Right-click integration in Explorer\n- **⚙️ Settings Integration**: Configure API keys in VS Code settings\n- **🔄 Real-time Repository Status**: Live Git status display\n- **🎨 VS Code Theming**: Matches your VS Code theme perfectly\n\n### 🛠️ VS Code Extension Setup\n1. **Install the extension** (see methods above)\n2. **Configure API keys**:\n   - Go to VS Code Settings (`Ctrl+,`)\n   - Search for \"GitPilot\"\n   - Add your Gemini or Groq API key\n3. **Start using**:\n   - Click the robot icon 🤖 in the Activity Bar\n   - Or use `Ctrl+Shift+P` → \"GitPilot: Execute Command\"\n\n### 💬 VS Code Extension Usage\n```\n\"create a new branch for user authentication\"\n→ git checkout -b feature/user-authentication\n\n\"commit all changes with message 'Add login functionality'\"\n→ git add . \u0026\u0026 git commit -m \"Add login functionality\"\n\n\"show commits from last week\"\n→ git log --since=\"1 week ago\" --oneline\n```\n\n## 🚀 Quick Start\n\n1. **Set up your API keys**:\n   ```bash\n   # For Google Gemini (default)\n   export GEMINI_API_KEY=\"your-gemini-api-key\"\n   \n   # For Groq models (optional)\n   export GROQ_API_KEY=\"your-groq-api-key\"\n   ```\n\n2. **Navigate to a Git repository**:\n   ```bash\n   cd your-git-project\n   ```\n\n3. **Start using GitPilot**:\n   ```bash\n   # Use default model (Gemini)\n   gitpilot \"create a new branch for user authentication\"\n   \n   # Or select a specific model\n   gitpilot --model 2 \"show me the current status\"  # Groq Llama 3.1 8B\n   gitpilot --model 3 \"commit all changes\"          # Groq Llama 3.3 70B\n   ```\n\n## 📋 Usage Examples\n\n### Branch Management\n```bash\n# Create and switch to a new branch\ngitpilot \"create a new branch called feature-auth\"\n\n# Switch to an existing branch\ngitpilot \"switch to main branch\"\n\n# Delete a branch\ngitpilot \"delete the old-feature branch\"\n```\n\n### Commit Operations\n```bash\n# Stage and commit changes\ngitpilot \"commit all changes with message 'Add user authentication'\"\n\n# Undo last commit but keep changes\ngitpilot \"undo last commit but keep the changes\"\n\n# Amend the last commit\ngitpilot \"modify the last commit message\"\n```\n\n### Remote Operations\n```bash\n# Push to remote repository\ngitpilot \"push changes to origin\"\n\n# Pull latest changes\ngitpilot \"pull latest changes from remote\"\n\n# Sync with remote branch\ngitpilot \"sync with remote main branch\"\n```\n\n### Repository Status\n```bash\n# Check repository status\ngitpilot \"show me the current status\"\n\n# View commit history\ngitpilot \"show commits from last week\"\n\n# Check differences\ngitpilot \"show what changed in the last commit\"\n```\n\n## 🔧 Command Line Options\n\n```bash\ngitpilot [OPTIONS] [QUERY]\n```\n\n### Options\n- `--dry-run, -d`: Show what would be executed without running the command\n- `--explain, -e`: Show detailed explanation of the generated command\n- `--yes, -y`: Auto-confirm destructive operations\n- `--history, -h`: Show recent command history\n- `--version`: Show version information\n- `--model, -m`: Select AI model (1: Gemini, 2: Llama 3.1 8B, 3: Llama 3.3 70B, 4: DeepSeek R1)\n- `--skip-model-selection`: Skip interactive model selection and use default\n\n### Examples with Options\n```bash\n# Preview command without execution\ngitpilot \"reset to last commit\" --dry-run\n\n# Get explanation of the command\ngitpilot \"merge feature branch\" --explain\n\n# Auto-confirm destructive operation\ngitpilot \"force push to remote\" --yes\n\n# View command history\ngitpilot --history\n\n# Use specific AI models\ngitpilot --model 2 \"show me recent commits\"        # Groq Llama 3.1 8B\ngitpilot --model 3 \"create a hotfix branch\"         # Groq Llama 3.3 70B\ngitpilot --model 4 \"help me resolve merge conflicts\" # DeepSeek R1\n\n# Skip model selection for automation\ngitpilot --skip-model-selection \"add all files\"\n```\n\n## ⚙️ Configuration\n\n### Configuration File\nCreate a configuration file at `~/.gitpilot/config.yaml`:\n\n```yaml\n# Auto-confirm destructive operations\nauto_confirm: false\n\n# Always show detailed explanations\nexplain_by_default: false\n\n# Logging level (INFO, DEBUG, ERROR)\nlog_level: INFO\n```\n\n### Environment Variables\n- `GEMINI_API_KEY`: Your Google Gemini API key (required for Gemini models)\n- `GROQ_API_KEY`: Your Groq API key (required for Groq models)\n- `GITPILOT_LOG_LEVEL`: Override log level (optional)\n\n## 🔒 Safety Features\n\n### Destructive Command Detection\nGitPilot automatically detects potentially destructive operations:\n- `git reset --hard`: Discards uncommitted changes\n- `git clean -f`: Permanently deletes untracked files\n- `git push --force`: Overwrites remote history\n- `git rebase`: Rewrites commit history\n\n### Context-Aware Warnings\n- **Uncommitted Changes**: Warns before operations that might lose work\n- **Remote Status**: Alerts when branch is behind remote\n- **Detached HEAD**: Notifies about detached HEAD state\n- **Stash Status**: Considers stashed changes in recommendations\n\n## 📊 Dependencies\n\n### Core Dependencies\n- `click\u003e=8.0.0`: Command-line interface framework\n- `rich\u003e=13.0.0`: Rich terminal formatting\n- `google-generativeai\u003e=0.3.0`: Google Gemini AI integration\n- `gitpython\u003e=3.1.0`: Git repository interaction\n- `pyyaml\u003e=6.0.0`: Configuration file parsing\n- `loguru\u003e=0.7.0`: Advanced logging\n\n### Development Dependencies\n- `pytest\u003e=7.0.0`: Testing framework\n- `pytest-cov\u003e=4.0.0`: Coverage reporting\n- `black\u003e=23.0.0`: Code formatting\n- `flake8\u003e=6.0.0`: Code linting\n- `mypy\u003e=1.0.0`: Type checking\n\n## 🧪 Testing\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=gitpilot\n\n# Run specific test file\npytest tests/test_cli.py\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](.github/CONTRIBUTING.md) for details.\n\n### Development Setup\n1. Fork the repository\n2. Create a virtual environment: `python -m venv venv`\n3. Activate it: `source venv/bin/activate` (Linux/Mac) or `venv\\Scripts\\activate` (Windows)\n4. Install dependencies: `pip install -e .[dev]`\n5. Run commands starting with \"gitpilot\"\n\n\n## 🐛 Issue Reporting\n\nFound a bug? Please report it on our [GitHub Issues](https://github.com/InflixOp/GitPilot/issues) page.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finflixop%2Fgitpilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finflixop%2Fgitpilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finflixop%2Fgitpilot/lists"}