{"id":21963642,"url":"https://github.com/yankeexe/ai-gen-commit","last_synced_at":"2025-10-10T10:32:11.719Z","repository":{"id":265253979,"uuid":"895624466","full_name":"yankeexe/ai-gen-commit","owner":"yankeexe","description":"✨Use AI to generate commit messages","archived":false,"fork":false,"pushed_at":"2025-08-25T16:24:33.000Z","size":136,"stargazers_count":8,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T03:16:41.318Z","etag":null,"topics":["ai-commit","chatgpt","commit-generator","gemini-api","gemini-pro","generative-ai-","generative-ai-projects","ollama","ollama-app","openai"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ai-gen-commit","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yankeexe.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,"zenodo":null}},"created_at":"2024-11-28T14:58:55.000Z","updated_at":"2025-08-25T16:24:36.000Z","dependencies_parsed_at":"2025-08-25T18:13:19.525Z","dependency_job_id":"ad7857da-c2a9-4ca3-98e1-2e10609c634d","html_url":"https://github.com/yankeexe/ai-gen-commit","commit_stats":null,"previous_names":["yankeexe/ai-gen-commit"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/yankeexe/ai-gen-commit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Fai-gen-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Fai-gen-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Fai-gen-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Fai-gen-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yankeexe","download_url":"https://codeload.github.com/yankeexe/ai-gen-commit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yankeexe%2Fai-gen-commit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003549,"owners_count":26083595,"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-10-10T02:00:06.843Z","response_time":62,"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-commit","chatgpt","commit-generator","gemini-api","gemini-pro","generative-ai-","generative-ai-projects","ollama","ollama-app","openai"],"created_at":"2024-11-29T11:26:33.570Z","updated_at":"2025-10-10T10:32:11.706Z","avatar_url":"https://github.com/yankeexe.png","language":"Python","readme":"## 🐙 AI Commit Generator\n\nUse AI to generate commit message for your staged changes.\n\n\u003ca href=\"https://youtu.be/1y2TohQdNbo\"\u003e\n\u003cimg src=\"https://i.imgur.com/cwdzCUw.gif\" width=\"800\"\u003e\n\u003c/a\u003e\n\n\n## ⚡️ Features\n\n- Use local models (via Ollama) or remote models (with OpenAI API compatible providers like:  `openai`, `groq`, `gemini`, `togetherai`, `deepseek`, `qwen`) or your [custom provider](#-bring-your-own-provider).\n- Regenerate commit messages until you find the perfect one\n- In-place editing of generated commit\n- Define your custom commit message format\n- Simple CLI interface with debug mode\n\n## ⚡️ Install\n\n```sh\npip install ai-gen-commit\n```\n\n## ✨ Generate Commit messages\n\nIn any git directory with staged changes, run:\n\n```sh\naic\n```\n\n### 🔍 Run in debug mode\n\n```sh\naic -d\n```\n### 🦙 Local Mode [Specify model to use]\n\n```sh\naic -m \u003cmodel-name\u003e\n\naic -m \"llama3.2:3b\"\n\n# OR\n\nexport OLLAMA_MODEL=\"llama3.2:3b\"\n```\n\n### 🛜 Remote Mode\n\nTo run in remote mode, export your API keys as:\n\n```sh\nexport OPENAI_API_KEY=\u003cyour-api-key\u003e\n```\n\nSpecify which remote provider to use:\n\n```sh\nexport AI_COMMIT_PROVIDER=\"gemini\" or \"openai\" or \"togetherai\" or \"groq\" or \"deepseek\" or \"mistral\"\n```\n\nthen enable remote mode:\n\n```sh\naic -r\n```\n\nSpecify the model to use based on the provider:\n\n```sh\nexport AI_COMMIT_PROVIDER=\"groq\"\nexport AI_COMMIT_MODEL=\"qwen-2.5-32b\" # pass the model as env var\naic -r\n\n# ---\n\nexport AI_COMMIT_PROVIDER=\"openai\"\naic -r -m \"gpt-4o-2024-11-20\" # pass the model as flag\n\n# ---\n\nexport AI_COMMIT_PROVIDER=\"gemini\"\naic -r -m \"gemini-1.5-flash\"\n```\n\n### ✨ Bring your own Provider\n\nYou can use any OPEN AI compatible provider/server for commit generation.\n\n```sh\nexport AI_COMMIT_PROVIDER=custom # should be set to custom\nexport AI_COMMIT_MODEL=llama3.2:3b # example\nexport AI_COMMIT_PROVIDER_BASE_URL=http://localhost:11434/v1 # example\nexport OPENAI_API_KEY=\u003cyour-api-key\u003e # if your custom provider requires one\n```\n\n### 📝 In-place Editing\n\n[🎥 Watch the Demo](https://www.linkedin.com/feed/update/urn:li:activity:7293488744391675905/)\n\nSet your editor environment variable:\n\n```sh\nexport EDITOR=vim\nexport EDITOR=nvim\n\n# For VSCode\nexport EDITOR='code --wait'\n```\n\nAfter commit message is generated, press `e` to edit using the defined `$EDITOR`.\n\nDefaults to using `vi`.\n\n### 🤖 Custom commit message format\n\nUsers can generate commit messages based on the format and instructions defined in the system prompt.\n\n**To define system prompt on project level**\n\n1. Create a `.ai-commit` file in your git repository's root directory (same location as the `.git` folder)\n2. Add your system prompt to this file\n\n**To define a global system prompt**\n\n1. Create a file on `~/.$HOME/.ai-commit`\n2. Add your system prompt to this file\n\n| Project-level System Prompt \u003e Global System Prompt \u003e  [Built-in system prompt](https://github.com/yankeexe/ai-gen-commit/blob/5c8b6374752a84046d8ce5d5a78fe0481ce1362d/ai_commit/prompts.py#L3-L29).\n\n## Getting Help\n\n```sh\naic -h\n```\n\n## 🔨 Development\n\n### 👀 Prerequisites Local mode [default]\n\n- [ollama](https://ollama.dev/download)\n\n\n### 🚀 Setting up\n\n```sh\nmake setup\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyankeexe%2Fai-gen-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyankeexe%2Fai-gen-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyankeexe%2Fai-gen-commit/lists"}