{"id":28812750,"url":"https://github.com/onkardahale/axle","last_synced_at":"2026-05-10T03:17:11.023Z","repository":{"id":295540004,"uuid":"990380828","full_name":"onkardahale/axle","owner":"onkardahale","description":"A CLI tool for generating Git commit messages","archived":false,"fork":false,"pushed_at":"2025-06-18T02:53:13.000Z","size":142,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-18T03:27:12.906Z","etag":null,"topics":["cli","commit-message","git","llm","qwen2-5","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onkardahale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T03:11:17.000Z","updated_at":"2025-06-18T02:53:16.000Z","dependencies_parsed_at":"2025-05-26T04:48:15.438Z","dependency_job_id":null,"html_url":"https://github.com/onkardahale/axle","commit_stats":null,"previous_names":["onkardahale/axle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onkardahale/axle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onkardahale%2Faxle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onkardahale%2Faxle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onkardahale%2Faxle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onkardahale%2Faxle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onkardahale","download_url":"https://codeload.github.com/onkardahale/axle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onkardahale%2Faxle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265414715,"owners_count":23761057,"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":["cli","commit-message","git","llm","qwen2-5","tree-sitter"],"created_at":"2025-06-18T15:00:43.217Z","updated_at":"2026-05-10T03:17:10.975Z","avatar_url":"https://github.com/onkardahale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axle\n\nAxle is a command-line tool that helps you write better commit messages using AI. It analyzes your code changes and suggests a commit message in a structured format.\n\n## Table of Contents\n\n- [Features](#features)\n- [Quick Start](#quick-start)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Knowledge Base](#knowledge-base)\n- [Language Support](#language-support)\n- [Interactive Features](#interactive-features)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n\n## Features\n\n- 🤖 AI-powered commit message generation using the Qwen2.5-Coder-3B-Instruct model\n- 📚 Language-agnostic knowledge base for improved context-aware commit messages\n- 🔄 Interactive regeneration of commit messages with user context\n- 🔗 Issue linking and breaking change declarations\n- 💾 Automatic model caching for faster subsequent runs\n- 🛠️ Configurable generation parameters\n- 📚 Support for conventional commit types and scopes\n- 🌳 Tree-sitter based code parsing for better context understanding\n- 🌐 Multi-language support through tree-sitter grammars\n\n## Quick Start\n\n```bash\n# Install\npip install git+https://github.com/onkardahale/axle.git\n\n# Initialize knowledge base (optional but recommended)\naxle init\n\n# Stage your changes and generate commit message\ngit add .\naxle commit\n```\n\n## Installation\n\n```bash\npip install git+https://github.com/onkardahale/axle.git\n```\n\n## Usage\n\n1. **Initialize the knowledge base** (recommended for better commit messages):\n```bash\naxle init\n```\n\n2. **Stage your changes:**\n```bash\ngit add .\n```\n\n3. **Generate a commit message:**\n```bash\naxle commit\n```\n\n4. **The tool will:**\n   - Analyze your staged changes\n   - Use the knowledge base for context (if available)\n   - Generate a commit message\n   - Open your default editor for review\n   - Prompt for issue linking and breaking changes\n   - Create the commit if you save and close the editor\n\n## Knowledge Base\n\nThe `axle init` command creates a local knowledge base in the `.axle` directory of your project. This knowledge base:\n\n- Analyzes your codebase using tree-sitter for accurate parsing\n- Extracts structural information, docstrings, and imports\n- Categorizes files based on their purpose and imports\n- Provides rich context for commit message generation\n- Supports multiple programming languages through tree-sitter grammars\n- Automatically detects and processes supported file types\n\n### Ignoring Files and Directories\n\nCreate a `.axleignore` file in your project root to control which files are analyzed:\n\n```\n# Build directories\nbuild/\ndist/\ntarget/\n\n# Temporary files\n*.tmp\n*.log\ntemp*\n\n# IDE files\n.vscode/\n.idea/\n\n# Documentation\ndocs/\n*.md\n```\n\n**Default ignored directories:** `.git`, `.hg`, `.svn`, `.vscode`, `node_modules`, `__pycache__`, `.axle`\n\n## Language Support\n\nAxle supports multiple programming languages through dedicated analyzers:\n\n### **Currently Supported:**\n- **Python** (`.py`)\n- **JavaScript** (`.js`, `.jsx`, `.mjs`, `.cjs`)\n- **C++** (`.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx`)\n- **Julia** (`.jl`) ✨ *New!*\n\n### **Planned Languages:**\n- TypeScript (`.ts`, `.tsx`)\n- Java (`.java`)\n- Go (`.go`)\n- Rust (`.rs`)\n- Ruby (`.rb`)\n- PHP (`.php`)\n\n\u003e **Note:** While tree-sitter-language-pack provides grammar support for many languages, each requires a dedicated analyzer implementation. [Contributions welcome!](#contributing-language-analyzers)\n\n### File Categorization\n\nFiles are automatically categorized based on:\n\n**Import-based categories:**\n- `web_framework`: Django, Flask, React, Vue, etc.\n- `test`: pytest, jest, mocha, etc.\n- `database`: SQLAlchemy, mongoose, etc.\n- `data_processing`: pandas, numpy\n- `ml`: tensorflow, pytorch, sklearn\n\n**Path-based categories:**\n- `util`, `test`, `config`, `model`, `controller`, `service`, `ui_component`, `entrypoint`\n\n### Contributing Language Analyzers\n\nTo add support for a new language:\n\n1. **Create analyzer** in `src/axle/treesitter/analyzers/`\n2. **Implement required methods** following existing patterns\n3. **Add tests** in `tests/test_\u003clanguage\u003e_analyzer.py`\n4. **Update documentation**\n\nSee `javascript_analyzer.py`, `cpp_analyzer.py`, and `julia_analyzer.py` for reference implementations.\n\n## Interactive Features\n\nAfter generating a commit message, you can:\n\n1. **Commit**: Save and commit the message\n2. **Edit**: Modify the message in your editor\n3. **Regenerate**: Generate a new message with additional context\n4. **Abort**: Cancel the commit\n\nYou'll also be prompted to:\n- Link related issues (e.g., \"Fixes #123\")\n- Declare breaking changes with descriptions\n\n## Configuration\n\nCustomize generation behavior via `~/.cache/axle/model_config.json`:\n\n```json\n{\n    \"model_name\": \"Qwen/Qwen2.5-Coder-3B-Instruct\",\n    \"temperature\": 0.2,\n    \"top_p\": 0.95,\n    \"num_return_sequences\": 1\n}\n```\n\n## Commit Message Format\n\nGenerated commits follow conventional commit format:\n\n```\ntype(scope): description\n\n[optional body]\n\n[optional footer]\n```\n\n**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`\n\n## Requirements\n\n- **Python 3.12+**\n- **Git**\n- **Text editor** (vim, nano, etc.)\n\n## Dependencies\n\n- click, transformers, torch, accelerate\n- tree-sitter, tree-sitter-language-pack\n- pydantic (\u003e=2.0.0)\n\n## Project History\n\nThis project was developed using Axle itself! Here are some example generated commit messages:\n\n```\nfeat(tests): Add setup and teardown methods to BaseAxleTestCase for cleaner test environments\n\nAdded `setUp` and `tearDown` methods to `BaseAxleTestCase` to handle common setup \nand teardown tasks for tests. This includes creating temporary directories for \nbackups and test data, backing up original configuration files, and cleaning up \nresources after tests.\n\nFixes: #8\n```\n\n```\nrefactor(ai_utils): improve robustness and error handling in commit message generation\n\nAdded checks to validate and clamp generation parameters to prevent tensor issues:\n- Ensured temperature is within [0.01, 0.6]\n- Clamped top_p to [0.01, 0.95]\n- Set num_return_sequences to 1 to avoid excessive output\n\nFixes: #6\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n**Areas where we need help:**\n- New language analyzers\n- Improved file categorization\n- Documentation improvements\n- Bug reports and fixes\n\n## License\n\nMIT ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonkardahale%2Faxle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonkardahale%2Faxle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonkardahale%2Faxle/lists"}