{"id":13471685,"url":"https://github.com/nguyenvanduocit/ai-commit","last_synced_at":"2025-05-12T16:14:02.222Z","repository":{"id":65656001,"uuid":"596629018","full_name":"nguyenvanduocit/ai-commit","owner":"nguyenvanduocit","description":"CLI tool that use ChatGPT to generate commit message for your git repo.","archived":false,"fork":false,"pushed_at":"2023-03-29T18:54:18.000Z","size":2022,"stargazers_count":103,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T13:39:16.598Z","etag":null,"topics":["ai-commit","automa","chatgpt","cli","git","git-commit","openai"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nguyenvanduocit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-02-02T15:48:24.000Z","updated_at":"2025-02-06T14:24:50.000Z","dependencies_parsed_at":"2024-06-22T22:02:01.560Z","dependency_job_id":null,"html_url":"https://github.com/nguyenvanduocit/ai-commit","commit_stats":{"total_commits":119,"total_committers":5,"mean_commits":23.8,"dds":0.5042016806722689,"last_synced_commit":"a5ba7905b4594c49d6da44d2bc1ca0b35212250d"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenvanduocit%2Fai-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenvanduocit%2Fai-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenvanduocit%2Fai-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenvanduocit%2Fai-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nguyenvanduocit","download_url":"https://codeload.github.com/nguyenvanduocit/ai-commit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774581,"owners_count":21962199,"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-commit","automa","chatgpt","cli","git","git-commit","openai"],"created_at":"2024-07-31T16:00:48.219Z","updated_at":"2025-05-12T16:14:02.204Z","avatar_url":"https://github.com/nguyenvanduocit.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![upvote](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=382034\u0026amp;theme=light)](https://www.producthunt.com/posts/ai-commit-2)\n\n\n[![Preview](./stuff/demo.gif)](https://youtu.be/7cVU3BuNpok)\n\n[View Demo](https://youtu.be/7cVU3BuNpok)\n\n\n# ai-commit\n\n\u003e No more headaches with commit messages.\n\nAI-Commit is a command line tool that uses OpenAI's ChatGPT model to generate commit messages for your Git repositories. As a result, you can write meaningful commit messages without having to think about them.\n\n## Prerequisites\n\nTo use AI-Commit, you need to obtain an API key from OpenAI and set it as the value of the `OPENAI_API_KEY` environment variable.\n\n```\nexport OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\nSometime, the ChatGPT's response is not good (too long, too short, not meaningful). In that case, you can try custom the system prompt by set the `AI_COMMIT_SYSTEM_PROMPT` environment variable:\n\n```\nexport AI_COMMIT_SYSTEM_PROMPT=\"You are a GitCommitGPT-4, You will help user to write commit message, commit message should be short (less than 100 chars), clean and meaningful. Only response the message.\"\n```\n\nBy default, ai-commit use model `gpt-3.5-turbo`. You can change it by set the `AI_COMMIT_MODEL` environment variable:\n\n```\nexport AI_COMMIT_MODEL=\"gpt-3.5-turbo\"\n```\n\nNote: Using AI-Commit will result in charges from OpenAI for API usage, so be sure to understand their pricing model before use.\n\n## Install\n\nThere are two ways to install AI-Commit:\n\n### Use go\n\n```bash\ngo install github.com/nguyenvanduocit/ai-commit@latest\n```\n\n### Prebuilt binaries\n\nYou can download prebuilt binaries for Linux, macOS, and Windows from the [releases page](https://github.com/nguyenvanduocit/ai-commit/releases)\n\n## Usage\n\n1. Stage the changes you want to commit in Git.\n2. Run `ai-commit` command.\n3. The tool will generate a commit message and print it to the console.\n4. Now you can chat with the AI to adjust the commit message. Press ctrl + c to stop.\n5. Finally, select the type of commit.\n\n### Auto commit, no interaction\n\nWhen use `-a` flag, ai-commit will auto stage all changes then commit with generated message.\n\n```bash\nai-commit -a\n```\n\n### Auto tag\n\nWhen use `-t` flag, ai-commit will auto create tag based on the commit messages between the last tag and the HEAD.\n\n```bash\nai-commit -t\n```\n\n### Auto push\n\nWhen use `-p` flag, ai-commit will auto push to remote.\n\n```bash\nai-commit -p\n```\n\n## Todo\n\n- [ ] Auto split changes in to multiple commits.\n- [x] Detect commit type.\n- [x] Auto tags?\n\n## License\n\nAI-Commit is released under the MIT license. See LICENSE for more information.\n\n## Contributing\n\nContributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.\n\n[![update](./stuff/vhs.gif)](https://twitter.com/duocdev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenvanduocit%2Fai-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnguyenvanduocit%2Fai-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenvanduocit%2Fai-commit/lists"}