{"id":14964888,"url":"https://github.com/osama-yusuf/gitconvit","last_synced_at":"2026-02-11T19:32:22.796Z","repository":{"id":251369716,"uuid":"837208689","full_name":"Osama-Yusuf/GitConvit","owner":"Osama-Yusuf","description":"GitConvit: AI Conventional Commit Msg Generator.","archived":false,"fork":false,"pushed_at":"2024-08-16T11:43:48.000Z","size":2299,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:51:18.867Z","etag":null,"topics":["bash-script","conventional-commits","git","gum","ollama","python-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Osama-Yusuf.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-08-02T12:51:55.000Z","updated_at":"2024-11-08T15:24:23.000Z","dependencies_parsed_at":"2024-08-16T12:49:08.028Z","dependency_job_id":"bc15ade6-9a6f-4187-bae5-4c85e6a96f4a","html_url":"https://github.com/Osama-Yusuf/GitConvit","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":0.09615384615384615,"last_synced_commit":"29d27e904e92a5f085ea16ed8e2a7e1c59c964c3"},"previous_names":["osama-yusuf/gitconvit-ai-convential-commit-msg-generator","osama-yusuf/gitconvit_ai-convential-commit-msg-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osama-Yusuf%2FGitConvit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osama-Yusuf%2FGitConvit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osama-Yusuf%2FGitConvit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Osama-Yusuf%2FGitConvit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Osama-Yusuf","download_url":"https://codeload.github.com/Osama-Yusuf/GitConvit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238120382,"owners_count":19419763,"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":["bash-script","conventional-commits","git","gum","ollama","python-script"],"created_at":"2024-09-24T13:33:54.301Z","updated_at":"2025-10-25T10:30:45.922Z","avatar_url":"https://github.com/Osama-Yusuf.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n   \u003c!-- \u003ch1\u003eGitConvit\u003c/h1\u003e --\u003e\n    \u003cimg src=\"./logo.png\" alt=\"Profile Image\" style=\"width: 300px; height: 300px; object-fit: cover;\"\u003e\n        \u003cp\u003eGitConvit, an AI-powered tool that generates conventional commit messages with emojis based on the changes in your Git repository.\u003c/p\u003e\n\u003c/div\u003e\n\n---\nThis tool leverages the `llama3:latest` model from `ollama` to create commit messages that follow conventional commit standards, ensuring that your commit history is informative and well-structured.\n\n## Features\n- Automatically detects changes in your Git repository.\n- Generates conventional commit messages with appropriate emojis.\n- Interactive prompt to confirm or regenerate the commit message along other options.\n- Ensures that all changes are committed with a single, informative message.\n\n## Emojis and Categories\n\nThe following categories and emojis are used for generating commit messages:\n\n- `docs`: 📝\n- `feat`: ✨\n- `fix`: 🐛\n- `style`: 🎨\n- `refactor`: 🔨\n- `chore`: 🚀\n- `config`: ⚙️\n\n## Screenshots \n\n![Screenshot 01](img/gc-sc1.png)\n\n![Screenshot 02](img/gc-sc2.png)\n\n![Screenshot 03](img/gc-sc3.png)\n\n\n## Prerequisites\n\n1. **Install `ollama`**:\n   - Download and install `ollama` from [ollama's official website](https://www.ollama.com/download).\n   - Ensure that `ollama` is running and accessible at `http://localhost:11434`.\n   - Pull the `latest` version of the `llama3` model. with the following command:\n        ```bash\n        ollama pull llama3:latest\n        ```\n2. **Install `gum` (Optional for Enhanced UI/UX)**:\n    - If you want to use the `gum` enhanced script:\n      ```bash\n        # macOS or Linux\n        brew install gum\n\n        # Arch Linux (btw)\n        pacman -S gum\n\n        # Windows (via WinGet or Scoop)\n        winget install charmbracelet.gum\n        scoop install charm-gum\n      ```\n    - More installation methods [here](https://github.com/charmbracelet/gum#Installation).\n\n## Why Three Scripts?\n\nTo cater to different user preferences and environments, we provide three versions of the script:\n\n1. **Python Script (`script.py`)**:\n    - For users who prefer Python and want a straightforward approach without additional dependencies.\n\n2. **Bash Script without Dependencies (`script.sh`)**:\n    - For users who prefer a bash script without any additional dependencies. This version has a basic user interface and functionality.\n\n3. **Bash Script with `gum` (`gumscript.sh`)**:\n    - For users who want a significantly enhanced user experience with a modern, interactive UI. This version requires the `gum` tool to be installed.\n\nYou can choose the version that best fits your needs and preferences.\n\n\n## Installation\n\n1. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/Osama-Yusuf/GitConvit.git\n    cd GitConvit\n    ```\n\n2. **Make the Script Executable**:\n    ```bash\n    chmod +x gumscript.sh\n    ```\n\n3. **Install Dependencies**:\n    - Ensure you have `jq` installed for processing JSON responses:\n      ```bash\n      sudo apt-get install jq\n      ```\n\n4. **Add the Script to your bin directory**:\n    ```bash\n    sudo cp gumscript.sh /usr/local/bin/gitconvit\n    ```\n\n## Usage\n\nTo generate and use a conventional commit message, run the script:\n\n```bash\ngitconvit\n```\n\n#### Script Workflow\n\n1. Check if you are in a Git repository.\n2. Detect the changed files.\n3. Generate a commit message using the AI model.\n4. Prompt you to confirm or regenerate the commit message.\n5. Commit and push the changes to your repository.\n\n### Detailed Steps\n\n1. **Check if the Current Directory is a Git Repository**:\n    \n    * The script ensures that the current directory is a Git repository before proceeding.\n2. **Get Changed Files and Diffs**:\n    \n    * The script uses `git diff --name-only` and `git diff` to get the list of changed files and their diffs.\n3. **Generate Commit Message**:\n    \n    * The script sends the changes to the AI model `llama3:latest` from `ollama` to generate a conventional commit message with an appropriate emoji.\n    * The commit message follows the format specified by conventional commits.\n4. **Interactive Confirmation**:\n    \n    * The script prompts you to either accept the generated commit message, regenerate it by pressing `r`, or abort by pressing `CTRL+C`.\n5. **Commit and Push**:\n    \n    * Once confirmed, the script adds all changes, commits them with the generated message, and pushes to the current branch.\n\n## Example\n\nHere is an example of how the commit message might look:\n\n```text\n📝 docs(README.md): added installation method with docker\n```\n\n### Todo\n\n- [ ] Add a flag to select different ollama model than llama3\n- [ ] Add a flag to select different ai model than ollama like openai models or google gemeni or grok\n- [ ] Add a tutorial GIF in the readme file\n- [ ] Add an (add) option that will list all files changed and user can multiselect files with gum/fzf/case\n- [ ] Make the emojis optional\n- [X] Add an option to edit the AI output\n- [X] Add an option to pass a prompt to the initial main prompt\n- [X] Add an option to create the convential commit manually by taking three inputs the category, the context, and a short description\n- [X] Add an option to recreate the AI output\n\n## Contributing\n\nContributions are welcome! Please fork the repository and create a pull request with your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contact\n\nFor any inquiries or support, please contact [Osama Yusuf](https://github.com/Osama-Yusuf).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosama-yusuf%2Fgitconvit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosama-yusuf%2Fgitconvit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosama-yusuf%2Fgitconvit/lists"}