{"id":30941470,"url":"https://github.com/vinodnimbalkar/gcm","last_synced_at":"2026-03-06T12:03:04.692Z","repository":{"id":288740989,"uuid":"969041107","full_name":"vinodnimbalkar/gcm","owner":"vinodnimbalkar","description":"`gcm` is a command-line tool leveraging local LLMs via Ollama OR Google's Gemini API to generate Git commit messages with relevant emojis based on the Git diff.","archived":false,"fork":false,"pushed_at":"2026-02-27T09:58:13.000Z","size":65,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T15:15:24.316Z","etag":null,"topics":["ai","aicommit","commit","gemini","gemini-api","gemma3","git","olla","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/vinodnimbalkar.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-19T08:48:04.000Z","updated_at":"2026-02-27T09:58:17.000Z","dependencies_parsed_at":"2025-05-10T04:31:02.244Z","dependency_job_id":null,"html_url":"https://github.com/vinodnimbalkar/gcm","commit_stats":null,"previous_names":["vinodnimbalkar/gd","vinodnimbalkar/gcm"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vinodnimbalkar/gcm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnimbalkar%2Fgcm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnimbalkar%2Fgcm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnimbalkar%2Fgcm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnimbalkar%2Fgcm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinodnimbalkar","download_url":"https://codeload.github.com/vinodnimbalkar/gcm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinodnimbalkar%2Fgcm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30175907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T11:48:51.886Z","status":"ssl_error","status_checked_at":"2026-03-06T11:48:51.460Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","aicommit","commit","gemini","gemini-api","gemma3","git","olla","rust"],"created_at":"2025-09-10T21:02:11.109Z","updated_at":"2026-03-06T12:03:04.668Z","avatar_url":"https://github.com/vinodnimbalkar.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# GCM - AI-Powered Git Commit Message Generator\n\n`gcm` is a command-line tool that generates meaningful Git commit messages with appropriate emojis based on your Git diff, powered by local LLMs through Ollama.\n\n## Description\n\nThis tool pipes your Git diff into an Ollama instance running locally to generate semantically relevant commit messages that follow conventional commit formats with emoji prefixes. It's perfect for developers who want consistent, meaningful commit messages without the mental overhead of crafting them each time.\n![GCM - AI-Powered Git Commit Message Generator - visual selection](https://github.com/user-attachments/assets/9bdc1145-9b92-4a89-ab40-28b3a3d1c759)\n\n\n## Features\n\n- Generates commit messages with appropriate emoji prefixes\n- Analyzes Git diff content to create contextual commits\n- Follows conventional commit standards\n- Runs completely locally (no data sent to external APIs)\n- Fast and lightweight\n\n## Prerequisites\n\n- [Rust](https://www.rust-lang.org/tools/install) (for building)\n- [Ollama](https://ollama.ai/) running locally\n- A compatible language model (default: \"gemma3\")\n\n## Installation\n\n### From Source\n\n```sh\ngit clone https://github.com/vinodnimbalkar/gcm.git\ncd gcm\ncargo install --path .\n```\n### From Release\nThis one-line installation does not support every OS\n```bash\ncurl -sL \"https://github.com/vinodnimbalkar/gcm/releases/download/v1.0.2/gcm\" | sudo tee ~/.local/bin/gcm \u003e/dev/null \u0026\u0026 sudo chmod +x ~/.local/bin/gcm\n```\n\n### Using the Docker Image\n\nYou can directly use the pre-built Docker image from Docker Hub:\n\n```sh\ndocker pull vinodnimbalkar/gcm:latest\n```\n\nUsing with Gemini API via Docker\n```sh\ngit diff | docker run -i --rm -e GEMINI_API_KEY=your_api_key_here vinodnimbalkar/gcm:latest\n```\nCreating a Shell Alias for Docker\n```sh\n# Add to .bashrc, .zshrc, etc.\nalias docker-gcm='commit_message=$(git diff --staged | docker run -i --rm -e GEMINI_API_KEY=your_api_key_here vinodnimbalkar/gcm:latest); git commit -m \"$(echo \"$commit_message\" | head -n 1)\" -m \"$(echo \"$commit_message\" | tail -n +2)\"'\n```\n## Usage\n\nSimply pipe your Git diff to the tool:\n\n```sh\ngit diff | gcm\n```\n\nOr for staged changes:\n\n```sh\ngit diff --staged | gcm\n```\n\nThen use the generated message to commit:\n\n```sh\ngit commit -m \"$(git diff --staged | gcm)\"\n```\n\nFor convenience, you might want to add an alias to your shell configuration:\n\n```sh\n# Add to .bashrc, .zshrc, etc.\nalias gcm='commit_message=$(git diff --staged | gcm); git commit -m \"$(echo \"$commit_message\" | head -n 1)\" -m \"$(echo \"$commit_message\" | tail -n +2)\"'\n\n```\n## LLM Service Configuration\n\nThe tool supports two LLM services:\n\n### 1. Ollama (Default, Local)\n\nIf no Gemini API key is set, `gcm` will use Ollama by default. Ollama must be installed and running locally.\n\nYou can configure the Ollama model using an environment variable:\n```sh\nexport OLLAMA_MODEL=gemma3  # Default is \"gemma3\"\n```\n\n### 2. Gemini (Cloud API)\n\nTo use Google's Gemini API:\n1. Obtain a Gemini API key from [Google AI Studio](https://makersuite.google.com/app/apikey)\n2. Set the API key as an environment variable:\n```sh\nexport GEMINI_API_KEY=your_api_key_here\n```\n\n`gcm` will automatically use Gemini when the `GEMINI_API_KEY` environment variable is set.\n\n## Commit Message Format\n\n```\n\u003ctype\u003e: \u003cemoji\u003e\u003cmessage\u003e\n\u003cdetailed description\u003e\n```\n\nExample:\n```\nfeat: ✨Add user authentication\nImplement OAuth2 login flow with Google and GitHub providers\n```\n\n## Supported Commit Types and Emojis\n\n| Type                        | Emoji             |\n|-----------------------------|-------------------|\n| Initial commit              | 🎉 `:tada:`        |\n| Version tag                 | 🔖 `:bookmark:`    |\n| New feature                 | ✨ `:sparkles:`     |\n| Bugfix                      | 🐛 `:bug:`         |\n| Metadata                    | 📇 `:card_index:`  |\n| Documentation               | 📚 `:books:`       |\n| Documenting source code     | 💡 `:bulb:`        |\n| Performance                 | 🐎 `:racehorse:`   |\n| Cosmetic                    | 💄 `:lipstick:`    |\n| Tests                       | 🚨 `:rotating_light:` |\n| Adding a test               | ✅ `:white_check_mark:` |\n| Make a test pass            | ✔️ `:heavy_check_mark:` |\n| General update              | ⚡ `:zap:`          |\n| Improve format/structure    | 🎨 `:art:`         |\n| Refactor code               | 🔨 `:hammer:`      |\n| Removing code/files         | 🔥 `:fire:`        |\n| Continuous Integration      | 💚 `:green_heart:` |\n| Security                    | 🔒 `:lock:`        |\n| Upgrading dependencies      | ⬆️ `:arrow_up:`     |\n| Downgrading dependencies    | ⬇️ `:arrow_down:`   |\n| Lint                        | 👕 `:shirt:`       |\n| Translation                 | 👽 `:alien:`       |\n| Text                        | ✏️ `:pencil:`       |\n| Critical hotfix             | 🚑 `:ambulance:`   |\n| Deploying stuff             | 🚀 `:rocket:`      |\n| Fixing on MacOS             | 🍎 `:apple:`       |\n| Fixing on Linux             | 🐧 `:penguin:`     |\n| Fixing on Windows           | 🏁 `:checkered_flag:` |\n| Work in progress            | 🚧 `:construction:` |\n| Adding CI build system      | 👷 `:construction_worker:` |\n| Analytics or tracking code  | 📈 `:chart_with_upwards_trend:` |\n| Removing a dependency       | ➖ `:heavy_minus_sign:` |\n| Adding a dependency         | ➕ `:heavy_plus_sign:` |\n| Docker                      | 🐳 `:whale:`        |\n| Configuration files         | 🔧 `:wrench:`       |\n| Package.json in JS          | 📦 `:package:`      |\n| Merging branches            | 🔀 `:twisted_rightwards_arrows:` |\n| Bad code / needs improvement| 💩 `:hankey:`       |\n| Reverting changes           | ⏪ `:rewind:`       |\n| Breaking changes            | 💥 `:boom:`         |\n| Code review changes         | 👌 `:ok_hand:`      |\n| Accessibility               | ♿ `:wheelchair:`   |\n| Move/rename repository      | 🚚 `:truck:`        |\n\n## Configuration\n\nThe tool currently uses \"gemma3\" as the default model. You can modify the source code to use different Ollama models.\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. Contributions are very welcome!! 😄\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinodnimbalkar%2Fgcm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinodnimbalkar%2Fgcm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinodnimbalkar%2Fgcm/lists"}