Skip to content

Commit 7a2e898

Browse files
committed
MVP version
0 parents  commit 7a2e898

17 files changed

Lines changed: 3189 additions & 0 deletions

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Production builds
8+
dist/
9+
build/
10+
11+
# OS generated files
12+
.DS_Store
13+
.DS_Store?
14+
._*
15+
.Spotlight-V100
16+
.Trashes
17+
ehthumbs.db
18+
Thumbs.db
19+
20+
# IDE files
21+
.vscode/settings.json
22+
.idea/
23+
*.swp
24+
*.swo
25+
26+
# Tauri
27+
src-tauri/target/
28+
src-tauri/Cargo.lock
29+
30+
# Logs
31+
*.log
32+
33+
# Runtime data
34+
pids
35+
*.pid
36+
*.seed
37+
*.pid.lock
38+
39+
# Environment variables
40+
.env
41+
.env.local
42+
.env.development.local
43+
.env.test.local
44+
.env.production.local
45+
46+
# TypeScript
47+
*.tsbuildinfo

.vscode/tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Tauri Dev",
6+
"type": "shell",
7+
"command": "npm",
8+
"args": [
9+
"run",
10+
"tauri",
11+
"dev"
12+
],
13+
"group": "build",
14+
"isBackground": true,
15+
"problemMatcher": []
16+
}
17+
]
18+
}

README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Git Alias Generator</title>
8+
</head>
9+
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)