Skip to content

Commit 179cbb1

Browse files
docs(README): Add GitHub Models CLI to documentation
- Include link to GitHub Models CLI in the README - Updated composer.json to include relevant keywords for GitHub Models - Enhance discoverability of the GitHub Models CLI for users - Ensured consistency with other entries listed in the documentation
1 parent 3aefe41 commit 179cbb1

File tree

5 files changed

+105
-70
lines changed

5 files changed

+105
-70
lines changed

README-ja.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [x] [ERNIE-Bot-turbo](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot-turbo)
2222
- [x] [ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot)
2323
- [x] [GitHub Copilot CLI](https://github.com/github/gh-copilot)
24+
- [x] [GitHub Models CLI](https://github.com/github/gh-models)
2425
- [x] [Moonshot](https://platform.moonshot.cn/docs/api-reference)
2526
- [x] [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat)
2627
- [x] [OpenAI](https://platform.openai.com/docs/api-reference/completions)
@@ -55,6 +56,7 @@ composer require guanguans/ai-commit --dev -v # ローカル
5556
./ai-commit config set generators.ernie_bot.api_key api-key... --global # Config Ernie API key
5657
./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # Config Ernie API key
5758
./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # Config Github cli binary(Optional)
59+
./ai-commit config set generators.github_models_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
5860
./ai-commit config set generators.moonshot.api_key sk-... --global # Config Moonshot API key
5961
./ai-commit config set generators.openai.api_key sk-... --global # Config OpenAI API key
6062
./ai-commit config set generators.openai_chat.api_key sk-... --global # Config OpenAI API key

README-zh_CN.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [x] [ERNIE-Bot-turbo](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot-turbo)
2222
- [x] [ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot)
2323
- [x] [GitHub Copilot CLI](https://github.com/github/gh-copilot)
24+
- [x] [GitHub Models CLI](https://github.com/github/gh-models)
2425
- [x] [Moonshot](https://platform.moonshot.cn/docs/api-reference)
2526
- [x] [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat)
2627
- [x] [OpenAI](https://platform.openai.com/docs/api-reference/completions)
@@ -55,6 +56,7 @@ composer require guanguans/ai-commit --dev -v # 本地
5556
./ai-commit config set generators.ernie_bot.api_key api-key... --global # Config Ernie API key
5657
./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # Config Ernie API key
5758
./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # Config Github cli binary(Optional)
59+
./ai-commit config set generators.github_models_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
5860
./ai-commit config set generators.moonshot.api_key sk-... --global # Config Moonshot API key
5961
./ai-commit config set generators.openai.api_key sk-... --global # Config OpenAI API key
6062
./ai-commit config set generators.openai_chat.api_key sk-... --global # Config OpenAI API key

README-zh_TW.md

+95-70
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[简体中文](README-zh_CN.md) | [ENGLISH](README.md) | [日本語](README-ja.md) | [繁體中文](README-zh_TW.md)
77

8-
> Automagically generate conventional git commit message with AI. - 使用 AI 自動生成約定式 git 提交訊息
8+
> Automagically generate conventional git commit message with AI. - 使用 AI 自动生成约定式 git 提交信息
99
1010
[![tests](https://github.com/guanguans/ai-commit/workflows/tests/badge.svg)](https://github.com/guanguans/ai-commit/actions)
1111
[![check & fix styling](https://github.com/guanguans/ai-commit/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/guanguans/ai-commit/actions)
@@ -21,6 +21,7 @@
2121
- [x] [ERNIE-Bot-turbo](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot-turbo)
2222
- [x] [ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot)
2323
- [x] [GitHub Copilot CLI](https://github.com/github/gh-copilot)
24+
- [x] [GitHub Models CLI](https://github.com/github/gh-models)
2425
- [x] [Moonshot](https://platform.moonshot.cn/docs/api-reference)
2526
- [x] [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat)
2627
- [x] [OpenAI](https://platform.openai.com/docs/api-reference/completions)
@@ -51,50 +52,74 @@ composer require guanguans/ai-commit --dev -v # 本地安裝
5152
### 快速開始
5253

5354
```shell
54-
./ai-commit config set generators.bito_cli.binary bito-cli-binary... --global # 設定 Bito cli 執行檔(可選)
55-
./ai-commit config set generators.ernie_bot.api_key api-key... --global # 設定 Ernie API 金鑰
56-
./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # 設定 Ernie API 金鑰
57-
./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # 設定 Github cli 執行檔(可選)
58-
./ai-commit config set generators.moonshot.api_key sk-... --global # 設定 Moonshot API 金鑰
59-
./ai-commit config set generators.openai.api_key sk-... --global # 設定 OpenAI API 金鑰
60-
./ai-commit config set generators.openai_chat.api_key sk-... --global # 設定 OpenAI API 金鑰
61-
62-
./ai-commit config set generator openai_chat --global # 設定預設生成器(可選)
63-
./ai-commit commit # 使用預設生成器產生並提交訊息
64-
./ai-commit commit --generator=github_copilot_cli # 使用指定的生成器產生並提交訊息
55+
./ai-commit config set generators.bito_cli.binary bito-cli-binary... --global # Config Bito CLI binary(Optional)
56+
./ai-commit config set generators.ernie_bot.api_key api-key... --global # Config Ernie API key
57+
./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # Config Ernie API key
58+
./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
59+
./ai-commit config set generators.github_models_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
60+
./ai-commit config set generators.moonshot.api_key sk-... --global # Config Moonshot API key
61+
./ai-commit config set generators.openai.api_key sk-... --global # Config OpenAI API key
62+
./ai-commit config set generators.openai_chat.api_key sk-... --global # Config OpenAI API key
63+
64+
./ai-commit config set generator openai_chat --global # Config default generator(Optional)
65+
./ai-commit commit # Generate and commit message using the default generator
66+
./ai-commit commit --generator=github_copilot_cli # Generate and commit message using the specified generator
6567
```
6668

6769
```shell
68-
╰─ ./ai-commit commit --generator=openai_chat --no-edit --no-verify --ansi ─╯
69-
1. 產生提交訊息中:正在產生...
70-
{
71-
"subject": "chore(ai-commit): update settings and commands",
72-
"body": "- Set Width to 1200\n- Set Height to 742\n- Set TypingSpeed to 10ms\n- Set PlaybackSpeed to 0.2\n- Update git commands and sleep times"
73-
}
74-
1. 產生提交訊息:✔
75-
76-
2. 確認提交訊息:確認中...
77-
+------------------------------------------------+---------------------------------------+
78-
| subject | body |
79-
+------------------------------------------------+---------------------------------------+
80-
| chore(ai-commit): update settings and commands | - Set Width to 1200 |
81-
| | - Set Height to 742 |
82-
| | - Set TypingSpeed to 10ms |
83-
| | - Set PlaybackSpeed to 0.2 |
84-
| | - Update git commands and sleep times |
85-
+------------------------------------------------+---------------------------------------+
86-
87-
是否要提交此訊息?(yes/no) [yes]:
70+
╰─ ./ai-commit commit --generator=bito_cli --no-edit --no-verify --ansi ─╯
71+
1. Generating commit message: generating...
72+
73+
Please choose commit type [Automatically generate commit type]:
74+
[auto ] Automatically generate commit type
75+
[feat ] A new feature
76+
[fix ] A bug fix
77+
[docs ] Documentation only changes
78+
[style ] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
79+
[refactor] A code change that neither fixes a bug nor adds a feature
80+
[perf ] A code change that improves performance
81+
[test ] Adding missing tests or correcting existing tests
82+
[build ] Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
83+
[ci ] Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
84+
[chore ] Other changes that don't modify src or test files
85+
[revert ] Reverts a previous commit
86+
> chore
87+
88+
RUN 'bito'
89+
ERR Model in use: BASIC
90+
ERR
91+
ERR
92+
OUT {
93+
OUT "subject": "chore(ai-commit): update tape and gif resources",
94+
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"
95+
OUT }
96+
OUT
97+
OUT
98+
RES Command ran successfully
99+
1. Generating commit message: ✔
100+
101+
2. Confirming commit message: confirming...
102+
+-------------------------------------------------+-----------------------------------------------------------------+
103+
| subject | body |
104+
+-------------------------------------------------+-----------------------------------------------------------------+
105+
| chore(ai-commit): update tape and gif resources | - Adjusted width and height settings in ai-commit.tape |
106+
| | - Changed commit command generator from openai_chat to bito_cli |
107+
| | - Updated ai-commit-vhs.gif file with new binary data |
108+
+-------------------------------------------------+-----------------------------------------------------------------+
109+
110+
Do you want to commit this message? (yes/no) [yes]:
88111
>
89112
90-
2. 確認提交訊息:✔
91113
92-
3. 提交訊息中:提交中...
114+
2. Confirming commit message: ✔
93115
94-
3. 提交訊息:✔
116+
3. Committing message: committing...
117+
118+
3. Committing message: ✔
95119
96120
97-
[OK] 成功產生並提交訊息。
121+
[OK] Successfully generated and committed message.
122+
98123
```
99124
100125
![](docs/ai-commit-vhs.gif)
@@ -116,13 +141,13 @@ composer require guanguans/ai-commit --dev -v # 本地安裝
116141
117142
1.2.5
118143
119-
使用方式:ai-commit <command> [options] [arguments]
144+
USAGE: ai-commit <command> [options] [arguments]
120145
121-
commit 使用 AI 自動生成約定式提交訊息。
122-
completion 輸出 shell 自動完成腳本
123-
config 管理設定選項。
124-
self-update 允許自我更新建置應用程式
125-
thanks 感謝使用此工具。
146+
commit Automagically generate conventional commit message with AI.
147+
completion Dump the shell completion script
148+
config Manage config options.
149+
self-update Allows to self-update a build application
150+
thanks Thanks for using this tool.
126151
```
127152
128153
### 設定操作
@@ -143,46 +168,46 @@ composer require guanguans/ai-commit --dev -v # 本地安裝
143168
```shell
144169
╰─ ./ai-commit self-update ─╯
145170
146-
檢查新版本...
171+
Checking for a new version...
147172
=============================
148173
149174
150-
[OK] 已從版本 1.2.4 更新至 v1.2.5
175+
[OK] Updated from version 1.2.4 to v1.2.5.
151176
152177
```
153178
154179
### 指令說明
155180
156181
```shell
157-
╰─ ./ai-commit commit --help ─╯
158-
描述:
159-
使用 AI 自動生成約定式提交訊息。
182+
╰─ ./ai-commit commit --help ─╯
183+
Description:
184+
Automagically generate conventional commit message with AI.
160185
161-
用法:
186+
Usage:
162187
commit [options] [--] [<path>]
163188
164-
參數:
165-
path 工作目錄 [預設值:"/Users/yaozm/Documents/develop/ai-commit"]
166-
167-
選項:
168-
--commit-options[=COMMIT-OPTIONS] `git commit` 指令附加選項 [預設值:["--edit"]] (可多值)
169-
--diff-options[=DIFF-OPTIONS] `git diff` 指令附加選項 [預設值:[":!*-lock.json",":!*.lock",":!*.sum"]] (可多值)
170-
-g, --generator=GENERATOR 指定生成器名稱 [預設值:"openai_chat"]
171-
-p, --prompt=PROMPT 指定訊息生成的提示名稱 [預設值:"conventional"]
172-
--no-edit 啟用或停用 git commit `--no-edit` 選項
173-
--no-verify 啟用或停用 git commit `--no-verify` 選項
174-
-c, --config[=CONFIG] 指定設定檔
175-
--retry-times=RETRY-TIMES 指定重試次數 [預設值:3]
176-
--retry-sleep=RETRY-SLEEP 指定重試間隔毫秒數 [預設值:200]
177-
--dry-run 僅生成訊息而不提交
178-
--diff[=DIFF] 指定差異內容
179-
-h, --help 顯示指定指令的說明。若未指定指令則顯示 list 指令的說明
180-
-q, --quiet 不輸出任何訊息
181-
-V, --version 顯示此應用程式版本
182-
--ansi|--no-ansi 強制(或停用 --no-ansiANSI 輸出
183-
-n, --no-interaction 不詢問任何互動問題
184-
--env[=ENV] 指令應在其下執行的環境
185-
-v|vv|vvv, --verbose 增加訊息的詳細程度:1 為正常輸出,2 為較詳細輸出,3 為偵錯輸出
189+
Arguments:
190+
path The working directory [default: "/Users/yaozm/Documents/develop/ai-commit"]
191+
192+
Options:
193+
--commit-options[=COMMIT-OPTIONS] Append options for the `git commit` command [default: ["--edit"]] (multiple values allowed)
194+
--diff-options[=DIFF-OPTIONS] Append options for the `git diff` command [default: [":!*-lock.json",":!*.lock",":!*.sum"]] (multiple values allowed)
195+
-g, --generator=GENERATOR Specify generator name [default: "openai_chat"]
196+
-p, --prompt=PROMPT Specify prompt name of message generated [default: "conventional"]
197+
--no-edit Enable or disable git commit `--no-edit` option
198+
--no-verify Enable or disable git commit `--no-verify` option
199+
-c, --config[=CONFIG] Specify config file
200+
--retry-times=RETRY-TIMES Specify times of retry [default: 3]
201+
--retry-sleep=RETRY-SLEEP Specify sleep milliseconds of retry [default: 200]
202+
--dry-run Only generate message without commit
203+
--diff[=DIFF] Specify diff content
204+
-h, --help Display help for the given command. When no command is given display help for the list command
205+
-q, --quiet Do not output any message
206+
-V, --version Display this application version
207+
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
208+
-n, --no-interaction Do not ask any interactive question
209+
--env[=ENV] The environment the command should run under
210+
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
186211
```
187212
188213
## 測試

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- [x] [ERNIE-Bot-turbo](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot-turbo)
2323
- [x] [ERNIE-Bot](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu#ernie-bot)
2424
- [x] [GitHub Copilot CLI](https://github.com/github/gh-copilot)
25+
- [x] [GitHub Models CLI](https://github.com/github/gh-models)
2526
- [x] [Moonshot](https://platform.moonshot.cn/docs/api-reference)
2627
- [x] [OpenAI Chat](https://platform.openai.com/docs/api-reference/chat)
2728
- [x] [OpenAI](https://platform.openai.com/docs/api-reference/completions)
@@ -56,6 +57,7 @@ composer require guanguans/ai-commit --dev -v # local
5657
./ai-commit config set generators.ernie_bot.api_key api-key... --global # Config Ernie API key
5758
./ai-commit config set generators.ernie_bot_turbo.api_key api-key... --global # Config Ernie API key
5859
./ai-commit config set generators.github_copilot_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
60+
./ai-commit config set generators.github_models_cli.binary gh-cli-binary... --global # Config Github CLI binary(Optional)
5961
./ai-commit config set generators.moonshot.api_key sk-... --global # Config Moonshot API key
6062
./ai-commit config set generators.openai.api_key sk-... --global # Config OpenAI API key
6163
./ai-commit config set generators.openai_chat.api_key sk-... --global # Config OpenAI API key

composer.json

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"cli",
2626
"copilot",
2727
"github",
28+
"gh-models",
29+
"gh",
30+
"models",
31+
"model",
2832
"ernie",
2933
"bot",
3034
"文心一言",

0 commit comments

Comments
 (0)