|
| 1 | +# Git Alias Generator |
| 2 | + |
| 3 | +A lightweight cross-platform desktop application built with Rust + Tauri that allows users to create and manage Git aliases through a graphical user interface. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +🎯 **Core Functionality** |
| 8 | +- Create custom Git aliases with an intuitive GUI |
| 9 | +- Select from common Git commands with checkboxes: |
| 10 | + - `git add .` - Stage all changes |
| 11 | + - `git commit -m "message"` - Commit with custom or AI-generated messages |
| 12 | + - `git push origin` - Push to remote repository |
| 13 | + - `git checkout <branch>` - Switch branches |
| 14 | + - `git pull` - Pull latest changes |
| 15 | + - Branch cleanup - Remove stale local branches |
| 16 | + |
| 17 | +🤖 **AI Integration** |
| 18 | +- Generate commit messages using OpenAI's API |
| 19 | +- Support for multiple AI models (GPT-3.5, GPT-4, GPT-4o Mini) |
| 20 | +- Configurable API keys and model selection |
| 21 | + |
| 22 | +📋 **Preview & Management** |
| 23 | +- Live preview of generated alias commands |
| 24 | +- Validation for alias names and existing aliases |
| 25 | +- View all existing Git aliases |
| 26 | +- Toast notifications for success/error feedback |
| 27 | + |
| 28 | +🛠️ **Technical Stack** |
| 29 | +- **Backend**: Rust with Tauri for native system integration |
| 30 | +- **Frontend**: React with TypeScript for the user interface |
| 31 | +- **Styling**: Custom CSS with responsive design |
| 32 | +- **Icons**: Lucide React for modern iconography |
| 33 | + |
| 34 | +## Prerequisites |
| 35 | + |
| 36 | +- Node.js (16+ recommended) |
| 37 | +- Rust (latest stable) |
| 38 | +- Git installed and configured |
| 39 | + |
| 40 | +## Installation & Setup |
| 41 | + |
| 42 | +1. **Clone the repository** |
| 43 | + ```bash |
| 44 | + git clone <repository-url> |
| 45 | + cd git-alias-generator |
| 46 | + ``` |
| 47 | + |
| 48 | +2. **Install dependencies** |
| 49 | + ```bash |
| 50 | + npm install |
| 51 | + ``` |
| 52 | + |
| 53 | +3. **Install Tauri CLI** (if not already installed) |
| 54 | + ```bash |
| 55 | + npm install -g @tauri-apps/cli |
| 56 | + ``` |
| 57 | + |
| 58 | +4. **Development mode** |
| 59 | + ```bash |
| 60 | + npm run tauri dev |
| 61 | + ``` |
| 62 | + |
| 63 | +5. **Build for production** |
| 64 | + ```bash |
| 65 | + npm run tauri build |
| 66 | + ``` |
| 67 | + |
| 68 | +## Usage |
| 69 | + |
| 70 | +1. **Launch the application** |
| 71 | + - Run in development mode or install the built application |
| 72 | + |
| 73 | +2. **Configure AI settings** (optional) |
| 74 | + - Click "Show Settings" to configure OpenAI API key |
| 75 | + - Select preferred AI model for commit message generation |
| 76 | + |
| 77 | +3. **Create an alias** |
| 78 | + - Enter a unique alias name (e.g., "save", "sync") |
| 79 | + - Select desired Git commands using checkboxes |
| 80 | + - Configure parameters for each command (commit messages, branch names, etc.) |
| 81 | + - Use "Preview Command" to see the generated alias |
| 82 | + - Click "Create Alias" to save it to your Git configuration |
| 83 | + |
| 84 | +4. **Manage existing aliases** |
| 85 | + - View all existing Git aliases at the bottom of the interface |
| 86 | + - Get warnings when overwriting existing aliases |
| 87 | + |
| 88 | +## Example Aliases |
| 89 | + |
| 90 | +**Quick Save** |
| 91 | +```bash |
| 92 | +git config --global alias.save "!f() { git add .; git commit -m 'WIP'; git push origin; }; f" |
| 93 | +``` |
| 94 | + |
| 95 | +**Smart Commit with AI** |
| 96 | +```bash |
| 97 | +git config --global alias.smart "!f() { git add .; git commit -m '$(ai-generated-message)'; }; f" |
| 98 | +``` |
| 99 | + |
| 100 | +**Branch Cleanup** |
| 101 | +```bash |
| 102 | +git config --global alias.cleanup "!f() { git remote update origin --prune; git branch -vv | grep ': gone]' | grep -v '*' | awk '{print $1; }' | xargs -r git branch -d; }; f" |
| 103 | +``` |
| 104 | + |
| 105 | +## Configuration |
| 106 | + |
| 107 | +The application stores settings locally: |
| 108 | +- OpenAI API key (encrypted) |
| 109 | +- Preferred AI model |
| 110 | +- Application preferences |
| 111 | + |
| 112 | +## Cross-Platform Support |
| 113 | + |
| 114 | +The application supports: |
| 115 | +- Windows (tested on Windows 10/11) |
| 116 | +- macOS (Intel and Apple Silicon) |
| 117 | +- Linux (major distributions) |
| 118 | + |
| 119 | +## Contributing |
| 120 | + |
| 121 | +1. Fork the repository |
| 122 | +2. Create a feature branch |
| 123 | +3. Make your changes |
| 124 | +4. Test thoroughly on your platform |
| 125 | +5. Submit a pull request |
| 126 | + |
| 127 | +## License |
| 128 | + |
| 129 | +[Your chosen license] |
| 130 | + |
| 131 | +## Security Note |
| 132 | + |
| 133 | +- API keys are stored locally and never transmitted except to OpenAI's official endpoints |
| 134 | +- The application only modifies Git configuration files with user consent |
| 135 | +- All Git commands are executed with user permissions |
0 commit comments