| Crates.io | ai-commit-gen |
| lib.rs | ai-commit-gen |
| version | 1.0.0 |
| created_at | 2025-02-10 23:51:07.871518+00 |
| updated_at | 2025-02-10 23:51:07.871518+00 |
| description | AI-generated commit messages for Git |
| homepage | |
| repository | https://github.com/morganngetich/ai-commit |
| max_upload_size | |
| id | 1550811 |
| size | 83,455 |
This is the backend service for the AI Commit project, responsible for generating commit messages using AI models. It integrates with models like Mistral, LLaMA 2, and OpenAI to provide AI-driven commit message suggestions based on code diffs and file changes. The backend also handles the Command-Line Interface (CLI) for interacting with the service.
To install the backend, it's recommended to install it via Cargo:
cargo install ai-commit
This is the preferred method for installing the backend as it ensures you're using the latest stable version. After running this command, the ai-commit CLI will be available for you to use.
Alternatively, if you prefer a manual installation, you can run the following command, which will download and run the install.sh script located in the backend folder:
curl -sSL https://github.com/Morgan-Ngetich/ai-commit/raw/main/backend/install.sh | bash
This command will:
install.sh: The installation script to set up the backend environment and dependencies.src/ai_model.rs: Contains logic for handling AI model interaction, generating commit messages, and running Ollama.src/main.rs: Main entry point that integrates Git commands with AI model-driven commit message generation. This is where the CLI commands are executed.Once the backend is installed, you can generate commit messages using the CLI:
ai-commit
This command will analyze the staged files in your Git repository and generate a commit message based on the changes. You'll then be prompted to confirm or edit the suggested message before committing.