avcmt-py: AI-Powered Semantic Release Style Git Commit Automation for Python Project.
Project description
AVCMT-PY - AI-Powered Semantic Release Style Git Commit Automation for Python Projects
Tired of manually crafting Git commit messages? Supercharge your Python development workflow with avcmt-py, the intelligent CLI tool that automates semantic, structured commit message generation using AI. Boost productivity and maintain a crystal-clear repository history effortlessly.
TL;DR: AI-powered, semantic-release-style git commit automation for Python projects. One command, zero guesswork: meaningful, structured commits using your Pollinations AI API Token. Install, configure your API key, and enjoy never writing boring commit messages again!
๐ What is avcmt-py?
AVCMT-PY (Automated Version Control & Management Tool for Python) is a blazing-fast, fully-automated CLI tool for generating meaningful, structured git commit messages using AI (Gemini, OpenAI, Pollinations, etc) โ optimized for Python developers who want clean semantic-release workflow, better productivity, and crystal-clear repo history.
- No more generic "fix bug", "update code" commits.
- Just run
avcmtand get a ready-to-commit, semantic-release-formatted message, automatically grouped by directory or file. - Integrates with pre-commit, CI/CD, and release workflows.
- Flexible AI provider: choose your favorite (support for Gemini, Pollinations, OpenAI out-of-the-box).
โจ Features
-
AI-Powered Commit Messages: Generate detailed, semantic-release-style commit messages from git diff with a single command.
-
Directory Grouping: Automatically groups and commits related changes per directory (or as a catch-all).
-
Semantic Release Ready: Commit format fully compatible with semantic-release for auto versioning & changelogs.
-
Multi-Provider AI: Easily switch between Gemini, Pollinations, OpenAI (or extend to your own LLM API).
-
Jinja2 Prompt Templates: Fully customizable prompt rendering using Jinja2 templates for flexible commit messaging.
-
Zero Hardcoded Secrets: API keys are loaded from
.envor environment variables. -
Easy to Install, Easy to Use: Works on any Python project, no lock-in.
-
Developer Tools Included: Scripts for linting, formatting, preflight check, and triggering semantic release.
-
Pre-commit & CI/CD Friendly: Fully integrated with pre-commit and GitHub Actions for automated workflows.
๐ฆ Installation
pip install avcmt-py
Or install from source:
git clone https://github.com/andyvandaric/avcmt-py.git
cd avcmt-py
pip install .
โก๏ธ Quick Start (TL;DR)
-
Add your API key
-
Copy
.env.exampleto.env -
Edit
.envand fill your Pollinations or OpenAI API key
# Example (.env) OPENAI_API_KEY=your_openai_token POLLINATIONS_TOKEN=your_pollinations_token
-
-
(Optional) Enable pre-commit hook:
pre-commit install -
Run avcmt:
avcmt # AI generates & applies grouped commits!
-
Optionally use:
-
--dry-run(preview messages) -
--push(auto-push after commit) -
--debug(show AI prompts & raw response)
-
-
-
Done!
- Check your git log for clean, structured, semantic-release-ready commit messages.
๐ ๏ธ Usage
avcmt [OPTIONS]
-
--dry-run: Preview commit messages without applying -
--push: Push commits to remote after done -
--debug: Show debug info (prompts & AI response)
Example
avcmt --dry-run
avcmt --push
๐ Environment & Configuration
-
Place
.envin your project root (or set env vars globally) -
Supported ENV:
-
POLLINATIONS_API_TOKEN -
(other providers: applied next update)
-
๐ฆ Project Structure (avcmt-py/)
avcmt-py/
โโโ .env.example
โโโ .github/
โ โโโ workflows/
โ โโโ pre-commit.yml
โ โโโ release.yaml
โโโ .gitignore
โโโ .pre-commit-config.yaml
โโโ CHANGELOG.md
โโโ LICENSE
โโโ README.md
โโโ pyproject.toml
โโโ avcmt/
โ โโโ __init__.py
โ โโโ ai.py
โ โโโ cli.py
โ โโโ commit.py
โ โโโ utils.py
โ โโโ prompt_templates/
โ โ โโโ commit_message.j2
โ โโโ providers/
โ โโโ __init__.py
โ โโโ openai.py
โ โโโ pollinations.py
โโโ scripts/
โ โโโ check.py
โ โโโ clean.py
โ โโโ format.py
โ โโโ helper.py
โ โโโ lintfix.py
โ โโโ preflight.py
โ โโโ semrel.py
โ โโโ setup.py
โโโ setup.cfg
โจ File Descriptions
-
avcmt/cli.py--- CLI entry point, handles argument parsing and triggers auto-commit. -
avcmt/commit.py--- Core logic for grouping, git interaction, and structured AI commit message generation. -
avcmt/ai.py--- Manages prompt rendering and request to the AI provider (Jinja2-powered). -
avcmt/utils.py--- Helper functions for environment, logging, and file operations. -
avcmt/__init__.py--- Marks the core package. -
avcmt/prompt_templates/commit_message.j2--- Jinja2 template for AI commit prompt. -
avcmt/providers/openai.py--- Adapter for OpenAI API. -
avcmt/providers/pollinations.py--- Adapter for Pollinations API. -
avcmt/providers/__init__.py--- Provider interface loader. -
scripts/check.py--- Run validation checks on repo status. -
scripts/clean.py--- Optional cleanup utility. -
scripts/format.py--- Format code using Ruff or Black. -
scripts/helper.py--- Shared utilities across scripts. -
scripts/lintfix.py--- Lint and auto-fix with Ruff. -
scripts/preflight.py--- Pre-commit safety check runner. -
scripts/semrel.py--- Trigger python-semantic-release publish process. -
scripts/setup.py--- One-shot setup script for dev environment. -
.env.example--- Environment file template. Copy to.envand fill your token. -
.pre-commit-config.yaml--- Pre-commit hook configuration. -
.gitignore--- Ignore compiled files, .env, cache, etc. -
pyproject.toml--- Project metadata and dependency configuration. -
setup.cfg--- Optional setup file for tools compatibility. -
README.md--- Full project description and usage. -
LICENSE--- MIT License. -
CHANGELOG.md--- Auto-generated changelog via semantic release. -
.github/workflows/release.yaml--- CI workflow for auto versioning and publishing. -
.github/workflows/pre-commit.yaml--- CI pre-commit hook runner.
๐งฉ Advanced
-
Custom AI Providers: See
avcmt/ai.pyto extend with your own LLM API. -
Integration with pre-commit: Works out-of-the-box, can be called in hooks or CI.
-
Full CLI options: Run
avcmt --helpfor all flags.
๐ FAQ
Q: Will this overwrite my changes or commit everything automatically? A: No, only staged files are affected. You're always in control.
Q: Can I use it for monorepos? A: Yes, directory grouping is automatic, but fully configurable.
Q: What if my provider's API token is missing or invalid? A: You'll see a clear error and nothing will be committed.
Q: Is it safe for public/private repos? A: Yes, no token or diff is ever sent to any server except the AI you choose.
๐ Why avcmt-py?
-
โจ Stop wasting time on commit messages
-
โจ Zero learning curve, drop-in to any Python repo
-
โจ Works everywhere: CLI, hook, CI/CD, local/dev/remote
-
โจ Your AI, your rules: bring your own API key, use any LLM
๐ Links
๐ License
Apache 2.0 Made by Andy Vandaric
๐ Credits
-
Inspired by semantic-release, and real-life productivity pain points.
-
Powered by Pollinations AI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file avcmt_py-1.7.0.tar.gz.
File metadata
- Download URL: avcmt_py-1.7.0.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2693c784160d0cd7cc93387bb1f624da5ba12a89eadf8d7a2d2c9e3510015560
|
|
| MD5 |
7643919e8da84588606a567ac4604284
|
|
| BLAKE2b-256 |
4f3c5e984a06d794f3773594686551cb8317b9667b64d22c81dae6b45bea98ce
|
File details
Details for the file avcmt_py-1.7.0-py3-none-any.whl.
File metadata
- Download URL: avcmt_py-1.7.0-py3-none-any.whl
- Upload date:
- Size: 52.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa602c51b821c73c8fcc9b347eeabd2c7a615509670e23f82826d61676b61279
|
|
| MD5 |
f7252329f4a3aa6fed8ac53e88a6ccc5
|
|
| BLAKE2b-256 |
e945127260dfba3543cda2220be6c7c8b290aefb7d0d5a35874dbcb35d19365f
|