{"_id":"@ashannpm/git-auto-flow","_rev":"2-0680582c5c11e21e310f1083aa3e6c76","name":"@ashannpm/git-auto-flow","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@ashannpm/git-auto-flow","version":"1.0.0","keywords":["git","automation","commit","ai","conventional-commits","claude","anthropic","git-hooks","commit-message","devtools"],"author":{"name":"Ashan Madhuwantha","email":"ashmadhuwantha@gmail.com"},"license":"MIT","_id":"@ashannpm/git-auto-flow@1.0.0","maintainers":[{"name":"ashannpm","email":"ashmadhuwantha@gmail.com"}],"homepage":"https://github.com/yourusername/git-auto-flow#readme","bugs":{"url":"https://github.com/yourusername/git-auto-flow/issues"},"bin":{"git-commit-auto":"src/cli/commit.js","git-setup-fetch":"src/cli/setup-fetch.js"},"dist":{"shasum":"31897dd139ccdc6e257488190d240b38c6f70933","tarball":"https://registry.npmjs.org/@ashannpm/git-auto-flow/-/git-auto-flow-1.0.0.tgz","fileCount":8,"integrity":"sha512-pjk8owuY7+rL7KbCULKU9ZGxufX3+QDx56VKiNh1BDLiJizK3kXuY4yRV6AaanlMC7pjmRfGbmNl2POodEQ45A==","signatures":[{"sig":"MEYCIQC4me/FIweAjOiyr9UAo7Hzy+q7CZoAIIaOvN1m+B7r4QIhAMkDNyp5B4gloFFIzBeN2OvD81sUEO9L1yIb+KcBc3jh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26083},"main":"src/index.js","type":"module","engines":{"node":">=18.0.0"},"scripts":{"setup":"node src/cli/setup-fetch.js","start":"node src/cli/commit.js"},"_npmUser":{"name":"ashannpm","email":"ashmadhuwantha@gmail.com"},"repository":{"url":"git+https://github.com/yourusername/git-auto-flow.git","type":"git"},"_npmVersion":"10.9.2","description":"Automate git workflows with AI-generated conventional commit messages and automatic fetching","directories":{},"_nodeVersion":"22.14.0","dependencies":{"ora":"^8.1.1","chalk":"^5.4.1","dotenv":"^16.4.7","commander":"^12.1.0","simple-git":"^3.27.0","@anthropic-ai/sdk":"^0.32.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/git-auto-flow_1.0.0_1781611246957_0.438189054978368","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ashannpm/git-auto-flow","version":"1.0.1","description":"Automate git workflows with AI-generated conventional commit messages and automatic fetching","main":"src/index.js","type":"module","bin":{"git-commit-auto":"src/cli/commit.js","git-setup-fetch":"src/cli/setup-fetch.js"},"scripts":{"start":"node src/cli/commit.js","setup":"node src/cli/setup-fetch.js"},"repository":{"type":"git","url":"git+https://github.com/yourusername/git-auto-flow.git"},"bugs":{"url":"https://github.com/yourusername/git-auto-flow/issues"},"homepage":"https://github.com/yourusername/git-auto-flow#readme","keywords":["git","automation","commit","ai","conventional-commits","claude","anthropic","git-hooks","commit-message","devtools"],"author":{"name":"Ashan Madhuwantha","email":"ashmadhuwantha@gmail.com"},"license":"MIT","engines":{"node":">=18.0.0"},"dependencies":{"@anthropic-ai/sdk":"^0.32.1","simple-git":"^3.27.0","commander":"^12.1.0","chalk":"^5.4.1","ora":"^8.1.1","dotenv":"^16.4.7"},"_id":"@ashannpm/git-auto-flow@1.0.1","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-FnwnMpEuFznHlPO+dOX36/bJio8HF8HB0CX9v6AAzAgGU9mWXsuRO+KDGfB9ZgSn2OZMAALOCaG6GEVuQKXsug==","shasum":"c798e49ef5759a5367d82c2c0955cbd3e85e6b82","tarball":"https://registry.npmjs.org/@ashannpm/git-auto-flow/-/git-auto-flow-1.0.1.tgz","fileCount":8,"unpackedSize":26044,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB5nIRvMdmQcl4bbSpxXO+x4VS1WRQ6hRUl9etm9/owmAiEAmnTclkwTnPobWt+c1t033BuwPGedScSnKQmF7HD2tYI="}]},"_npmUser":{"name":"ashannpm","email":"ashmadhuwantha@gmail.com"},"directories":{},"maintainers":[{"name":"ashannpm","email":"ashmadhuwantha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/git-auto-flow_1.0.1_1781611843571_0.11586845355633923"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-16T12:00:46.756Z","modified":"2026-06-16T12:10:43.838Z","1.0.0":"2026-06-16T12:00:47.102Z","1.0.1":"2026-06-16T12:10:43.709Z"},"bugs":{"url":"https://github.com/yourusername/git-auto-flow/issues"},"author":{"name":"Ashan Madhuwantha","email":"ashmadhuwantha@gmail.com"},"license":"MIT","homepage":"https://github.com/yourusername/git-auto-flow#readme","keywords":["git","automation","commit","ai","conventional-commits","claude","anthropic","git-hooks","commit-message","devtools"],"repository":{"type":"git","url":"git+https://github.com/yourusername/git-auto-flow.git"},"description":"Automate git workflows with AI-generated conventional commit messages and automatic fetching","maintainers":[{"name":"ashannpm","email":"ashmadhuwantha@gmail.com"}],"readme":"# Git Auto Flow\n\n[![npm version](https://img.shields.io/npm/v/git-auto-flow.svg)](https://www.npmjs.com/package/git-auto-flow)\n[![npm downloads](https://img.shields.io/npm/dm/git-auto-flow.svg)](https://www.npmjs.com/package/git-auto-flow)\n[![license](https://img.shields.io/npm/l/git-auto-flow.svg)](https://github.com/yourusername/git-auto-flow/blob/main/LICENSE)\n\n> **The only AI commit tool with native AWS Bedrock support**\n\nAutomate your git workflow with AI-generated conventional commit messages and automatic fetching. Works seamlessly with Claude Code, AWS Bedrock, or direct Anthropic API.\n\n## ✨ Why Git Auto Flow?\n\n### 🎯 **Unique Features**\n- ☁️ **AWS Bedrock Support** - Only tool with native Bedrock integration\n- 🔍 **Auto-Detection** - Works with Claude Code, no setup needed\n- ⚡ **Lightning Fast** - 1-3 second commits (30x cheaper than competitors)\n- 📦 **One Command** - Stage + commit + push in a single command\n- 🔄 **Auto-Fetch** - Keep repos synced automatically (VS Code + systemd)\n- 🛡️ **Fallback Mode** - Works even without AI access\n\n### 🚀 **Core Features**\n- 🤖 **Smart Commits** - AI-generated conventional commit messages using Claude\n- 📦 **Single Command** - Add, commit, and push in one command\n- 🔄 **Auto Fetch** - Automatically fetch from remote on VS Code startup or daily schedule\n- ✅ **Conventional Commits** - Follows conventional commit standards\n- ⚙️ **Configurable** - Force API/CLI mode, choose model (Haiku/Sonnet)\n- 💰 **Cost Optimized** - ~$0.0003 per commit (vs ~$0.009 with other tools)\n\n## 📊 Quick Comparison\n\n| Feature | git-auto-flow | Other Tools |\n|---------|---------------|-------------|\n| AWS Bedrock Support | ✅ | ❌ |\n| Auto-detection (no config) | ✅ | ❌ |\n| Speed (response time) | 1-3s | 5-10s |\n| Auto-fetch | ✅ | Rare |\n| Fallback mode | ✅ | ❌ |\n| Single command workflow | ✅ | Varies |\n\n## Installation\n\n### Global Installation (Recommended)\n\n```bash\nnpm install -g git-auto-flow\n```\n\n### Local Development\n\n```bash\ngit clone https://github.com/yourusername/git-auto-flow\ncd git-auto-flow\nnpm install\nnpm link\n```\n\n## 🎯 Who Should Use This?\n\nPerfect for:\n- ✅ **AWS Bedrock users** - Only tool with native support\n- ✅ **Claude Code users** - Auto-detects your setup\n- ✅ **Enterprise teams** - AWS compliance, cost-optimized\n- ✅ **Speed-focused devs** - 1-3s commits, not 5-10s\n- ✅ **Cost-conscious teams** - 30x cheaper than alternatives\n\n## Setup\n\n### 1. Configure API Key\n\nThe package supports multiple authentication methods:\n\n**Option A: Claude Code with AWS Bedrock** ✅\n- Automatically detected and uses `claude` CLI\n- Works with AWS SSO authentication\n- No additional setup needed\n- See [BEDROCK_SETUP.md](docs/BEDROCK_SETUP.md) for details\n\n**Option B: Claude Code with Standard API**\n- API key is automatically detected from `~/.claude/settings.json`\n- No additional setup needed\n\n**Option C: Without Claude Code**\n- Copy `.env.example` to `.env`\n- Get your API key from [console.anthropic.com](https://console.anthropic.com/)\n- Add to `.env`:\n  ```\n  ANTHROPIC_API_KEY=your_api_key_here\n  ```\n\n### Advanced Configuration (Optional)\n\nYou can customize the authentication method and model in `.env`:\n\n```bash\n# Force authentication method (auto, api, cli)\nGIT_AUTO_FLOW_AUTH_METHOD=auto\n\n# Select model for API mode (haiku, sonnet)\nGIT_AUTO_FLOW_MODEL=haiku  # Fast & cheap (recommended)\n```\n\nSee [CONFIGURATION.md](docs/CONFIGURATION.md) for details.\n\n### 2. Setup Auto-Fetch (Optional)\n\n**For VS Code users:**\n```bash\nnpm run setup -- --vscode\n```\nThis creates a VS Code task that automatically runs `git fetch` when you open the folder.\n\n**For Linux users with systemd:**\n```bash\nnpm run setup -- --systemd --time 09:00\n```\nThis creates a systemd timer to fetch daily at 9:00 AM.\n\n## Usage\n\n### Smart Commit\n\n```bash\n# Add all changes, generate commit message, and commit\nnpm start\n\n# Or use the CLI directly\nnpx git-commit-auto\n\n# Add, commit, and push\nnpx git-commit-auto --push\n\n# Dry run (see generated message without committing)\nnpx git-commit-auto --dry-run\n\n# Only commit staged changes (don't auto-stage)\nnpx git-commit-auto --no-add\n\n# Push to a specific remote\nnpx git-commit-auto --push --remote upstream\n```\n\n### Options\n\n- `-p, --push` - Push after commit\n- `-n, --no-add` - Skip staging all files (only commit staged changes)\n- `-d, --dry-run` - Show generated message without committing\n- `-r, --remote <remote>` - Remote to push to (default: origin)\n\n## How It Works\n\n1. **Stages changes** (unless `--no-add` is used)\n2. **Analyzes git diff** to understand what changed\n3. **Generates commit message** using Claude AI following conventional commit standards\n4. **Shows the message** for review\n5. **Commits** the changes\n6. **Pushes** (if `--push` flag is used)\n\n## Conventional Commit Format\n\nThe tool generates messages following the [Conventional Commits](https://www.conventionalcommits.org/) specification:\n\n```\ntype(scope): description\n\n[optional body]\n\n[optional footer]\n```\n\n**Types:**\n- `feat`: New feature\n- `fix`: Bug fix\n- `docs`: Documentation changes\n- `style`: Code style changes (formatting, missing semicolons, etc.)\n- `refactor`: Code refactoring\n- `perf`: Performance improvements\n- `test`: Adding or updating tests\n- `chore`: Maintenance tasks\n- `ci`: CI/CD changes\n- `build`: Build system changes\n\n## Examples\n\n### Example 1: Feature addition\n```bash\n$ npx git-commit-auto\n\n🔍 Analyzing changes...\n✔ Changes staged\n✔ Found 3 changed file(s)\n\nChanged files:\n  - src/api/users.js (modified)\n  - src/models/user.js (modified)\n  - tests/api/users.test.js (new)\n\n✔ Commit message generated\n\n📝 Generated commit message:\n────────────────────────────────────────────────────────────\nfeat(api): add user profile endpoint\n\nAdd GET /api/users/:id endpoint to fetch user profiles.\nIncludes validation and error handling.\n────────────────────────────────────────────────────────────\n✔ Changes committed\n\n✅ Done!\n```\n\n### Example 2: Bug fix with push\n```bash\n$ npx git-commit-auto --push\n\n📝 Generated commit message:\n────────────────────────────────────────────────────────────\nfix(auth): resolve token expiration issue\n\nFix bug where expired tokens were not properly invalidated,\ncausing authentication errors for logged-in users.\n────────────────────────────────────────────────────────────\n✔ Changes committed\n✔ Pushed to origin/main\n\n✅ Done!\n```\n\n## Troubleshooting\n\n### API Key Issues\n\nIf you get \"ANTHROPIC_API_KEY not found\":\n1. Check if Claude Code is installed: `claude --version`\n2. If not, create a `.env` file with your API key\n3. If yes, ensure `~/.claude/settings.json` contains your API key\n\n### No Changes to Commit\n\nIf you see \"No changes to commit\":\n- Check `git status` to see if you have any changes\n- Make sure you're in a git repository\n\n### VS Code Task Not Running\n\nIf auto-fetch doesn't work in VS Code:\n1. Open Command Palette (Ctrl+Shift+P)\n2. Search \"Tasks: Run Task\"\n3. Look for \"Git Fetch on Startup\"\n4. Check `.vscode/tasks.json` was created\n\n## 🌟 Why This Stands Out\n\n### Compared to Other AI Commit Tools\n\n**Most tools** require OpenAI/GPT API keys and take 5-10 seconds per commit.\n\n**git-auto-flow** is different:\n- ☁️ **Only tool with AWS Bedrock** - Perfect for enterprise AWS users\n- ⚡ **5-10x faster** - Uses optimized Haiku model (1-3s vs 5-10s)\n- 💰 **30x cheaper** - $0.0003 vs $0.009 per commit\n- 🔍 **Zero config** - Auto-detects Claude Code, Bedrock, or API\n- 📦 **Complete workflow** - Stage + commit + push + auto-fetch\n\n### Real Performance\n\n```bash\n# Other tools\n$ time other-ai-commit\nreal    0m8.234s  # ~8 seconds\ncost    $0.009    # per commit\n\n# git-auto-flow  \n$ time git-commit-auto\nreal    0m1.847s  # ~2 seconds ⚡\ncost    $0.0003   # per commit 💰\n```\n\n**For 100 commits/month:**\n- Other tools: ~14 minutes, $0.90\n- git-auto-flow: ~3 minutes, $0.03 ✅\n\n## 📝 Contributing\n\nContributions welcome! This tool is especially valuable for:\n- AWS Bedrock users\n- Claude Code integration improvements  \n- Additional authentication methods\n- Performance optimizations\n\n## License\n\nMIT © 2026 Ashan Madhuwantha\n","readmeFilename":"README.md"}