{"id":15042364,"url":"https://github.com/ali-hv/comsu","last_synced_at":"2025-10-12T00:08:04.795Z","repository":{"id":255493120,"uuid":"851015044","full_name":"ali-hv/comsu","owner":"ali-hv","description":"A CLI tool for generating commit messages using Google Generative AI","archived":false,"fork":false,"pushed_at":"2024-10-22T08:40:55.000Z","size":386,"stargazers_count":92,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T07:07:40.702Z","etag":null,"topics":["ai","bash","commit","gemini","generative-ai","git","google"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ali-hv.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-09-02T09:11:35.000Z","updated_at":"2025-03-08T09:12:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad0ba3bd-587e-479f-835a-6f78aa7f51e0","html_url":"https://github.com/ali-hv/comsu","commit_stats":null,"previous_names":["ali-hv/comsu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-hv%2Fcomsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-hv%2Fcomsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-hv%2Fcomsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-hv%2Fcomsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali-hv","download_url":"https://codeload.github.com/ali-hv/comsu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"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","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","bash","commit","gemini","generative-ai","git","google"],"created_at":"2024-09-24T20:47:10.515Z","updated_at":"2025-10-12T00:08:04.790Z","avatar_url":"https://github.com/ali-hv.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/ali-hv/comsu/blob/main/assets/logo.png\"\u003e\n      \u003cimg src=\"https://github.com/ali-hv/comsu/blob/main/assets/logo.png\" alt=\"Comsu\" width=\"400\"\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e🚀 AI-Powered(wrapper) Commit Message Generator\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://img.shields.io/badge/License-GPLv3-blue.svg\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-GPLv3-blue.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/badge/Shell-Bash-green.svg\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Shell-Bash-green.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/badge/AI-Google%20Generative%20AI-yellow.svg\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/AI-Google%20Generative%20AI-yellow.svg\" /\u003e\n    \u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/ali-hv/comsu/blob/main/assets/screenshot-1.png\"\u003e\n      \u003cimg src=\"https://github.com/ali-hv/comsu/blob/main/assets/screenshot-1.png\" alt=\"Comsu\" width=\"700\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n**Comsu** is a simple yet powerful command-line tool that leverages Google Generative AI to suggest high-quality, concise commit messages based on your staged changes in Git. Automate the process of writing meaningful commit messages and ensure consistency across your project.\n\n---\n\n## Table of Contents\n\n* [Features](#-features)\n* [Installation](#-installation)\n* [Usage](#-usage)\n* [Contributing](#-contributing)\n* [Show your support](#-show-your-support)\n\n---\n\n## 🌟 Features\n\n- **Automated Commit Messages**: Generate commit messages based on your staged changes using Google's AI model.\n- **Auto Commit**: It can automatically commit your changes with your selected commit message. \n- **Supports Conventional Commit Types**: Suggestions follow the standard commit types (`feat`, `fix`, `build`, `chore`, etc.).\n- **Easy Setup**: One-command installation to get started.\n- **Customizable Prompts**: Modify the prompt file to tailor the AI suggestions to your specific project needs.\n\n---\n\n## 📦 Installation\n\n\u003cdetails\u003e\n  \u003csummary\u003eLinux\u003c/summary\u003e\n\nTo set up **Comsu** on your Linux system, follow these steps:\n\n1. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/ali-hv/comsu.git\n    cd comsu\n    ```\n\n2. **Run the Installation Script**:\n    ```bash\n    chmod +x install.sh\n    sudo ./install.sh\n    ```\n\n3. **Set Your API Key**:\n\n    Make sure you have your Google AI Studio API key set as an environment variable. If you don’t have one, you can create a free API key [here](https://aistudio.google.com/app/apikey).\n    ```bash\n    export GOOGLE_AI_STUDIO_API_KEY=\"your_api_key_here\"\n    ```\n\n   You can add this line to your `~/.bashrc` or `~/.zshrc` to make it persistent.\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eWindows\u003c/summary\u003e\n\nTo set up **Comsu** on your Windows system, follow these steps:\n\n1. **Clone the Repository**:\n   open powershell as administrator, then write these commands:\n    ```powershell\n    git clone https://github.com/ali-hv/comsu.git\n    cd comsu\n    ```\n\n3. **Run the Installation Script**:\n    ```powershell\n    powershell -ExecutionPolicy Bypass -File install.ps1\n    ```\n\n4. **Set Your API Key**:\n\n    Make sure you have your Google AI Studio API key set as an environment variable. If you don’t have one, you can create a free API key [here](https://aistudio.google.com/app/apikey).\n   \n    `Temporary Session Setting`: This method sets the environment variable only for the duration of your current Command Prompt session:\n    ```powershell\n    set GOOGLE_AI_STUDIO_API_KEY=your_api_key_here\n    ```\n    `Persistent Setting`: To make the environment variable persistent across sessions, you can use the following method, which sets the environment variable permanently for your user profile:\n    ```powershell\n    setx GOOGLE_AI_STUDIO_API_KEY \"your_api_key_here\"\n    ```\n   \n\u003c/details\u003e\n\n---\n\n## 🚀 Usage\n\nOnce installed, you can run **Comsu** from any directory where you have staged changes:\n\n\u003cdetails\u003e\n  \u003csummary\u003eLinux\u003c/summary\u003e\n\n  ```bash\n  git comsu\n  ```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eWindows\u003c/summary\u003e\n\n  Run this in the cmd:\n  ```cmd\n  git-comsu\n  ```\n\u003c/details\u003e\n\n**If you live in countries restricted by Google, you may want to use a VPN or change your DNS.**\n\nThis will generate a list of suggested commit messages based on your changes and you can choose the message you want, then it will automatically commit your changes with that message. If you don't like any of the messages, you can type 'x' to exit.\n\n**Example**\n\n```bash\ngit add .\ngit comsu\n```\n\n**Output**:\n\n```\nGenerating the commit messages based on your changes ...\n\n1. ref: Refactor the send_email function for efficiency\n2. ref: Update the send_email to reduce processing time\n3. feat: Use new method for getting the changes in send_email\n\nWrite the message number you want to use (write 'x' to exit): 1\n\n[main 6b25961] ref: Refactor the send_email function for efficiency\n 1 file changed, 1 deletion(-)\n\nCommitted successfully.\n```\n\n---\n\n## ⚙️ Configuration\n\n\nThe prompt used to generate the commit messages is stored in a file named prompt located at /usr/local/share/git-comsu/prompt. You can modify this file to change the way AI generates the commit messages.\n\n---\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the issues page.\n\n1. Fork the repository.\n2. Create your feature branch (git checkout -b feature/new-feature).\n3. Commit your changes (git commit -m 'Add some feature').\n4. Push to the branch (git push origin feature/new-feature).\n5. Open a Pull Request.\n\n---\n\n## 🌟 Show your support\n\nIf you find this tool helpful, please give a ⭐ to the repository!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-hv%2Fcomsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali-hv%2Fcomsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-hv%2Fcomsu/lists"}