{"id":30851682,"url":"https://github.com/mingcheng/aigitcommit","last_synced_at":"2025-09-07T07:42:23.906Z","repository":{"id":280403333,"uuid":"941871222","full_name":"mingcheng/aigitcommit","owner":"mingcheng","description":"A simple tool to help you write better Git commit messages using AI.","archived":false,"fork":false,"pushed_at":"2025-08-29T20:55:15.000Z","size":563,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T18:56:13.851Z","etag":null,"topics":["ai-agents","ai-tools","command-line","enhancement","git","git-tools"],"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/mingcheng.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":"2025-03-03T07:33:33.000Z","updated_at":"2025-07-11T11:44:20.000Z","dependencies_parsed_at":"2025-03-03T08:32:18.155Z","dependency_job_id":"1ad73678-5e0a-4b21-aa02-ea355af1cba5","html_url":"https://github.com/mingcheng/aigitcommit","commit_stats":null,"previous_names":["mingcheng/aigitcommit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mingcheng/aigitcommit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingcheng%2Faigitcommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingcheng%2Faigitcommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingcheng%2Faigitcommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingcheng%2Faigitcommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingcheng","download_url":"https://codeload.github.com/mingcheng/aigitcommit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingcheng%2Faigitcommit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274010099,"owners_count":25206763,"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-09-07T02:00:09.463Z","response_time":67,"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-agents","ai-tools","command-line","enhancement","git","git-tools"],"created_at":"2025-09-07T07:42:21.718Z","updated_at":"2025-09-07T07:42:23.887Z","avatar_url":"https://github.com/mingcheng.png","language":"Rust","readme":"# AIGitCommit\n\n[![Cargo Build \u0026 Test](https://github.com/mingcheng/aigitcommit/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/mingcheng/aigitcommit/actions/workflows/rust.yml)\n\n![screenshots](./assets/screenshots.png)\n\nA simple tool to help you write better Git commit messages using AI.\n\n## Features\n\n- Generates meaningful commit messages based on your code changes\n- It allows you to commit straight to the repository and integrate with the Git workflow.\n- The created message can be copied to the clipboard.\n- Easy-to-use command-line interface\n- By using the libgit2 library, there is no need to call an external command for security reasons\n- The system supports multiple AI models that are compatible with the OpenAI API\n- Auto sign-off commit messages, if specified environment is set to `true`\n- Socks5 and HTTP proxy supported\n\n## How It Works\n\nAIGitCommit looks at your Git staged changes and uses AI to make commit lines that are clear and helpful.\n\nIt looks at the diff result and uses machine learning to figure out what your changes were meant to do and why you made them. It then generates a commit message that is clear and helpful.\n\n## Install\n\nAIGitCommit is still in the early stages of development, I suggest you to install it using the git URL using the commands below:\n\n```\ncargo install --git https://github.com/mingcheng/aigitcommit.git\n```\n\nor, You can install from [crates.io](https://crates.io/crates/aigitcommit)\n\n```\ncargo install aigitcommit\n```\n\nThose command will auto-download the latest version of the project and install it to your cargo bin directory.\n\n## Configuration\n\nInitially, you must configure your `OPENAI_*` environment variables to request prompts from an OpenAI-compatible API service. Set them as follows in your shell configuration file:\n\n- `OPENAI_API_TOKEN`: Your individual OpenAI token\n- `OPENAI_API_BASE`: Your specified openAI request base\n- `OPENAI_MODEL_NAME`: Give the model name you wish to request\n- `OPENAI_API_PROXY`: The proxy address if you need to use a proxy\n- `GIT_AUTO_SIGNOFF`: If you want to sign off your commit messages, set this variable to `true`\n\nIf your network requirements a proxy to access the API service, you must specify the proxy address using the `OPENAI_API_PROXY` environment variable.\n\nFor instance, `http://127.0.0.1:1080` is suitable for an HTTP proxy, while `socks://127.0.0.1:1086` is an appropriate choice for a Socks5 proxy.\n\n## Usage\n\nThe way to use AIGitComment is really simple. For example, you can run `aigitcoment` in the current directory after staging the file to have git commits generated automatically before git commit. Additionally, you may provide the git directory using `aigitcommit \u003cdir\u003e`.\n\n1. You can use `--commit` parameters to commit the changes straight to the repository.\n2. Or you may just copy the commit message to the clipboard by using `--copy`.\n\nIf you would like more usage settings, just use `aigitcommit --help` to get more details.\n\n### Docker Image\n\nYou can also utilise the Docker image without installing the binary executable file.\n\nSimply enter the subsequent command or reference the `compose.yaml` file.\n\n```bash\ndocker run \\\n  --rm \\\n  -v $PWD:/repo:ro \\\n  -e OPENAI_API_BASE='\u003capi base\u003e' \\\n  -e OPENAI_API_TOKEN='\u003capi token\u003e' \\\n  -e OPENAI_MODEL_NAME='\u003cmodel name\u003e' \\\n  -e OPENAI_API_PROXY='\u003cthe proxy address if you need\u003e' \\\n  ghcr.io/mingcheng/aigitcommit\n```\n\nNotice: If you wish to utilise the `--commit` option, you must ensure that the `/repo` directory is writable:\n\n```bash\ndocker run \\\n  --rm \\\n  -it \\\n  -v $PWD:/repo:rw \\\n  -e OPENAI_API_BASE='\u003capi base\u003e' \\\n  -e OPENAI_API_TOKEN='\u003capi token\u003e' \\\n  -e OPENAI_MODEL_NAME='\u003cmodel name\u003e' \\\n  -e OPENAI_API_PROXY='\u003cthe proxy address if you need\u003e' \\\n  ghcr.io/mingcheng/aigitcommit --commit\n```\n\nTips: You can add `--yes` options to skip the confirm.\n\n### Git Hook\n\nThe `AIGitCommit` also supports git hooks. To integrate the hook, simply copy the `hooks/prepare-commit-msg` file into the repository's `.git/hooks/prepare-commit-msg`, and you're done.\n\nYou can make it global by using Git's `core.hooksPath` instead of setting it up per repository.\n\n```\n# Create global hooks directory\nmkdir -p ~/.git-hooks\n\n# Copy the script contents above into this file\nvim ~/.git-hooks/prepare-commit-msg  # Or use your preferred editor\n\n# Make the script executable\nchmod +x ~/.git-hooks/prepare-commit-msg\n\n# Configure Git to use global hooks\ngit config --global core.hooksPath ~/.git-hooks\n```\n\nNow every repository automatically gets `AIGitCommit` commit messages, just use `git commit` command.\n\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n`- eof -`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingcheng%2Faigitcommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingcheng%2Faigitcommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingcheng%2Faigitcommit/lists"}