{"id":13423977,"url":"https://github.com/guanguans/ai-commit","last_synced_at":"2025-05-14T23:04:45.638Z","repository":{"id":65668090,"uuid":"595042098","full_name":"guanguans/ai-commit","owner":"guanguans","description":"Automagically generate conventional git commit messages with AI. - 使用 AI 自动生成约定式 git 提交信息。","archived":false,"fork":false,"pushed_at":"2025-05-03T12:32:34.000Z","size":121454,"stargazers_count":387,"open_issues_count":0,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-10T15:52:03.866Z","etag":null,"topics":["ai","bito","changelog","chat","chatgpt","commit","commit-message","commitizen","commitlint","conventional","conventional-commit","copilot","git","git-diff","github","gpt","keepachangelog","model","models","openai"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/guanguans.png","metadata":{"files":{"readme":"README-ja.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"guanguans","custom":"https://www.guanguans.cn/images/wechat.jpeg"}},"created_at":"2023-01-30T09:20:01.000Z","updated_at":"2025-05-03T12:32:38.000Z","dependencies_parsed_at":"2023-12-22T22:20:35.934Z","dependency_job_id":"b2c16a4a-b68a-41b9-98e0-e8fcce5d8a0b","html_url":"https://github.com/guanguans/ai-commit","commit_stats":{"total_commits":677,"total_committers":5,"mean_commits":135.4,"dds":0.5480059084194978,"last_synced_commit":"5179b266f1780122d580b65cbde85967f1665ba6"},"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fai-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fai-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fai-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guanguans%2Fai-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guanguans","download_url":"https://codeload.github.com/guanguans/ai-commit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243358,"owners_count":22038046,"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","bito","changelog","chat","chatgpt","commit","commit-message","commitizen","commitlint","conventional","conventional-commit","copilot","git","git-diff","github","gpt","keepachangelog","model","models","openai"],"created_at":"2024-07-31T00:00:46.069Z","updated_at":"2025-05-14T23:04:40.606Z","avatar_url":"https://github.com/guanguans.png","language":"PHP","readme":"# ai-commit\n\n[//]: # (https://looka.com)\n\n[//]: # (\u003cp align=\"center\"\u003e\u003cimg src=\"resources/docs/logo.png\" alt=\"logo\" style=\"width: 62%; height: 62%;\"\u003e\u003c/p\u003e)\n\u003cp align=\"center\"\u003e\u003cimg src=\"resources/docs/ai-commit-vhs.gif\" alt=\"ai-commit-vhs\"\u003e\u003c/p\u003e\n\n[ENGLISH](README.md) | [日本語](README-ja.md) | [简体中文](README-zh_CN.md) | [繁體中文](README-zh_TW.md)\n\n\u003e Automagically generate conventional git commit message with AI. - 使用 AI 自动生成约定式 git 提交信息。\n\n[![tests](https://github.com/guanguans/ai-commit/workflows/tests/badge.svg)](https://github.com/guanguans/ai-commit/actions)\n[![check \u0026 fix styling](https://github.com/guanguans/ai-commit/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/guanguans/ai-commit/actions)\n[![codecov](https://codecov.io/gh/guanguans/ai-commit/branch/main/graph/badge.svg?token=URGFAWS6S4)](https://codecov.io/gh/guanguans/ai-commit)\n[![Latest Stable Version](https://poser.pugx.org/guanguans/ai-commit/v)](https://packagist.org/packages/guanguans/ai-commit)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/guanguans/ai-commit)](https://github.com/guanguans/ai-commit/releases/latest)\n[![Total Downloads](https://poser.pugx.org/guanguans/ai-commit/downloads)](https://packagist.org/packages/guanguans/ai-commit)\n[![License](https://poser.pugx.org/guanguans/ai-commit/license)](https://packagist.org/packages/guanguans/ai-commit)\n\n## サポート\n\n- [x] [Bito Cli](https://github.com/gitbito/CLI)\n- [x] [ERNIE-Bot-turbo](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot-turbo)\n- [x] [ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot)\n- [x] [GitHub Copilot CLI](https://github.com/github/gh-copilot)\n- [x] [GitHub Models CLI](https://github.com/github/gh-models)\n- [x] [Moonshot](https://platform.moonshot.cn/docs/api-reference)\n- [x] [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat)\n- [x] [OpenAI](https://platform.openai.com/docs/api-reference/completions)\n- [ ] ...\n\n## 必要条件\n\n* PHP \u003e= 7.3\n\n## インストール\n\n### [ai-commit](./builds/ai-commit) ファイルを直接ダウンロード\n\n```shell\ncurl 'https://raw.githubusercontent.com/guanguans/ai-commit/main/builds/ai-commit' -o ai-commit -#\nchmod +x ai-commit\n```\n\n### Composer を使用してインストール\n\n```shell\ncomposer global require guanguans/ai-commit --dev -v # グローバル\ncomposer require guanguans/ai-commit --dev -v # ローカル\n```\n\n## 使用方法\n\n### クイックスタート\n\n\u003cdetails\u003e\n\u003csummary\u003edetails\u003c/summary\u003e\n\n```shell\n./ai-commit config set generators.bito_cli.binary bito-cli-binary... --global # Config Bito CLI binary(Optional)\n./ai-commit config set generators.ernie_bot.api_key api-key... --global # Config Ernie API key\n./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # Config Ernie API key\n./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)\n./ai-commit config set generators.github_models_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)\n./ai-commit config set generators.moonshot.api_key sk-... --global # Config Moonshot API key\n./ai-commit config set generators.openai.api_key sk-... --global # Config OpenAI API key\n./ai-commit config set generators.openai_chat.api_key sk-... --global # Config OpenAI API key\n\n./ai-commit config set generator openai_chat --global # Config default generator(Optional)\n./ai-commit commit # Generate and commit message using the default generator\n./ai-commit commit --generator=github_copilot_cli # Generate and commit message using the specified generator\n```\n\n```shell\n╰─ ./ai-commit commit --generator=bito_cli --no-edit --no-verify --ansi                                                                                                      ─╯\n1. Generating commit message: generating...\n\n Please choose commit type [Automatically generate commit type]:\n  [auto    ] Automatically generate commit type\n  [feat    ] A new feature\n  [fix     ] A bug fix\n  [docs    ] Documentation only changes\n  [style   ] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\n  [refactor] A code change that neither fixes a bug nor adds a feature\n  [perf    ] A code change that improves performance\n  [test    ] Adding missing tests or correcting existing tests\n  [build   ] Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)\n  [ci      ] Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)\n  [chore   ] Other changes that don't modify src or test files\n  [revert  ] Reverts a previous commit\n \u003e chore\n\n  RUN  'bito'\n  ERR  Model in use: BASIC\n  ERR  \n  ERR  \n  OUT  {\n  OUT      \"subject\": \"chore(ai-commit): update tape and gif resources\",\n  OUT      \"body\": \"- Adjusted width and height settings in ai-commit.tape\\n- Changed commit command generator from openai_chat to bito_cli\\n- Updated ai-commit-vhs.gif file with new binary data\"\n  OUT  }\n  OUT  \n  OUT  \n  RES  Command ran successfully\n1. Generating commit message: ✔\n\n2. Confirming commit message: confirming...\n+-------------------------------------------------+-----------------------------------------------------------------+\n| subject                                         | body                                                            |\n+-------------------------------------------------+-----------------------------------------------------------------+\n| chore(ai-commit): update tape and gif resources | - Adjusted width and height settings in ai-commit.tape          |\n|                                                 | - Changed commit command generator from openai_chat to bito_cli |\n|                                                 | - Updated ai-commit-vhs.gif file with new binary data           |\n+-------------------------------------------------+-----------------------------------------------------------------+\n\n Do you want to commit this message? (yes/no) [yes]:\n \u003e \n\n\n2. Confirming commit message: ✔\n\n3. Committing message: committing...\n\n3. Committing message: ✔\n\n                                                                                                                        \n [OK] Successfully generated and committed message.                                                                     \n                                                                                                                                                                                                                                                                                                                                                                                                      \n```\n\n![](resources/docs/ai-commit-vhs.gif)\n\n\u003c/details\u003e\n\n### コマンドの一覧\n\n\u003cdetails\u003e\n\u003csummary\u003edetails\u003c/summary\u003e\n\n```shell\n╰─ ./ai-commit list                                                     ─╯\n\n  \n          _____    _____                          _ _   \n    /\\   |_   _|  / ____|                        (_) |  \n   /  \\    | |   | |     ___  _ __ ___  _ __ ___  _| |_ \n  / /\\ \\   | |   | |    / _ \\| '_ ` _ \\| '_ ` _ \\| | __|\n / ____ \\ _| |_  | |___| (_) | | | | | | | | | | | | |_ \n/_/    \\_\\_____|  \\_____\\___/|_| |_| |_|_| |_| |_|_|\\__|\n                                                        \n                                                        \n\n  1.2.5\n\n  USAGE: ai-commit \u003ccommand\u003e [options] [arguments]\n\n  commit      Automagically generate conventional commit message with AI.\n  completion  Dump the shell completion script\n  config      Manage config options.\n  self-update Allows to self-update a build application\n  thanks      Thanks for using this tool.\n```\n\n\u003c/details\u003e\n\n### 設定の操作\n\n\u003cdetails\u003e\n\u003csummary\u003edetails\u003c/summary\u003e\n\n```shell\n./ai-commit config [set, get, unset, reset, list, edit] key value --global\n\n./ai-commit config set key value\n./ai-commit config get key\n./ai-commit config unset key\n./ai-commit config reset key\n./ai-commit config list\n./ai-commit config edit\n```\n\n\u003c/details\u003e\n\n### 自己更新\n\n\u003cdetails\u003e\n\u003csummary\u003edetails\u003c/summary\u003e\n\n```shell\n╰─ ./ai-commit self-update                                        ─╯\n\nChecking for a new version...\n=============================\n\n                                                                     \n [OK] Updated from version 1.2.4 to v1.2.5.                          \n                                                                     \n```\n\n\u003c/details\u003e\n\n### コマンドヘルプ\n\n\u003cdetails\u003e\n\u003csummary\u003edetails\u003c/summary\u003e\n\n```shell\n╰─ ./ai-commit commit --help                                                                                                                               ─╯\nDescription:\n  Automagically generate conventional commit message with AI.\n\nUsage:\n  commit [options] [--] [\u003cpath\u003e]\n\nArguments:\n  path                                   The working directory [default: \"/Users/yaozm/Documents/develop/ai-commit\"]\n\nOptions:\n      --commit-options[=COMMIT-OPTIONS]  Append options for the `git commit` command [default: [\"--edit\"]] (multiple values allowed)\n      --diff-options[=DIFF-OPTIONS]      Append options for the `git diff` command [default: [\":!*-lock.json\",\":!*.lock\",\":!*.sum\"]] (multiple values allowed)\n  -g, --generator=GENERATOR              Specify generator name [default: \"openai_chat\"]\n  -p, --prompt=PROMPT                    Specify prompt name of message generated [default: \"conventional\"]\n      --no-edit                          Enable or disable git commit `--no-edit` option\n      --no-verify                        Enable or disable git commit `--no-verify` option\n  -c, --config[=CONFIG]                  Specify config file\n      --retry-times=RETRY-TIMES          Specify times of retry [default: 3]\n      --retry-sleep=RETRY-SLEEP          Specify sleep milliseconds of retry [default: 200]\n      --dry-run                          Only generate message without commit\n      --diff[=DIFF]                      Specify diff content\n  -h, --help                             Display help for the given command. When no command is given display help for the list command\n  -q, --quiet                            Do not output any message\n  -V, --version                          Display this application version\n      --ansi|--no-ansi                   Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction                   Do not ask any interactive question\n      --env[=ENV]                        The environment the command should run under\n  -v|vv|vvv, --verbose                   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n\n\u003c/details\u003e\n\n## テスト\n\n```shell\ncomposer test\n```\n\n## 変更履歴\n\n最近の変更については、[CHANGELOG](CHANGELOG.md) を参照してください。\n\n## 貢献\n\n詳細については、[CONTRIBUTING](.github/CONTRIBUTING.md) を参照してください。\n\n## セキュリティ脆弱性\n\nセキュリティ脆弱性の報告方法については、[セキュリティポリシー](../../security/policy) をご覧ください。\n\n## クレジット\n\n* [guanguans](https://github.com/guanguans)\n* [すべての貢献者](../../contributors)\n\n## ライセンス\n\nMIT ライセンス（MIT）。詳細については、[ライセンスファイル](LICENSE) を参照してください。\n","funding_links":["https://patreon.com/guanguans","https://www.guanguans.cn/images/wechat.jpeg"],"categories":["Uncategorized","Tools \u0026 Utilities","CLI tools","Openai","Assistants","Developer Libraries, SDKs, and APIs","PHP","🤖 ChatGPT Agents","Thanks to all the contributors!","Command Line Tools","UIs","Projects using Laravel Zero"],"sub_categories":["Uncategorized","Tokenizers \u0026 Prompt Utilities","Examples","PHP","Other","Creative \u0026 Content","CLI tools","Utilities \u0026 Tools","Command-line(shell) interface"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Fai-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguanguans%2Fai-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguanguans%2Fai-commit/lists"}