{"id":22662737,"url":"https://github.com/solutionforest/ai-gitcommit","last_synced_at":"2026-02-11T17:35:14.871Z","repository":{"id":267155577,"uuid":"900401596","full_name":"solutionforest/ai-gitcommit","owner":"solutionforest","description":"Small tools - AI commit message  by ollama, llama3.2 3B","archived":false,"fork":false,"pushed_at":"2024-12-08T17:52:50.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T18:21:19.365Z","etag":null,"topics":["ai","git","llama3","ollama"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solutionforest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-12-08T17:24:24.000Z","updated_at":"2025-03-13T11:00:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"8452fa46-80c1-475f-a64b-3fbe86a582c5","html_url":"https://github.com/solutionforest/ai-gitcommit","commit_stats":null,"previous_names":["solutionforest/ai-gitcommit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solutionforest/ai-gitcommit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Fai-gitcommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Fai-gitcommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Fai-gitcommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Fai-gitcommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutionforest","download_url":"https://codeload.github.com/solutionforest/ai-gitcommit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Fai-gitcommit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270653571,"owners_count":24622789,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","git","llama3","ollama"],"created_at":"2024-12-09T12:15:22.575Z","updated_at":"2026-02-11T17:35:09.834Z","avatar_url":"https://github.com/solutionforest.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git-AI Commit Message Generator\n\nThis project provides a script to automatically generate meaningful and concise Git commit messages based on staged changes (`git diff`). It uses **Ollama**, a locally hosted AI model, to analyze changes and produce human-readable commit messages.\n\n---\n\n## Features\n\n- **AI-Generated Commit Messages**: Automatically generates clear and accurate Git commit messages using Ollama's AI models.\n- **Multi-Line Commit Messages**: Creates well-structured, descriptive commit messages, capped at 100 words.\n- **Seamless Git Integration**: Automatically stages, generates, and commits changes for you.\n- **Local AI Backend**: Runs entirely on your local machine for privacy and reliability.\n\n---\n\n## How It Works\n\n1. The script extracts staged changes using `git diff --cached`.\n2. The changes (diff) are sent to Ollama's API (`http://localhost:11434/api/generate`).\n3. Ollama's AI model analyzes the diff and generates a commit message.\n4. The commit message is saved into `.git/COMMIT_EDITMSG`.\n5. Git creates the commit using the AI-generated message.\n\n---\n\n## Requirements\n\n### Dependencies\n\n- **`jq`**: A lightweight and flexible JSON processor.\n- **`curl`**: A command-line tool for making HTTP requests.\n\nYou can install these dependencies using your system's package manager:\n\n# For Debian/Ubuntu\n```bash\nsudo apt install jq curl\n```\n\n# For macOS\n```bash\nbrew install jq curl\n```\n\n## Setting Up Ollama\n\nThis project uses **Ollama** as the AI backend to generate Git commit messages. Ollama is a privacy-focused AI platform that runs models locally on your machine. Follow the steps below to set up Ollama and ensure the project works correctly.\n\n### Install Ollama\n\nVisit the [Ollama website](https://ollama.ai/) and follow the instructions for installing Ollama on your operating system.\n\n### Download the Required Model\n\nThis project uses the `llama3.2:3b` model. Once Ollama is installed, pull the model by running:\n\n```bash\nollama create gitdiff -f Modelfile\n```\n\n### Commit Message\n```bash\n./git-ai-commit.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionforest%2Fai-gitcommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutionforest%2Fai-gitcommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionforest%2Fai-gitcommit/lists"}