autosync-git
v2.0.2
Published
Automatically commit your code with AI-generated commit messages.
Maintainers
Readme
AutoSync Git
Automatically commit your code with AI-generated commit messages.
AutoSync Git watches your project files, stages changes, generates intelligent commit messages using AI, and creates commits automatically — keeping your Git history clean and organized.
Features
- AI-Generated Commit Messages — Creates meaningful commit messages based on your actual code changes.
- Hybrid Mode — Use your own Gemini API key for unlimited commits, or use the AutoSync service for free (rate limited).
- Automatic File Watching — Detects file changes in real time.
- Smart Staging — Automatically stages modified files before committing.
- Conventional Commit Format — Commit messages follow the conventional commit standard.
- Works With Any Git Repository — Simply initialize inside a Git project and start coding.
Installation
Install globally using npm:
npm install -g autosync-gitGetting Started
1. Initialize AutoSync Git
autosync-git init2. (Optional) Add your Gemini API key
autosync-git loginYou will be prompted to enter your Gemini API key.
- With a key — AutoSync calls Gemini directly using your quota. No rate limits.
- Without a key — AutoSync uses the shared service. Free but rate limited (5 requests/min, 50 requests/day).
You can skip this step and start using AutoSync immediately without a key.
3. Start watching your project
autosync-git startAutoSync Git will now:
- Watch for file changes
- Stage modified files
- Generate an AI commit message
- Commit automatically
4. Stop watching
autosync-git stopExample Workflow
autosync-git startEdit your files, for example:
src/auth/loginController.js
src/auth/authMiddleware.jsAutoSync Git detects the changes and commits automatically:
feat(auth): add jwt authentication middlewarefix(api): correct user data validationCommands
| Command | Description |
|---|---|
| autosync-git init | Initialize AutoSync Git in current repo |
| autosync-git login | Add your Gemini API key for unlimited mode |
| autosync-git logout | Remove saved API key, switch back to shared service |
| autosync-git status | Show current mode (direct key or shared service) |
| autosync-git start | Start the file watcher |
| autosync-git stop | Stop the file watcher |
| autosync-git config | Show current configuration |
Modes
Unlimited Mode (your own key)
autosync-git login
# enter your Gemini API key when promptedYour key is stored locally at ~/.autosync-git/config.json. Commits are generated directly using your Google Gemini quota with no rate limits.
Free Mode (shared service)
No setup needed. Just install and start. AutoSync uses a shared backend to generate your commit messages. Rate limited to prevent abuse.
| | Free Mode | Unlimited Mode | |---|---|---| | Setup required | ❌ None | ✅ Gemini API key | | Rate limited | ✅ 5/min, 50/day | ❌ No limits | | Cost | Free | Your Gemini quota |
Requirements
- Node.js 18 or higher
- Git installed and initialized in your project
- Gemini API key (optional — for unlimited mode only)
License
MIT License
