xgit 0.2.1

A enhanced AI-powered Git tool
xgit-0.2.1 is not a library.

xgit

An enhanced Git tool built with Rust that provides AI-powered commit messages, interactive branch management, and GitHub PR integration.

Features

  • 🤖 AI-powered commit messages - Generate conventional commit messages using AI
  • 🌿 Interactive branch management - Easy branch switching with a visual picker
  • 📊 Branch statistics with GitHub PR tracking - View branch status, merge state, and associated GitHub PRs
  • 🗑️ Smart branch pruning - Clean up merged branches with safety checks and interactive selection
  • 🔗 GitHub integration - Automatically detect and display pull request information
  • 🚀 Git passthrough - Works seamlessly with existing git workflows

Installation

cargo install xgit

Usage

Interactive Branch Switching

Select and switch between branches interactively:

xgit branch

Branch Statistics & GitHub PR Tracking

View comprehensive branch information including GitHub PR status:

xgit branch --stats

Smart Branch Pruning

Clean up branches that have been merged to main:

# Preview what would be deleted (recommended first)
xgit branch --prune-merged --dry-run

# Interactive deletion - select which branches to remove
xgit branch --prune-merged

AI-Powered Commits

Generate commit messages automatically using AI:

# Stage your changes first
git add .

# Use AI to generate commit message
xgit commit

Git Passthrough

Use any git command through xgit:

xgit status
xgit log
xgit push
# ... any git command

GitHub Integration

xgit automatically detects GitHub repositories and fetches PR information for each branch. Authentication options:

  1. Environment variable: Set GITHUB_TOKEN
  2. Unauthenticated: Works with public repos (rate limited)

Development

  1. Clone the repository:

    git clone https://github.com/LiXuanqi/gitx
    cd xgit
    
  2. Install git hooks (recommended):

    ./scripts/install-hooks.sh
    
  3. Build and test:

    cargo build
    cargo test
    cargo clippy --all-targets -- -D warnings