{"id":14064817,"url":"https://github.com/tom-doerr/chatgpt_commit_message_hook","last_synced_at":"2025-05-07T01:10:58.706Z","repository":{"id":106087562,"uuid":"609228782","full_name":"tom-doerr/chatgpt_commit_message_hook","owner":"tom-doerr","description":"Enhance your git workflow using AI-generated commit messages from ChatGPT. Seamless integration for a well-documented commit log.","archived":false,"fork":false,"pushed_at":"2023-10-03T12:31:33.000Z","size":37,"stargazers_count":71,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-05T04:52:57.875Z","etag":null,"topics":["chatgpt","git","git-hooks","openai"],"latest_commit_sha":null,"homepage":"","language":"Python","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/tom-doerr.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":"2023-03-03T16:38:46.000Z","updated_at":"2025-01-06T11:03:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5143725-81c0-4f97-9e77-e0fac174184c","html_url":"https://github.com/tom-doerr/chatgpt_commit_message_hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-doerr%2Fchatgpt_commit_message_hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-doerr%2Fchatgpt_commit_message_hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-doerr%2Fchatgpt_commit_message_hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-doerr%2Fchatgpt_commit_message_hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-doerr","download_url":"https://codeload.github.com/tom-doerr/chatgpt_commit_message_hook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793651,"owners_count":21805058,"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":["chatgpt","git","git-hooks","openai"],"created_at":"2024-08-13T07:04:05.942Z","updated_at":"2025-05-07T01:10:58.685Z","avatar_url":"https://github.com/tom-doerr.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e🤖 ChatGPT Commit Message Hook  🪝\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    Let ChatGPT write your commit messages.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/tom-doerr/chatgpt_commit_message_hook/stargazers\"\n        \u003e\u003cimg\n            src=\"https://img.shields.io/github/stars/tom-doerr/chatgpt_commit_message_hook?colorA=2c2837\u0026colorB=c9cbff\u0026style=for-the-badge\u0026logo=starship style=flat-square\"\n            alt=\"Repository's starts\"\n    /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tom-doerr/chatgpt_commit_message_hook/issues\"\n        \u003e\u003cimg\n            src=\"https://img.shields.io/github/issues-raw/tom-doerr/chatgpt_commit_message_hook?colorA=2c2837\u0026colorB=f2cdcd\u0026style=for-the-badge\u0026logo=starship style=flat-square\"\n            alt=\"Issues\"\n    /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tom-doerr/chatgpt_commit_message_hook/blob/main/LICENSE\"\n        \u003e\u003cimg\n            src=\"https://img.shields.io/github/license/tom-doerr/chatgpt_commit_message_hook?colorA=2c2837\u0026colorB=b5e8e0\u0026style=for-the-badge\u0026logo=starship style=flat-square\"\n            alt=\"License\"\n    /\u003e\u003cbr /\u003e\n    \u003ca href=\"https://github.com/tom-doerr/chatgpt_commit_message_hook/commits/main\"\n\t\t\u003e\u003cimg\n\t\t\tsrc=\"https://img.shields.io/github/last-commit/tom-doerr/chatgpt_commit_message_hook/main?colorA=2c2837\u0026colorB=ddb6f2\u0026style=for-the-badge\u0026logo=starship style=flat-square\"\n\t\t\talt=\"Latest commit\"\n    /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tom-doerr/chatgpt_commit_message_hook\"\n        \u003e\u003cimg\n            src=\"https://img.shields.io/github/repo-size/tom-doerr/chatgpt_commit_message_hook?colorA=2c2837\u0026colorB=89DCEB\u0026style=for-the-badge\u0026logo=starship style=flat-square\"\n            alt=\"GitHub repository size\"\n    /\u003e\u003c/a\u003e\n\n   \u003c!--\u003cimg src=\"https://badges.pufler.dev/visits/tom-doerr/chatgpt_commit_message_hook?style=for-the-badge\u0026color=96CDFB\u0026logoColor=white\u0026labelColor=302D41\"/\u003e--\u003e\n\n\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src='https://github.com/tom-doerr/bins/raw/main/chatgpt_commit_message_hook/cc6.gif'\u003e\n    \u003cp align=\"center\"\u003e\n        ChatGPT will provide a suggestion for the commit message.\n    \u003c/p\u003e\n\u003c/p\u003e\n\n\n\n\n\n\n# ChatGPT Commit Message Hook\n## What is it?\nThis is a hook for git that generates commit messages.\nIt uses [OpenAI's ChatGPT](https://openai.com/blog/chatgpt)\nto generate commit messages.\n\n## How do I install it?\n### Setup\n1. Install packages (`pip install -r requirements.txt`).\n2. Create a file at `$XDG_CONFIG_HOME/openaiapirc` with your API keys.\n3. [optional] Add proxy server settings to the config file. Http proxy is supported only.\n4. [optional] The maximum number of changed lines in a commit. If the number of changed lines is greater than this value, the hook will send the result of git diff --cached --stat, otherwise it will send git diff --cached. The default value is 80.\n\nFor example:\n```\n[openai]\nsecret_key = MY_SECRET_KEY\nproxy= HTTP_PROXY\nmax_changed_lines=80\n```\n5. Install the hook:\n```\ngit clone https://github.com/jsfs2019/chatgpt_commit_message_hook\ncd chatgpt_commit_message_hook\nsudo make install\n```\n\nThis will set up the hook for all new repositories. \nTo add the hook to an existing repository, run `git init`.\n\n## How does it work?\nThe hook gets the current commit message, runs ChatGPT to generate a new commit\nmessage, and then replaces the current commit message with the generated message.\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-doerr%2Fchatgpt_commit_message_hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-doerr%2Fchatgpt_commit_message_hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-doerr%2Fchatgpt_commit_message_hook/lists"}