Skip to main content

A professional Git CLI wrapper with enhanced user experience

Project description

🚀 Git CLI Tool

A professional, user-friendly Git command-line wrapper that makes Git operations intuitive and efficient.

✨ Features

🎯 Core Functionality

  • Interactive Repository Management: Easy repository selection and switching
  • Smart Branch Operations: Create, switch, merge, and delete branches with ease
  • Streamlined File Management: Add files with visual selection
  • Intelligent Commit System: Guided commit creation with optional detailed descriptions
  • Automated Push/Pull: Seamless remote repository synchronization

🛠️ Advanced Features

  • Quick Commit Workflow: One-command add, commit, and push
  • Repository Status Dashboard: Visual representation of repository state
  • Branch Management Suite: Complete branch lifecycle management
  • Configuration System: Persistent settings and preferences
  • Repository History: Recent repositories quick access
  • Auto-initialization: Create new repositories with best practices

🎨 User Experience

  • Colorful Interface: Beautiful terminal output with color coding
  • Error Handling: Comprehensive error messages and recovery
  • Persian/English Support: Full Unicode support for commit messages
  • Keyboard Shortcuts: Efficient navigation and operation
  • Progress Indicators: Visual feedback for long-running operations

📋 Requirements

  • Python 3.7+
  • Git (installed and in PATH)
  • Terminal with color support (recommended)

🔧 Installation

Option 1: Direct Download

# Download the script
curl -O https://raw.githubusercontent.com/AmirHoseinBlue24/git-cli-tool/main/git_cli_tool.py

# Make it executable
chmod +x git_cli_tool.py

# Run directly
python git_cli_tool.py

Option 2: Package Installation

# Clone the repository
git clone https://github.com/AmirHoseinBlue24/git-cli-tool.git
cd git-cli-tool

# Install as package
pip install -e .

# Run from anywhere
gitool

Option 3: System-wide Installation

# Copy to system path
sudo cp git_cli_tool.py /usr/local/bin/gitool
sudo chmod +x /usr/local/bin/gitool

# Run from anywhere
gitool

🚀 Quick Start

  1. Launch the tool:

    python git_cli_tool.py
    
  2. Select or create a repository:

    • Use existing repository
    • Browse recent repositories
    • Initialize new repository
  3. Choose your workflow:

    • Quick commit: Add all files, commit, and push in one go
    • Manual control: Step-by-step file management
    • Branch management: Create and switch branches easily

📖 Usage Guide

🏠 Main Menu Options

Option Description Usage
📊 Show Status Display repository status with visual indicators View modified, added, deleted, and untracked files
📝 Add Files Interactive file selection for staging Choose specific files or add all changes
💾 Commit Changes Create commits with guided prompts Add commit message and optional description
🚀 Push Changes Push commits to remote repository Automatic remote detection and branch pushing
⬇️ Pull Changes Pull latest changes from remote Sync with remote repository
⚡ Quick Commit One-step add, commit, and push Fastest way to save and sync changes

🌿 Branch Management

# The tool provides interactive branch management:
- List all local and remote branches
- Create new branches with automatic switching
- Delete branches with safety confirmations
- Merge branches with conflict detection
- Switch between branches seamlessly

⚙️ Configuration

The tool maintains configuration in ~/.gitool_config.json:

{
  "default_branch": "main",
  "auto_push": false,
  "preferred_repos": [
    "/path/to/your/repo1",
    "/path/to/your/repo2"
  ],
  "commit_template": ""
}

🎯 Common Workflows

📝 Basic Development Workflow

  1. Launch tool and select repository
  2. Check status to see changes
  3. Add files (specific or all)
  4. Commit with descriptive message
  5. Push to remote repository

🔄 Feature Development

  1. Create new feature branch
  2. Make changes and commit regularly
  3. Push feature branch
  4. Merge back to main branch
  5. Delete feature branch

⚡ Quick Updates

  1. Use "Quick Commit" option
  2. Enter commit message
  3. Everything is handled automatically

🎨 Visual Features

Color Coding

  • 🟢 Green: Success messages, current branch, clean files
  • 🔴 Red: Error messages, deleted files
  • 🟡 Yellow: Warning messages, modified files
  • 🔵 Blue: Information messages, branch names
  • 🟣 Purple: Headers and titles
  • 🔷 Cyan: Untracked files, special info

Status Indicators

  • Success operations
  • Error conditions
  • Warning messages
  • Information
  • * Current branch
  • + Added files
  • M Modified files
  • D Deleted files
  • ? Untracked files

🔧 Advanced Configuration

Environment Variables

# Set default configuration
export GITOOL_DEFAULT_BRANCH="main"
export GITOOL_AUTO_PUSH="true"
export GITOOL_EDITOR="nano"

Custom Commit Templates

Create commit templates for consistent messaging:

# In your repository
echo "feat: " > .gitmessage
git config commit.template .gitmessage

🐛 Troubleshooting

Common Issues

Git not found:

# Install Git
sudo apt install git  # Ubuntu/Debian
brew install git       # macOS

Permission denied:

# Make script executable
chmod +x git_cli_tool.py

Python version issues:

# Check Python version
python --version
# Use Python 3 explicitly
python3 git_cli_tool.py

Remote repository issues:

# Check remote configuration
git remote -v
# Add remote if missing
git remote add origin https://github.com/AmirHoseinBlue24/git-cli-tool.git

Error Recovery

  • The tool provides helpful error messages
  • Most operations can be retried
  • Configuration is automatically backed up
  • Safe defaults prevent data loss

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Development Setup

# Clone for development
git clone https://github.com/AmirHoseinBlue24/git-cli-tool.git
cd git-cli-tool

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows

# Install in development mode
pip install -e .

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with Python standard library only
  • Inspired by the need for better Git UX
  • Designed for developers who value efficiency
  • Created with ❤️ by AmirHoseinBlue24

🔗 Links


Made with ❤️ for the developer community

Transform your Git experience from complex to simple, from tedious to efficient.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_cli_tool-1.0.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_cli_tool-1.0.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file git_cli_tool-1.0.0.tar.gz.

File metadata

  • Download URL: git_cli_tool-1.0.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for git_cli_tool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 83d465e240c79e5456b4747376afee4d0d3ea871bff59b76b29db85fcd840e49
MD5 e057a6b431c7ac0aa75b36e9778c6fd7
BLAKE2b-256 a5dc400f6e7ad620e3ca78b316cf81ec206b50c16344415625f28bc16e72e72a

See more details on using hashes here.

File details

Details for the file git_cli_tool-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: git_cli_tool-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for git_cli_tool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46e3c4dacec284faa3bd211e60ccf181f20025c4ac4f2738a67165bb8a45eb3b
MD5 72da2c79469a8bc1f3446e8aba41c3ee
BLAKE2b-256 48b90c62caa384b46419dc7318376bd6ee6022d8b19d99c058cc10451434f2ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page