gitcliai
v1.2.5
Published
GitAI - AI-powered Git assistant that helps write better commit messages and automate Git workflows
Downloads
7
Maintainers
Readme
🤖 GitAI - AI-Powered Git Assistant
Supercharge your Git workflow with AI! GitAI helps developers write better commit messages, automate branch creation, and maintain consistent Git practices.
🎥 Demo
✨ Features
- AI-Generated Commit Messages: Automatically generate meaningful commit messages from staged changes
- Commit Message Checking: Fix spelling/grammar mistakes in your commit messages
- Smart Branch Creation: Create branches from GitHub issue URLs automatically
- Git Command Passthrough: All standard Git commands work normally
- Multi-Model Support: Choose between GPT-3.5, GPT-4, or Gemini AI models
📦 Installation
Global Installation (Recommended)
npm install -g gitcliaiUsing npx (No Installation)
npx gitcliai <command>Via cURL (Mac/Linux)
curl -sSL https://raw.githubusercontent.com/JASIM0021/gitai/refs/heads/master/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/JASIM0021/gitai/refs/heads/master/install.ps1 | iex🚀 Usage
Fix staged changes with AI-generated message
gitai commit --fix-commitCheck and improve a commit message
gitai commit --spell-check "fix login bugg"Create branch from GitHub issue
gitai checkout -b --issue https://github.com/user/repo/issues/123Regular Git commands
gitai status
gitai push
gitai log --oneline🛠 Commands
| Command | Description | | -------------------- | ------------------------------------------- | | commit --fix-commit (-fc) | Generate commit message from staged changes | | commit --spell-check (-sc) | Improve an existing commit message | | checkout -b --issue (-i) | Create branch from GitHub issue URL | | [any git command] | Pass through to standard Git |
⚙️ Configuration
First run will prompt for:
- AI Model Selection (GPT-3.5, GPT-4, or Gemini)
- API Key for your chosen provider
Credentials are stored securely in:
~/.gitai_config(model preference)~/.gitai_key(API key with restricted permissions)
🧑💻 For Contributors
We welcome contributions! Here's how to get started:
Development Setup
Clone the repo:
git clone https://github.com/JASIM0021/gitai
cd gitaiInstall dependencies:
npm installLink for local development:
npm linkProject Structure
src/
├── main.js # CLI entry point
├── ai/ # AI integration logic
├── config/ # Configuration handlingTesting
npm testPublishing Changes
Update version in package.json
Run:
npm publish📜 License
MIT License © SK Jasimuddin
🙏 Acknowledgements
Inspired by:
- Conventional Commits
- GitLens
- Vs Code
- Cursor
📬 Feedback
Found a bug? Have a feature request?
Open an issue or submit a PR!
⭐ Star the repo if you find this useful!
