{"_id":"@alpharages/ai-commit-assistant","_rev":"2-e39bcf89ff9a4cf98f60ce110e3932f6","name":"@alpharages/ai-commit-assistant","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@alpharages/ai-commit-assistant","version":"1.0.0","keywords":["git","ai","commit","cli","typescript"],"author":{"name":"alpharagesadmin"},"license":"MIT","_id":"@alpharages/ai-commit-assistant@1.0.0","maintainers":[{"name":"alpharagesadmin","email":"info@alpharages.com"}],"homepage":"https://github.com/alpharages/gitscribe#readme","bugs":{"url":"https://github.com/alpharages/gitscribe/issues"},"bin":{"ai-commit":"cli/index.js"},"dist":{"shasum":"61502c68a31da6aa4f6118e431c909a9ac2d6059","tarball":"https://registry.npmjs.org/@alpharages/ai-commit-assistant/-/ai-commit-assistant-1.0.0.tgz","fileCount":13,"integrity":"sha512-hCQq2f+oNRm1XyRBg8OEi0/7+mm9axvGl4jnXjxyxtArgmeots2iFBkRM5j7A+HOcevfzBraCHdOhCLjW2b+Pw==","signatures":[{"sig":"MEUCIEObg0K6cqQpIyqOAHydYzcpY/04ks8In+nWf73s6InTAiEA4FFHaKfMkbfO+/8wc9/MSTYcQ6vPeRCyRz0Dr6mOxEc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":123894},"main":"cli/index.js","types":"./cli/index.d.ts","engines":{"node":">=18"},"gitHead":"25fd4321f341f86594c1a13e838b6ceb3af2d1bd","_npmUser":{"name":"alpharagesadmin","email":"info@alpharages.com"},"repository":{"url":"git+https://github.com/alpharages/gitscribe.git","type":"git"},"_npmVersion":"10.9.3","description":"AI-powered Git commit assistant that works locally","directories":{},"_nodeVersion":"22.18.0","dependencies":{"chalk":"^5.6.2","commander":"^14.0.2","simple-git":"^3.30.0","@huggingface/transformers":"^3.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/ai-commit-assistant_1.0.0_1763146876332_0.43161260466600737","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alpharages/ai-commit-assistant","version":"1.0.1","description":"AI-powered Git commit assistant that works locally","main":"cli/index.js","bin":{"ai-commit":"cli/index.js"},"keywords":["git","ai","commit","cli","typescript"],"author":{"name":"alpharagesadmin"},"license":"MIT","dependencies":{"@huggingface/transformers":"^3.1.2","chalk":"^5.6.2","commander":"^14.0.2","simple-git":"^3.30.0"},"devDependencies":{"@types/node":"^20","typescript":"^5"},"repository":{"type":"git","url":"git+https://github.com/alpharages/gitscribe.git"},"homepage":"https://github.com/alpharages/gitscribe#readme","bugs":{"url":"https://github.com/alpharages/gitscribe/issues"},"engines":{"node":">=18"},"_id":"@alpharages/ai-commit-assistant@1.0.1","gitHead":"25fd4321f341f86594c1a13e838b6ceb3af2d1bd","types":"./cli/index.d.ts","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-CajQJv+61tBoLhb0kT6yTU0QJbLI8hTq9P4AoqgiVIOs1Ewi+OoIrlRBlmp/8Y8eH5h/qcNxolxALCSew6q9mQ==","shasum":"913f1a29a34fe130f49cef4da5f11849142d4b4c","tarball":"https://registry.npmjs.org/@alpharages/ai-commit-assistant/-/ai-commit-assistant-1.0.1.tgz","fileCount":14,"unpackedSize":132366,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFRl80pS1jAqw7ZFdtbFcsg7Ug9ZqPEXuEQoPGBZFvfLAiEAr5MIdg8cepAo/I3Zi1JQJ/8PNK47pnvUqX4dCiQ+YvI="}]},"_npmUser":{"name":"alpharagesadmin","email":"info@alpharages.com"},"directories":{},"maintainers":[{"name":"alpharagesadmin","email":"info@alpharages.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-commit-assistant_1.0.1_1763147064278_0.7192503670151535"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-14T19:01:16.194Z","modified":"2025-11-14T19:04:24.702Z","1.0.0":"2025-11-14T19:01:16.559Z","1.0.1":"2025-11-14T19:04:24.493Z"},"bugs":{"url":"https://github.com/alpharages/gitscribe/issues"},"author":{"name":"alpharagesadmin"},"license":"MIT","homepage":"https://github.com/alpharages/gitscribe#readme","keywords":["git","ai","commit","cli","typescript"],"repository":{"type":"git","url":"git+https://github.com/alpharages/gitscribe.git"},"description":"AI-powered Git commit assistant that works locally","maintainers":[{"name":"alpharagesadmin","email":"info@alpharages.com"}],"readme":"# 🧠 AI Commit Assistant\n\nA local-first developer tool that automatically generates clear, structured, and context-aware Git commit messages using AI running entirely on your machine.\n\n[![npm version](https://img.shields.io/npm/v/@alpharages/ai-commit-assistant.svg)](https://www.npmjs.com/package/@alpharages/ai-commit-assistant)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## ✨ Features\n\n- 🔍 **Smart Change Analysis** - Analyzes actual code changes, not just filenames, to understand what was done and why\n- 🧠 **Local LLM Processing** - Uses Llama 3.2 1B locally via Hugging Face Transformers.js — no cloud calls\n- 📝 **Meaningful Commit Messages** - Generates descriptive messages with purpose and impact, not file lists\n- 🗂️ **Conventional Commit Output** - Produces messages in `feat`, `fix`, `refactor`, `docs`, etc. formats\n- ⚙️ **CLI Interface** - Simple commands like `ai-commit review` or `ai-commit commit`\n- 🔒 **Data Privacy** - All code and diffs stay local; zero external API calls\n- ⚡ **Fast and Offline** - Runs efficiently without internet dependency\n\n## 🚀 Installation\n\nInstall globally via npm:\n\n```bash\nnpm install -g @alpharages/ai-commit-assistant\n```\n\nVerify installation:\n\n```bash\nai-commit --version\n```\n\n## 📋 Quick Start\n\n### 1. Stage Your Changes\n\n```bash\ngit add src/components/Button.tsx\n```\n\n### 2. Review Commit Suggestions\n\n```bash\nai-commit review\n```\n\nOutput:\n```\n🔍 Analyzing staged changes...\n✓ Found changes: 1 file(s) changed, 15 insertions(+), 3 deletions(-)\n\n📄 src/components/Button.tsx\n   Status: M | +15 -3\n\n🧠 Generating commit message suggestions...\n\n📝 Commit Message Suggestions:\n\n1. feat(ui): enhance button component with hover effects\n   Type: feat(ui) | Confidence: 92%\n\n2. refactor(components): improve button styling and animations\n   Type: refactor(components) | Confidence: 78%\n```\n\n### 3. Commit with Best Suggestion\n\n```bash\nai-commit commit\n```\n\nOr auto-commit without confirmation:\n\n```bash\nai-commit commit --no-confirm\n```\n\n## 🎯 Commands\n\n| Command | Description | Options |\n|---------|-------------|---------|\n| `ai-commit review` | Analyze staged changes and get commit suggestions | `-i, --interactive`<br/>`-t, --temperature <number>`<br/>`-m, --max-tokens <number>`<br/>`-v, --verbosity <level>`<br/>`-b, --include-body` |\n| `ai-commit commit` | Auto-commit with the best AI-generated message | `--no-confirm`<br/>Same options as `review` |\n| `ai-commit status` | Show repository status and recent commits | - |\n| `ai-commit config` | Configure AI commit settings | `[key] [value]` |\n\n## ⚙️ Configuration\n\nConfigure the tool to match your preferences:\n\n```bash\n# Set verbosity level\nai-commit config verbosity concise|detailed|balanced\n\n# Set AI temperature (0.0-1.0)\nai-commit config temperature 0.7\n\n# Set maximum tokens\nai-commit config maxTokens 150\n\n# Include commit body\nai-commit config includeBody true\n\n# Change AI model\nai-commit config model \"meta-llama/Llama-3.2-1B-Instruct\"\n```\n\nThe tool creates a `.ai-commit.json` configuration file in your repository root:\n\n```json\n{\n  \"model\": \"meta-llama/Llama-3.2-1B-Instruct\",\n  \"maxTokens\": 150,\n  \"temperature\": 0.7,\n  \"verbosity\": \"balanced\",\n  \"includeBody\": true,\n  \"customPrompt\": null\n}\n```\n\n## 🤖 Supported AI Models\n\n### 🏆 Recommended Models\n\n| Model | Size | Speed | Quality | Memory | Best For |\n|-------|------|-------|---------|--------|----------|\n| **`meta-llama/Llama-3.2-1B-Instruct`** ⭐ | ~1GB | Medium | ⭐⭐⭐⭐⭐ | 2-3GB | **Production** - Best quality |\n| **`onnx-community/Qwen2.5-1.5B-Instruct`** | ~1.5GB | Medium | ⭐⭐⭐⭐⭐ | 3GB | **Production** - Excellent reasoning |\n| `onnx-community/Qwen2.5-0.5B-Instruct` | ~500MB | Fast | ⭐⭐⭐⭐ | 1-2GB | Compact, fast generation |\n| `HuggingFaceTB/SmolLM2-1.7B-Instruct` | ~1.7GB | Medium | ⭐⭐⭐⭐ | 3GB | High quality, efficient |\n| `openai-community/gpt2` | ~500MB | Fast | ⭐⭐⭐ | 1GB | Balanced, quick |\n| `distilbert/distilgpt2` | ~300MB | Very Fast | ⭐⭐ | 512MB | Testing, low resources |\n| `microsoft/phi-2` | ~2.7GB | Slower | ⭐⭐⭐⭐⭐ | 4GB | Best quality |\n\n### Switching Models\n\n```bash\n# Best quality (default)\nai-commit config model \"meta-llama/Llama-3.2-1B-Instruct\"\n\n# Fast alternative\nai-commit config model \"onnx-community/Qwen2.5-0.5B-Instruct\"\n\n# Highest quality (requires 4GB+ RAM)\nai-commit config model \"microsoft/phi-2\"\n```\n\n## 💡 Examples\n\n### Basic Usage\n\n```bash\n# Stage changes\ngit add src/\n\n# Get AI suggestions\nai-commit review\n\n# Commit with best suggestion\nai-commit commit\n```\n\n### Advanced Configuration\n\n```bash\n# Configure for detailed commit messages\nai-commit config verbosity detailed\nai-commit config includeBody true\n\n# Generate with custom settings\nai-commit review --temperature 0.9 --max-tokens 200\n```\n\n### Interactive Mode\n\n```bash\n# Interactive selection and commit\nai-commit review --interactive\n\n# Select a suggestion (1-2): 1\n# ✅ Commit created successfully!\n```\n\n## 🎨 Commit Message Quality\n\n**Before** (traditional commits):\n```\ndocs(docs): update file1.ts, file2.ts, file3.ts, file4.ts...\n```\n\n**After** (AI-generated):\n```\nfix: cleanup ClickUp integration formatting and improve tool handler readability\n\n- Fixed inconsistent formatting in clickup-story-client.ts and tool-handler.ts\n- Improved code readability by reformatting multi-line statements\n- Enhanced error handling comments for better debugging clarity\n- Added detailed documentation files explaining ClickUp-related fixes\n```\n\n## 🔒 Privacy & Security\n\n- ✅ **100% Local Processing** - No data leaves your machine\n- ✅ **Offline Capable** - Works without internet connection\n- ✅ **No Cloud Dependencies** - Zero external API calls\n- ✅ **Code Privacy** - Your source code never gets transmitted\n- ✅ **Open Source Models** - Uses transparent, auditable AI models\n\n## 🚀 Performance\n\n- **Model Size**: ~1GB (downloaded once on first use)\n- **Generation Time**: 2-5 seconds for typical changes\n- **Memory Usage**: ~2GB RAM during processing\n- **CPU Usage**: Optimized for modern processors\n\n## 🎨 Conventional Commit Types\n\nThe tool automatically detects and uses appropriate commit types:\n\n| Type | Description | Example |\n|------|-------------|---------|\n| `feat` | New feature | `feat(auth): add OAuth2 login support` |\n| `fix` | Bug fix | `fix(api): handle null response in user endpoint` |\n| `refactor` | Code refactoring | `refactor(ui): extract button component` |\n| `docs` | Documentation | `docs(readme): update installation instructions` |\n| `style` | Code style changes | `style(css): fix button alignment issues` |\n| `test` | Test additions/changes | `test(auth): add unit tests for login flow` |\n| `chore` | Maintenance tasks | `chore(deps): update react to v18` |\n| `perf` | Performance improvements | `perf(api): optimize database queries` |\n| `ci` | CI/CD changes | `ci(github): add automated testing workflow` |\n| `build` | Build system changes | `build(webpack): configure production optimizations` |\n\n## 🏗️ Technology Stack\n\n- **Language**: TypeScript (Node.js)\n- **AI Engine**: `@huggingface/transformers` running Llama 3.2 1B Instruct\n- **Git Integration**: `simple-git`\n- **CLI Framework**: `commander`\n- **Output Formatting**: `chalk`\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Commit your changes: `git commit -m \"feat: add amazing feature\"`\n4. Push to the branch: `git push origin feature/amazing-feature`\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n\n## 🔗 Links\n\n- **GitHub Repository**: [https://github.com/alpharages/gitscribe](https://github.com/alpharages/gitscribe)\n- **npm Package**: [https://www.npmjs.com/package/@alpharages/ai-commit-assistant](https://www.npmjs.com/package/@alpharages/ai-commit-assistant)\n- **Issues**: [https://github.com/alpharages/gitscribe/issues](https://github.com/alpharages/gitscribe/issues)\n\n## 🙏 Acknowledgments\n\n- **Meta Llama** - For the powerful open-source Llama 3.2 language model\n- **Hugging Face** - For the Transformers.js library enabling local AI processing\n- **Conventional Commits** - For the commit message standard\n\n---\n\nBuilt with ❤️ for developers who value privacy and productivity.\n\n","readmeFilename":"README.md"}