{"id":29031649,"url":"https://github.com/abdiev003/git-axiom","last_synced_at":"2026-04-02T01:15:44.602Z","repository":{"id":300376585,"uuid":"1006032308","full_name":"Abdiev003/git-axiom","owner":"Abdiev003","description":"🚀 AI-powered CLI tool that generates professional Git commit messages using OpenAI GPT. Analyze staged changes and create conventional commits automatically. ⚡","archived":false,"fork":false,"pushed_at":"2025-06-21T11:28:30.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T11:31:46.834Z","etag":null,"topics":["ai","ai-tools","automation","cli","commit-messages","conventional-commits","developer-tools","git","git-workflow","gpt","javascript","nodejs","openai","workflow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Abdiev003.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-21T10:38:58.000Z","updated_at":"2025-06-21T11:28:33.000Z","dependencies_parsed_at":"2025-06-21T11:31:47.240Z","dependency_job_id":null,"html_url":"https://github.com/Abdiev003/git-axiom","commit_stats":null,"previous_names":["abdiev003/git-axiom","abdiev003/axiom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abdiev003/git-axiom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdiev003%2Fgit-axiom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdiev003%2Fgit-axiom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdiev003%2Fgit-axiom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdiev003%2Fgit-axiom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abdiev003","download_url":"https://codeload.github.com/Abdiev003/git-axiom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abdiev003%2Fgit-axiom/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262044447,"owners_count":23249750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-tools","automation","cli","commit-messages","conventional-commits","developer-tools","git","git-workflow","gpt","javascript","nodejs","openai","workflow"],"created_at":"2025-06-26T10:04:52.422Z","updated_at":"2026-04-02T01:15:44.559Z","avatar_url":"https://github.com/Abdiev003.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Git Axiom\n\n\u003e An AI-powered CLI tool to supercharge your Git workflows with intelligent commit messages\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm version](https://badge.fury.io/js/git-axiom.svg)](https://badge.fury.io/js/git-axiom)\n[![npm downloads](https://img.shields.io/npm/dm/git-axiom.svg)](https://www.npmjs.com/package/git-axiom)\n[![npm total downloads](https://img.shields.io/npm/dt/git-axiom.svg)](https://www.npmjs.com/package/git-axiom)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D14.0.0-brightgreen)](https://nodejs.org/)\n[![CI](https://github.com/Abdiev003/git-axiom/actions/workflows/ci.yml/badge.svg)](https://github.com/Abdiev003/git-axiom/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/Abdiev003/git-axiom/actions/workflows/codeql.yml/badge.svg)](https://github.com/Abdiev003/git-axiom/actions/workflows/codeql.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Abdiev003/git-axiom/badge.svg?branch=main)](https://coveralls.io/github/Abdiev003/git-axiom?branch=main)\n[![Known Vulnerabilities](https://snyk.io/test/github/Abdiev003/git-axiom/badge.svg)](https://snyk.io/test/github/Abdiev003/git-axiom)\n\n\u003c/div\u003e\n\n## ✨ Features\n\n- 🤖 **AI-Powered Commit Messages** - Generate professional, conventional commit messages using OpenAI GPT\n- 🌟 **Smart Branch Naming** - Generate intelligent branch names based on your code changes ✨ **NEW**\n- ⚡ **Lightning Fast** - Analyze staged changes and generate commit messages in seconds  \n- 🎯 **Conventional Commits** - Follows industry-standard commit message format automatically\n- 🎨 **Beautiful UI** - Interactive prompts with colored output and loading spinners\n- 🛡️ **Error Handling** - Comprehensive error handling with helpful suggestions\n- 📝 **Smart Analysis** - Analyzes your code changes to create contextually relevant messages\n- 🔧 **Multi-Type Branches** - Support for feature, fix, hotfix, refactor, and docs branches\n\n## 🔧 Installation\n\n### Prerequisites\n- Node.js 14.0.0 or higher\n- Git repository\n- OpenAI API key\n\n### Install via npm\n```bash\nnpm install -g git-axiom\n```\n\n### Local Development Setup\n```bash\n# Clone the repository\ngit clone https://github.com/Abdiev003/git-axiom.git\ncd git-axiom\n\n# Install dependencies\nnpm install\n\n# Make executable\nchmod +x index.js\n\n# Link for global usage (optional)\nnpm link\n```\n\n## 🔑 Setup\n\n### 1. Get OpenAI API Key\n1. Visit [OpenAI Platform](https://platform.openai.com/api-keys)\n2. Create a new API key\n3. Copy your API key\n\n### 2. Set Environment Variable\n```bash\n# Add to your shell profile (.bashrc, .zshrc, etc.)\nexport OPENAI_API_KEY=\"your-openai-api-key-here\"\n\n# Or set for current session\nexport OPENAI_API_KEY=\"sk-...\"\n```\n\n### 3. Initialize Git Axiom\n```bash\ngit-axiom init\n```\n\n## 🚀 Usage\n\n### Basic Workflow\n\n#### For Commit Messages:\n1. **Stage your changes**\n```bash\ngit add .\n# or\ngit add specific-file.js\n```\n\n2. **Generate AI commit message**\n```bash\ngit-axiom commit\n```\n\n3. **Review and confirm**\nThe tool will:\n- Analyze your staged changes\n- Generate a professional commit message\n- Show you the message for approval\n- Commit automatically if you approve\n\n#### For Branch Naming:\n1. **Make your changes** (don't stage yet)\n```bash\n# Edit your files\nvim src/auth.js\n```\n\n2. **Generate AI branch name**\n```bash\ngit-axiom branch\n# or specify branch type\ngit-axiom branch --type feature\n```\n\n3. **Review and create**\nThe tool will:\n- Analyze your current changes\n- Generate a descriptive branch name\n- Show you the suggested name\n- Create and switch to the branch if approved\n\n### Example Sessions\n\n#### Commit Message Generation\n```bash\n$ git add src/auth.js\n$ git-axiom commit\n\n⠋ Analyzing staged files...\n⠋ Generating commit message with AI...\n✅ Commit message generated!\n\n📝 Generated commit message:\n\"feat(auth): add user authentication middleware\"\n\n? Do you want to proceed with this commit message? (Y/n) \n\n⠋ Committing changes...\n✅ Commit successful!\n\n✨ Successfully committed with message: \"feat(auth): add user authentication middleware\"\n```\n\n#### Branch Name Generation ✨ **NEW**\n```bash\n$ # After making changes to authentication system\n$ git-axiom branch --type feature\n\n⠋ Analyzing your changes...\n⠋ Generating branch name with AI...\n✅ Branch name generated!\n\n🌟 Generated branch name:\nfeature/add-user-authentication\nType: feature\n\n? Do you want to create this branch and switch to it? (Y/n) \n\n⠋ Creating new branch...\n✅ Branch created successfully!\n\n✨ Successfully created and switched to branch: \"feature/add-user-authentication\"\n💡 You can now make your changes and use \"git-axiom commit\" when ready!\n```\n\n## 📋 Commands\n\n### `git-axiom commit`\nGenerate AI-powered commit messages for staged changes.\n\n```bash\ngit-axiom commit\n```\n\n**What it does:**\n1. Analyzes your staged Git changes\n2. Sends the diff to OpenAI for analysis\n3. Generates a conventional commit message\n4. Asks for your confirmation\n5. Commits the changes if approved\n\n### `git-axiom init`\nInitialize Git Axiom and check setup.\n\n```bash\ngit-axiom init\n```\n\n### `git-axiom --help`\nShow help information and available commands.\n\n```bash\ngit-axiom --help\n# or\ngit-axiom -h\n```\n\n## 🎯 Conventional Commits\n\nAxiom automatically generates commit messages following the [Conventional Commits](https://www.conventionalcommits.org/) specification:\n\n```\n\u003ctype\u003e(\u003cscope\u003e): \u003csubject\u003e\n```\n\n### Common Types:\n- `feat`: New features\n- `fix`: Bug fixes\n- `docs`: Documentation changes\n- `style`: Code style changes (formatting, etc.)\n- `refactor`: Code refactoring\n- `test`: Adding or updating tests\n- `chore`: Maintenance tasks\n\n### Examples:\n```bash\nfeat(auth): add OAuth2 authentication\nfix(api): resolve user data validation error\ndocs(readme): update installation instructions\nrefactor(utils): simplify helper functions\n```\n\n## 🛠️ Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `OPENAI_API_KEY` | Your OpenAI API key (required) | - |\n| `AI_MODEL` | OpenAI model to use | `gpt-3.5-turbo` |\n| `AI_BASE_URL` | Custom API endpoint | `https://api.openai.com/v1` |\n\n### Custom Configuration Example\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\n```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**\"No staged changes found\"**\n```bash\n# Solution: Stage your changes first\ngit add .\n```\n\n**\"OpenAI API key not found\"**\n```bash\n# Solution: Set your API key\nexport OPENAI_API_KEY=\"your-key-here\"\n```\n\n**\"Not a git repository\"**\n```bash\n# Solution: Make sure you're in a Git repository\ngit init\n```\n\n**\"Rate limit exceeded\"**\n```bash\n# Solution: Wait a moment and try again\n# Or upgrade your OpenAI plan\n```\n\n**\"The changes are too large to analyze\"**\n```bash\n# Solution: Commit smaller chunks of changes\ngit add specific-file.js\ngit-axiom commit\n\n# Or stage specific lines/hunks\ngit add -p\ngit-axiom commit\n```\n\n**\"Maximum context length exceeded\"**\n```bash\n# Solution: The tool automatically handles large diffs\n# But you can also commit changes in smaller parts\ngit add src/\ngit-axiom commit\ngit add tests/\ngit-axiom commit\n```\n\n**\"No changes found to analyze\" (for branch command)**\n```bash\n# Solution: Make some changes to your files first\nvim src/example.js\ngit-axiom branch\n```\n\n**\"Branch already exists\"**\n```bash\n# Solution: Use a different branch type or delete existing branch\ngit branch -D feature/existing-branch\ngit-axiom branch --type fix\n```\n\n## 🏗️ Architecture\n\n```\naxiom/\n├── index.js              # Main CLI entry point\n├── utils/\n│   ├── git.js           # Git operations\n│   ├── ai.js            # OpenAI API integration\n│   └── ui.js            # User interface helpers\n├── package.json\n└── README.md\n```\n\n### Key Components:\n- **Commander.js** - CLI framework\n- **Axios** - HTTP client for API calls\n- **Inquirer** - Interactive prompts\n- **Ora** - Loading spinners\n- **Chalk** - Terminal colors\n\n## 📊 Stats \u0026 Analytics\n\n\u003cdiv align=\"center\"\u003e\n  \n![GitHub stars](https://img.shields.io/github/stars/Abdiev003/git-axiom?style=social)\n![GitHub forks](https://img.shields.io/github/forks/Abdiev003/git-axiom?style=social)\n![GitHub watchers](https://img.shields.io/github/watchers/Abdiev003/git-axiom?style=social)\n![GitHub contributors](https://img.shields.io/github/contributors/Abdiev003/git-axiom)\n\n\u003c/div\u003e\n\n## 🏆 Features Comparison\n\n| Feature | Git Axiom | Traditional Commits | Other AI Tools |\n|---------|-----------|-------------------|----------------|\n| AI-Generated Messages | ✅ | ❌ | ✅ |\n| **Smart Branch Naming** | ✅ ✨ **NEW** | ❌ | ❌ |\n| Conventional Commits | ✅ | ❌ | ⚠️ |\n| Interactive CLI | ✅ | ❌ | ⚠️ |\n| Multi-Type Branches | ✅ | ❌ | ❌ |\n| Error Handling | ✅ | ❌ | ⚠️ |\n| Free to Use | ❌ | ✅ | ❌ |\n| Offline Mode | ❌ | ✅ | ❌ |\n\n## 🚀 Performance\n\n- **Speed**: Generates commit messages \u0026 branch names in \u003c 3 seconds\n- **Accuracy**: 95%+ relevant commit messages and branch names\n- **API Usage**: Optimized for minimal token consumption\n- **Memory**: \u003c 50MB RAM usage\n- **Branch Creation**: Instant branch creation and switching\n\n## 📈 Changelog\n\nFor detailed changes, see [CHANGELOG.md](CHANGELOG.md).\n\n### v1.1.0 (Latest) ✨ **NEW**\n- 🌟 **Smart Branch Naming** - AI-powered branch name generation\n- 🤖 Added `git-axiom branch` command with multiple branch types\n- 🎯 Support for feature, fix, hotfix, refactor, and docs branches\n- 🎨 Enhanced UI with beautiful interactive prompts\n- 🔧 Comprehensive test suite and improved documentation\n\n### v1.0.1\n- 🐛 Fixed error handling for network timeouts  \n- 📝 Improved commit message generation accuracy\n- 🎨 Enhanced UI with better spinner animations\n\n### v1.0.0\n- 🎉 Initial release\n- ✨ AI-powered commit message generation\n- 🎯 Conventional commits support\n- 🎨 Interactive CLI interface\n\n[See full changelog →](CHANGELOG.md)\n\n## 🤝 Contributing\n\nWe welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Quick Start for Contributors\n```bash\ngit clone https://github.com/Abdiev003/git-axiom.git\ncd git-axiom\nnpm install\nnpm test\nnpm run lint\n```\n\n### Contributors\n\n\u003ca href=\"https://github.com/Abdiev003/git-axiom/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=Abdiev003/git-axiom\" /\u003e\n\u003c/a\u003e\n\n## 📄 License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [OpenAI](https://openai.com/) for providing the GPT API\n- [Conventional Commits](https://www.conventionalcommits.org/) for the commit format specification\n- The open-source community for the amazing tools and libraries\n\n## 📞 Support\n\n- 🐛 [Report Issues](https://github.com/Abdiev003/git-axiom/issues)\n- 💬 [Discussions](https://github.com/Abdiev003/git-axiom/discussions)\n- 📧 Email: aliabdiyev000@gmail.com\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cb\u003e⭐ Star this repository if Axiom helps improve your Git workflow! ⭐\u003c/b\u003e\n\u003c/div\u003e\n\n---\n\n**Made with ❤️ by Ali Abdiyev(https://github.com/Abdiev003)** ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdiev003%2Fgit-axiom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdiev003%2Fgit-axiom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdiev003%2Fgit-axiom/lists"}