A smart CLI tool that provides intelligent recommendations and helps solve merge conflicts
Project description
Fancy Git
A smart CLI tool that provides intelligent recommendations and helps solve merge conflicts by analyzing git command outputs.
Overview
FancyGit is a CLI wrapper around git commands that:
- Runs git commands and captures their output
- Detects warnings and errors in real-time
- Provides user confirmation for clean operations
- Prepares for AI-powered recommendations (future phase)
Current Implementation (Phase 1)
โ Features Implemented
- CLI Interface:
fancygitcommand works system-wide - Enhanced Git Commands: Support for 50+ git commands with intelligent error detection
- AI-Powered Analysis: Ollama integration for intelligent error analysis and recommendations
- Repository Insights: Generate statistics and visualize repository structure
- Warning/Error Detection: Regex-based pattern matching for common git issues
- User Confirmation: Prompts for confirmation when no issues detected
- Colored Output: Configurable colorized terminal output
- Cross-platform: Works on macOS, Linux, and Windows
๐ Detection Patterns
Error Patterns:
error:,fatal:,failed,rejectedconflict,merge conflict,unable to
Warning Patterns:
warning:,WARNING:,behind,ahead,diverged
Installation
Quick Setup
Run the automated cross-platform launcher script:
python3 launcher.py
This script will:
- Automatically detect your operating system (Linux, macOS, or Windows)
- Run the appropriate installation script for your system
- Check Python 3.6+ and Git installation
- Make fancygit.py executable
- Create system-wide symlink (Unix-like systems) or add to PATH (Windows)
- Test the installation
Usage
Standard Git Commands (Enhanced)
# Add files
fancygit add .
fancygit add filename.txt
# Commit changes
fancygit commit -m "Your commit message"
fancygit commit --amend
# Push to remote
fancygit push origin main
# Pull from remote
fancygit pull origin main
# With additional arguments
fancygit push origin main --force-with-lease
fancygit pull origin main --rebase
๐ Exclusive FancyGit Commands
These commands are unique to FancyGit and not available in standard git:
Configuration & Settings
# Toggle confirmation prompts for clean operations
fancygit confirmation [on|off|toggle|status]
# Enable/disable colored output
fancygit colors [on|off|toggle|status]
# Show welcome message
fancygit welcome
AI-Powered Analysis
# AI error analysis (requires Ollama)
fancygit ai [on|off|toggle|status]
fancygit ai models # List available AI models
fancygit ai model=<model_name> # Switch to specific AI model
fancygit ai animation=<type> # Set loading animation (run|dots|progress|matrix|brain)
Repository Insights
# Generate repository statistics and insights
fancygit insights [--days=N] [--format=console|json] [--output=filename]
# Visualize repository structure as Mermaid diagram
fancygit visualize [directory] [--max-commits=N] [--no-open]
How It Works
- Command Execution: Runs the actual git command
- Output Analysis: Scans stdout/stderr for warning/error patterns
- User Feedback:
- If issues detected: Shows detailed error/warning messages
- If no issues: Prompts for confirmation with "enter 'y' to run the command"
- Action: Executes or cancels based on user input
Example Output
No Issues:
Running: git push origin main
โ
No warnings or errors detected
No warning messages - enter 'y' to run the command: y
Command executed successfully!
Issues Detected:
Running: git pull origin main
โ Errors detected:
error: couldn't find remote ref refs/heads/main
Architecture
FancyGit CLI โ Git Commands โ Collect Output โ Pattern Matching โ User Interface (CLI)
Current Status
โ Completed Features
- Phase 1: CLI wrapper with intelligent error detection โ
- Phase 2: AI-powered analysis and recommendations โ
- Repository Insights: Statistics and visualization โ
๐ง Future Enhancements
- Phase 3: Automatic conflict resolution suggestions
- Enhanced AI model integration
- Integration with more Git workflows
- Web-based repository visualization
File Structure
Fancy_Git/
โโโ fancygit.py # Main CLI application
โโโ launcher.py # Cross-platform launcher script
โโโ welcome.py # Welcome message display
โโโ README.md # This file
โโโ requirements.txt # Python dependencies
โโโ requirements-dev.txt # Development dependencies
โโโ setup.py # Package setup configuration
โโโ Makefile # Build automation
โโโ pytest.ini # Test configuration
โโโ .gitignore # Git ignore patterns
โโโ .fancygit_config # FancyGit configuration file
โโโ VERSION # Version information
โโโ command-list.txt # Available commands list
โโโ images/ # Images and documentation
โ โโโ overview.png # Project overview image
โโโ scripts/ # Utility scripts
โ โโโ send_email_notification.py
โโโ src/ # Source modules
โ โโโ __init__.py
โ โโโ colors.py
โ โโโ git_error.py
โ โโโ git_error_parser.py
โ โโโ git_insights.py
โ โโโ git_runner.py
โ โโโ ollama_client.py
โ โโโ output_colorizer.py
โ โโโ repo_visualizer.py
โโโ tests/ # Test suite
โ โโโ __init__.py
โ โโโ conftest.py
โ โโโ test_conflict_parser.py
โ โโโ test_conflict_parser_integration.py
โ โโโ test_git_error.py
โ โโโ test_git_insights.py
โ โโโ test_repo_state.py
โ โโโ test_repo_visualizer.py
โโโ htmlcov/ # Test coverage reports
โโโ .github/ # GitHub workflows
โ โโโ workflows/
โ โโโ ci-cd.yml
โโโ .git/ # Git repository
Requirements
- Python 3.6+
- Git installed and configured
- System permissions for symlink creation
- Optional for AI features: Ollama installed and running for AI analysis
- Dependencies: See
requirements.txtfor package list
License
Copyright ยฉ 2026 Youssif Ashmawy and Omar Ossama
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fancygit-1.0.19.tar.gz.
File metadata
- Download URL: fancygit-1.0.19.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a000d196661a9d11cc73e6feb0e2d28aceb2f1e6d6ae7a7896e5ab8e3c76820
|
|
| MD5 |
3e2cd1d76ece9cf85ae9d85ba763cd0d
|
|
| BLAKE2b-256 |
a8a563e157efc3a9468c8a4e62265563573b1ad0f6a7e2b7d73c505933bcb893
|
File details
Details for the file fancygit-1.0.19-py3-none-any.whl.
File metadata
- Download URL: fancygit-1.0.19-py3-none-any.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33ca7de771e5a24db45fcd6191b5dcec4bf963c6e5cd429469dd99404fe89eb5
|
|
| MD5 |
a210febe57418f7b7ccbb9acd5ccbb53
|
|
| BLAKE2b-256 |
5f6e02045a941eae8f5aeab84ad2a468a2252f7511688cf768c3a07556355198
|