@ashannpm/git-auto-flow
v1.0.1
Published
Automate git workflows with AI-generated conventional commit messages and automatic fetching
Maintainers
Readme
Git Auto Flow
The only AI commit tool with native AWS Bedrock support
Automate your git workflow with AI-generated conventional commit messages and automatic fetching. Works seamlessly with Claude Code, AWS Bedrock, or direct Anthropic API.
✨ Why Git Auto Flow?
🎯 Unique Features
- ☁️ AWS Bedrock Support - Only tool with native Bedrock integration
- 🔍 Auto-Detection - Works with Claude Code, no setup needed
- ⚡ Lightning Fast - 1-3 second commits (30x cheaper than competitors)
- 📦 One Command - Stage + commit + push in a single command
- 🔄 Auto-Fetch - Keep repos synced automatically (VS Code + systemd)
- 🛡️ Fallback Mode - Works even without AI access
🚀 Core Features
- 🤖 Smart Commits - AI-generated conventional commit messages using Claude
- 📦 Single Command - Add, commit, and push in one command
- 🔄 Auto Fetch - Automatically fetch from remote on VS Code startup or daily schedule
- ✅ Conventional Commits - Follows conventional commit standards
- ⚙️ Configurable - Force API/CLI mode, choose model (Haiku/Sonnet)
- 💰 Cost Optimized - ~$0.0003 per commit (vs ~$0.009 with other tools)
📊 Quick Comparison
| Feature | git-auto-flow | Other Tools | |---------|---------------|-------------| | AWS Bedrock Support | ✅ | ❌ | | Auto-detection (no config) | ✅ | ❌ | | Speed (response time) | 1-3s | 5-10s | | Auto-fetch | ✅ | Rare | | Fallback mode | ✅ | ❌ | | Single command workflow | ✅ | Varies |
Installation
Global Installation (Recommended)
npm install -g git-auto-flowLocal Development
git clone https://github.com/yourusername/git-auto-flow
cd git-auto-flow
npm install
npm link🎯 Who Should Use This?
Perfect for:
- ✅ AWS Bedrock users - Only tool with native support
- ✅ Claude Code users - Auto-detects your setup
- ✅ Enterprise teams - AWS compliance, cost-optimized
- ✅ Speed-focused devs - 1-3s commits, not 5-10s
- ✅ Cost-conscious teams - 30x cheaper than alternatives
Setup
1. Configure API Key
The package supports multiple authentication methods:
Option A: Claude Code with AWS Bedrock ✅
- Automatically detected and uses
claudeCLI - Works with AWS SSO authentication
- No additional setup needed
- See BEDROCK_SETUP.md for details
Option B: Claude Code with Standard API
- API key is automatically detected from
~/.claude/settings.json - No additional setup needed
Option C: Without Claude Code
- Copy
.env.exampleto.env - Get your API key from console.anthropic.com
- Add to
.env:ANTHROPIC_API_KEY=your_api_key_here
Advanced Configuration (Optional)
You can customize the authentication method and model in .env:
# Force authentication method (auto, api, cli)
GIT_AUTO_FLOW_AUTH_METHOD=auto
# Select model for API mode (haiku, sonnet)
GIT_AUTO_FLOW_MODEL=haiku # Fast & cheap (recommended)See CONFIGURATION.md for details.
2. Setup Auto-Fetch (Optional)
For VS Code users:
npm run setup -- --vscodeThis creates a VS Code task that automatically runs git fetch when you open the folder.
For Linux users with systemd:
npm run setup -- --systemd --time 09:00This creates a systemd timer to fetch daily at 9:00 AM.
Usage
Smart Commit
# Add all changes, generate commit message, and commit
npm start
# Or use the CLI directly
npx git-commit-auto
# Add, commit, and push
npx git-commit-auto --push
# Dry run (see generated message without committing)
npx git-commit-auto --dry-run
# Only commit staged changes (don't auto-stage)
npx git-commit-auto --no-add
# Push to a specific remote
npx git-commit-auto --push --remote upstreamOptions
-p, --push- Push after commit-n, --no-add- Skip staging all files (only commit staged changes)-d, --dry-run- Show generated message without committing-r, --remote <remote>- Remote to push to (default: origin)
How It Works
- Stages changes (unless
--no-addis used) - Analyzes git diff to understand what changed
- Generates commit message using Claude AI following conventional commit standards
- Shows the message for review
- Commits the changes
- Pushes (if
--pushflag is used)
Conventional Commit Format
The tool generates messages following the Conventional Commits specification:
type(scope): description
[optional body]
[optional footer]Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, missing semicolons, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testschore: Maintenance tasksci: CI/CD changesbuild: Build system changes
Examples
Example 1: Feature addition
$ npx git-commit-auto
🔍 Analyzing changes...
✔ Changes staged
✔ Found 3 changed file(s)
Changed files:
- src/api/users.js (modified)
- src/models/user.js (modified)
- tests/api/users.test.js (new)
✔ Commit message generated
📝 Generated commit message:
────────────────────────────────────────────────────────────
feat(api): add user profile endpoint
Add GET /api/users/:id endpoint to fetch user profiles.
Includes validation and error handling.
────────────────────────────────────────────────────────────
✔ Changes committed
✅ Done!Example 2: Bug fix with push
$ npx git-commit-auto --push
📝 Generated commit message:
────────────────────────────────────────────────────────────
fix(auth): resolve token expiration issue
Fix bug where expired tokens were not properly invalidated,
causing authentication errors for logged-in users.
────────────────────────────────────────────────────────────
✔ Changes committed
✔ Pushed to origin/main
✅ Done!Troubleshooting
API Key Issues
If you get "ANTHROPIC_API_KEY not found":
- Check if Claude Code is installed:
claude --version - If not, create a
.envfile with your API key - If yes, ensure
~/.claude/settings.jsoncontains your API key
No Changes to Commit
If you see "No changes to commit":
- Check
git statusto see if you have any changes - Make sure you're in a git repository
VS Code Task Not Running
If auto-fetch doesn't work in VS Code:
- Open Command Palette (Ctrl+Shift+P)
- Search "Tasks: Run Task"
- Look for "Git Fetch on Startup"
- Check
.vscode/tasks.jsonwas created
🌟 Why This Stands Out
Compared to Other AI Commit Tools
Most tools require OpenAI/GPT API keys and take 5-10 seconds per commit.
git-auto-flow is different:
- ☁️ Only tool with AWS Bedrock - Perfect for enterprise AWS users
- ⚡ 5-10x faster - Uses optimized Haiku model (1-3s vs 5-10s)
- 💰 30x cheaper - $0.0003 vs $0.009 per commit
- 🔍 Zero config - Auto-detects Claude Code, Bedrock, or API
- 📦 Complete workflow - Stage + commit + push + auto-fetch
Real Performance
# Other tools
$ time other-ai-commit
real 0m8.234s # ~8 seconds
cost $0.009 # per commit
# git-auto-flow
$ time git-commit-auto
real 0m1.847s # ~2 seconds ⚡
cost $0.0003 # per commit 💰For 100 commits/month:
- Other tools: ~14 minutes, $0.90
- git-auto-flow: ~3 minutes, $0.03 ✅
📝 Contributing
Contributions welcome! This tool is especially valuable for:
- AWS Bedrock users
- Claude Code integration improvements
- Additional authentication methods
- Performance optimizations
License
MIT © 2026 Ashan Madhuwantha
