{"id":20482088,"url":"https://github.com/uk0/aicommit-shell","last_synced_at":"2025-04-13T14:14:04.406Z","repository":{"id":183615075,"uuid":"670457874","full_name":"uk0/aicommit-shell","owner":"uk0","description":"\"AI Commit Message Tool uses AI to automatically generate concise and professional Git commit messages, which you can then edit and confirm interactively.\"  ｜  \"AI Commit Message Tool 使用人工智能自动生成简洁专业的 Git 提交信息，然后您可以交互式地编辑并确认。\"","archived":false,"fork":false,"pushed_at":"2025-03-19T10:09:03.000Z","size":1924,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T14:13:14.068Z","etag":null,"topics":["ai-commits","chatgpt","gpt4","openai","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uk0.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-07-25T05:23:01.000Z","updated_at":"2025-03-19T10:09:07.000Z","dependencies_parsed_at":"2024-11-15T16:21:35.174Z","dependency_job_id":null,"html_url":"https://github.com/uk0/aicommit-shell","commit_stats":null,"previous_names":["uk0/aicommit-shell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Faicommit-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Faicommit-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Faicommit-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uk0%2Faicommit-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uk0","download_url":"https://codeload.github.com/uk0/aicommit-shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724629,"owners_count":21151561,"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-commits","chatgpt","gpt4","openai","shell"],"created_at":"2024-11-15T16:11:26.232Z","updated_at":"2025-04-13T14:14:04.394Z","avatar_url":"https://github.com/uk0.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Commit Generator(mini)\n\n该脚本利用了 OpenAI 的 GPT-4o 模型来生成专业且简洁的 Git Commit 信息。\n\n\n## Quick Start\n\n```bash\nwget -O /usr/local/bin/cmm https://raw.githubusercontent.com/uk0/aicommit-shell/main/cmm.sh \u0026\u0026 chmod +x /usr/local/bin/cmm\n```\n\n## 功能\n\n- 根据 Git Diff 生成详细的 commit 信息\n- 使用 GPT-4o 生成的描述以帮助分析文件名以生成 commit 信息\n- 每个 commit 信息最长不超过 128 个字符，一次最多生成 5 条信息\n\n## 使用方法\n\n1. 首先，需要在您的环境变量中设置 `OPENAI_API_KEY`，这是你从 OpenAI 平台获取的 API 密钥。\n\n   ```bash\n   export OPENAI_API_KEY=your-api-key\n   ```\n\n2. 运行脚本。脚本会获取当前目录下的 Git 状态，然后发送请求到 OpenAI 平台，最后返回生成的 commit 信息。\n\n   ```bash\n    # 你可以将脚本放到 /usr/local/bin/cmm \n    # cp ./cmm.sh /usr/local/bin/cmm \u0026\u0026 chmod +x /usr/local/bin/cmm  \n    # 在任意包含git管理的项目下使用 cmm\n    ❯ cmm             \n        \n   ```\n\n## 注意事项\n\n- 确保在你的工作目录下运行该脚本，因为它会获取当前目录下的 Git 状态。\n- 脚本运行需要 `jq` 和 `curl`,`vim`。如果你的系统中没有这三个工具，需要先进行安装。\n- 该脚本目前只支持英文的文件名分析。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuk0%2Faicommit-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuk0%2Faicommit-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuk0%2Faicommit-shell/lists"}