git-cai-cli 0.10.1__tar.gz → 0.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. {git_cai_cli-0.10.1/src/git_cai_cli.egg-info → git_cai_cli-0.11.0}/PKG-INFO +11 -4
  2. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/README.md +10 -3
  3. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/docs/git-cai.txt +259 -13
  4. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/docs/man/git-cai.1 +367 -15
  5. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/_version.py +3 -3
  6. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/cli/cli.py +21 -2
  7. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/cli/helptext.py +7 -2
  8. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/cli/modes.py +8 -0
  9. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/config.py +2 -0
  10. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/gitutils.py +18 -1
  11. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/llm.py +62 -22
  12. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/options.py +86 -0
  13. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/squash.py +111 -3
  14. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/validate.py +1 -0
  15. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/main.py +27 -1
  16. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0/src/git_cai_cli.egg-info}/PKG-INFO +11 -4
  17. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli.egg-info/SOURCES.txt +1 -0
  18. git_cai_cli-0.11.0/tests/unit/test_branch_context.py +78 -0
  19. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_cli.py +115 -0
  20. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_config.py +3 -1
  21. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_gitutils.py +92 -0
  22. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_llm.py +301 -0
  23. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_modes.py +99 -0
  24. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_options.py +147 -0
  25. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_squash.py +165 -1
  26. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_validate.py +32 -0
  27. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.caiignore +0 -0
  28. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.gitattributes +0 -0
  29. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/cd/.SRCINFO +0 -0
  30. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/cd/PKGBUILD +0 -0
  31. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/ci/_version.py +0 -0
  32. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/ci/cai_config.ci.yml +0 -0
  33. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/ci/tokens.ci.yml +0 -0
  34. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/workflows/python-tests.yml +0 -0
  35. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/workflows/release.yml +0 -0
  36. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.github/workflows/release_aur.yml +0 -0
  37. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.gitignore +0 -0
  38. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.bandit.yml +0 -0
  39. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.checkov.yml +0 -0
  40. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.flake8 +0 -0
  41. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.ls-lint.yml +0 -0
  42. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.markdown-link-check.json +0 -0
  43. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.markdownlint.json +0 -0
  44. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.proselintrc +0 -0
  45. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.pylintrc +0 -0
  46. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/.yamllint.yml +0 -0
  47. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/check_git_branch_name.sh +0 -0
  48. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/lychee.toml +0 -0
  49. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.linters/pyrightconfig.json +0 -0
  50. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.markdownlintignore +0 -0
  51. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.mega-linter.yml +0 -0
  52. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.semgrepignore +0 -0
  53. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/.trivyignore +0 -0
  54. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/CLAUDE.md +0 -0
  55. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/LICENSE +0 -0
  56. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/Makefile +0 -0
  57. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/pyproject.toml +0 -0
  58. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/setup.cfg +0 -0
  59. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/__init__.py +0 -0
  60. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/cli/__init__.py +0 -0
  61. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/__init__.py +0 -0
  62. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/completion.py +0 -0
  63. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/editors.py +0 -0
  64. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/languages.py +0 -0
  65. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/prompts_fallback.py +0 -0
  66. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/core/spinner.py +0 -0
  67. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/defaults/__init__.py +0 -0
  68. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/defaults/commit_prompt.md +0 -0
  69. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli/defaults/squash_prompt.md +0 -0
  70. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli.egg-info/dependency_links.txt +0 -0
  71. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli.egg-info/entry_points.txt +0 -0
  72. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli.egg-info/requires.txt +0 -0
  73. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/src/git_cai_cli.egg-info/top_level.txt +0 -0
  74. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/conftest.py +0 -0
  75. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_cli_integration.py +0 -0
  76. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_config_integration.py +0 -0
  77. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_gitutils_integration.py +0 -0
  78. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_modes_integration.py +0 -0
  79. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_options_integration.py +0 -0
  80. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/integration/test_squash_integration.py +0 -0
  81. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_amend.py +0 -0
  82. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_completion.py +0 -0
  83. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_conventional.py +0 -0
  84. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_helptext.py +0 -0
  85. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_main.py +0 -0
  86. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_prompt_loading.py +0 -0
  87. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_set_config.py +0 -0
  88. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/tests/unit/test_spinner.py +0 -0
  89. {git_cai_cli-0.10.1 → git_cai_cli-0.11.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-cai-cli
3
- Version: 0.10.1
3
+ Version: 0.11.0
4
4
  Summary: Use LLM to create git commit messages
5
5
  Author-email: Thorsten Foltz <thorsten.foltz@live.com>
6
6
  License-Expression: MIT
@@ -81,8 +81,11 @@ Currently supported providers:
81
81
  - Amend the last commit message with a regenerated one (`-A`)
82
82
  - Conventional Commits format support (`-C`)
83
83
  - Change configuration from the command line (`-S`, `-H`)
84
- - Optional commit squashing with automatic summary generation
84
+ - Optional commit squashing with automatic summary generation (all, last N, or up to a specific commit)
85
+ - List providers, models, active config, and file paths (`-l`)
85
86
  - Token usage logging for API calls
87
+ - Branch name as LLM context via `--branch` / `-b`
88
+ - Extra context for the LLM via `--context` / `-x` (e.g. ticket numbers, reasons)
86
89
  - Generation time measurement (`-t`)
87
90
  - Shell completion for bash, zsh, and fish (`-i`)
88
91
 
@@ -217,6 +220,7 @@ git cai -g
217
220
  - `load_tokens_from` – path to the file where API tokens are stored
218
221
  - `prompt_file` - path to the file where the prompt for the commit is stored
219
222
  - `squash_prompt_file` - path to the file where the prompt for the squash is stored
223
+ - `branch_context` – include current branch name as LLM context (default: `false`)
220
224
  - `conventional` – use Conventional Commits format (default: `false`)
221
225
  - `token_logging` – log token usage after each LLM call (default: `true` for new installs)
222
226
  - `measure_time` – log generation time (default: `false`)
@@ -229,20 +233,23 @@ In addition to `git cai`, the following options are available:
229
233
 
230
234
  - `-A`, `--amend` – regenerate and amend the last commit message
231
235
  - `-a`, `--all` – stage all tracked modified and deleted files
236
+ - `-b`, `--branch` – include current branch name as context for the LLM
232
237
  - `-C`, `--conventional` – use Conventional Commits format (`type(scope): description`)
233
238
  - `-c`, `--crazy` – Trust the LLM and commit without checking
234
239
  - `-d`, `--debug` – enable debug logging
235
240
  - `-g`, `--generate-config` – generate the default `cai_config.yml` in the current directory
241
+ - `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
236
242
  - `-h`, `--help` – show help and available commands
237
243
  - `-i`, `--install-completion` – install shell completion for bash, zsh, or fish
238
- - `-l`, `--list` – list available languages, styles, and supported editors
244
+ - `-l`, `--list` – list available information (`config`, `editor`, `language`, `model`, `path`, `provider`, `style`)
239
245
  - `-m`, `--model` – override the model for this invocation (requires `-P`)
240
246
  - `-p`, `--generate-prompts` – generate default `commit_prompt.md` and `squash_prompt.md` in the current directory (for customization)
241
247
  - `-P`, `--provider` – override the LLM provider for this invocation
242
248
  - `-S`, `--set` – set a config value (`key=value`) in repo config (requires existing repo config)
243
249
  - `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
244
- - `-s`, `--squash` – squash commits on the current branch and summarize them
250
+ - `-s`, `--squash` `[N|HASH]` – squash commits on the current branch and summarize them. Without argument: squash all since branch checkout. With a number: squash the last N commits. With a commit hash: squash up to and including that commit
245
251
  - `-t`, `--time` – measure and log commit message generation time
252
+ - `-x`, `--context` – provide extra context for the LLM (e.g. ticket number, reason for change)
246
253
  - `-u`, `--update` – check for updates
247
254
  - `-v`, `--version` – show the installed version
248
255
 
@@ -52,8 +52,11 @@ Currently supported providers:
52
52
  - Amend the last commit message with a regenerated one (`-A`)
53
53
  - Conventional Commits format support (`-C`)
54
54
  - Change configuration from the command line (`-S`, `-H`)
55
- - Optional commit squashing with automatic summary generation
55
+ - Optional commit squashing with automatic summary generation (all, last N, or up to a specific commit)
56
+ - List providers, models, active config, and file paths (`-l`)
56
57
  - Token usage logging for API calls
58
+ - Branch name as LLM context via `--branch` / `-b`
59
+ - Extra context for the LLM via `--context` / `-x` (e.g. ticket numbers, reasons)
57
60
  - Generation time measurement (`-t`)
58
61
  - Shell completion for bash, zsh, and fish (`-i`)
59
62
 
@@ -188,6 +191,7 @@ git cai -g
188
191
  - `load_tokens_from` – path to the file where API tokens are stored
189
192
  - `prompt_file` - path to the file where the prompt for the commit is stored
190
193
  - `squash_prompt_file` - path to the file where the prompt for the squash is stored
194
+ - `branch_context` – include current branch name as LLM context (default: `false`)
191
195
  - `conventional` – use Conventional Commits format (default: `false`)
192
196
  - `token_logging` – log token usage after each LLM call (default: `true` for new installs)
193
197
  - `measure_time` – log generation time (default: `false`)
@@ -200,20 +204,23 @@ In addition to `git cai`, the following options are available:
200
204
 
201
205
  - `-A`, `--amend` – regenerate and amend the last commit message
202
206
  - `-a`, `--all` – stage all tracked modified and deleted files
207
+ - `-b`, `--branch` – include current branch name as context for the LLM
203
208
  - `-C`, `--conventional` – use Conventional Commits format (`type(scope): description`)
204
209
  - `-c`, `--crazy` – Trust the LLM and commit without checking
205
210
  - `-d`, `--debug` – enable debug logging
206
211
  - `-g`, `--generate-config` – generate the default `cai_config.yml` in the current directory
212
+ - `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
207
213
  - `-h`, `--help` – show help and available commands
208
214
  - `-i`, `--install-completion` – install shell completion for bash, zsh, or fish
209
- - `-l`, `--list` – list available languages, styles, and supported editors
215
+ - `-l`, `--list` – list available information (`config`, `editor`, `language`, `model`, `path`, `provider`, `style`)
210
216
  - `-m`, `--model` – override the model for this invocation (requires `-P`)
211
217
  - `-p`, `--generate-prompts` – generate default `commit_prompt.md` and `squash_prompt.md` in the current directory (for customization)
212
218
  - `-P`, `--provider` – override the LLM provider for this invocation
213
219
  - `-S`, `--set` – set a config value (`key=value`) in repo config (requires existing repo config)
214
220
  - `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
215
- - `-s`, `--squash` – squash commits on the current branch and summarize them
221
+ - `-s`, `--squash` `[N|HASH]` – squash commits on the current branch and summarize them. Without argument: squash all since branch checkout. With a number: squash the last N commits. With a commit hash: squash up to and including that commit
216
222
  - `-t`, `--time` – measure and log commit message generation time
223
+ - `-x`, `--context` – provide extra context for the LLM (e.g. ticket number, reason for change)
217
224
  - `-u`, `--update` – check for updates
218
225
  - `-v`, `--version` – show the installed version
219
226
 
@@ -11,14 +11,16 @@ SYNOPSIS
11
11
  --------
12
12
  [verse]
13
13
  `git cai` [-A | --amend] [-a | --all] [-C | --conventional]
14
- [-c | --crazy] [-d | --debug] [-g | --generate-config]
14
+ [-b | --branch] [-c | --crazy] [-d | --debug] [-g | --generate-config]
15
15
  [-H KEY=VALUE | --set-home KEY=VALUE] [-h | --help]
16
16
  [-i | --install-completion]
17
- [-l [editor|language|style] | --list [editor|language|style]]
17
+ [-l [config|editor|language|model|path|provider|style] |
18
+ --list [config|editor|language|model|path|provider|style]]
18
19
  [-m MODEL | --model MODEL]
19
20
  [-P PROVIDER | --provider PROVIDER] [-p | --generate-prompts]
20
21
  [-S KEY=VALUE | --set KEY=VALUE]
21
- [-s | --squash] [-t | --time] [-u | --update] [-v | --version]
22
+ [-s [N|HASH] | --squash [N|HASH]] [-t | --time] [-u | --update] [-v | --version]
23
+ [-x CONTEXT | --context CONTEXT]
22
24
 
23
25
 
24
26
  DESCRIPTION
@@ -90,6 +92,24 @@ Cannot be combined with `--list`, `--update`, or `--squash`.
90
92
  git cai -a
91
93
  ----
92
94
 
95
+ -b, --branch::
96
+ Include the current Git branch name as context when generating the commit
97
+ message. The LLM uses the branch name to better understand the intent and
98
+ scope of the changes (e.g., a branch named `fix/login-timeout` hints at a
99
+ bug fix related to login timeouts).
100
+ +
101
+ This flag applies for the current invocation only. To enable it permanently,
102
+ set `branch_context: true` in `cai_config.yml` or run:
103
+ +
104
+ ----
105
+ git cai -S branch_context=true
106
+ ----
107
+ +
108
+ ----
109
+ git cai -b
110
+ git cai -b -c
111
+ ----
112
+
93
113
  -C, --conventional::
94
114
  Generate the commit message in Conventional Commits format
95
115
  (`type(scope): description`). The LLM is instructed to use one of the
@@ -179,15 +199,19 @@ file for the completions to take effect.
179
199
  git cai -i
180
200
  ----
181
201
 
182
- -l, --list [editor|language|style]::
183
- List information about a specific category. Provide one of `editor`,
184
- `language`, or `style` as the next argument. Without an argument, an error
185
- is shown listing the valid choices.
202
+ -l, --list [config|editor|language|model|path|provider|style]::
203
+ List information about a specific category. Provide one of the supported
204
+ list types as the next argument. Without an argument, a help text is shown
205
+ listing all valid choices.
186
206
  +
187
207
  ----
208
+ git cai -l config
209
+ git cai -l editor
188
210
  git cai -l language
211
+ git cai -l model
212
+ git cai -l path
213
+ git cai -l provider
189
214
  git cai -l style
190
- git cai -l editor
191
215
  ----
192
216
 
193
217
  -m, --model MODEL::
@@ -244,17 +268,30 @@ git cai -S openai.temperature=0.7
244
268
  git cai -S conventional=true
245
269
  ----
246
270
 
247
- -s, --squash::
248
- Squash all commits on the current branch into a single commit with an
271
+ -s, --squash [N|HASH]::
272
+ Squash commits on the current branch into a single commit with an
249
273
  LLM-generated summary message. git-cai collects the individual commit
250
274
  messages, sends them to the LLM, and opens the editor for review. After
251
275
  confirmation, a soft reset is performed and the squashed commit is created.
252
276
  +
277
+ Without an argument, all commits since the branch diverged from the base
278
+ branch are squashed (default behaviour).
279
+ +
280
+ With a number `N`, the last N commits are squashed. If N exceeds the number
281
+ of commits on this branch (since it diverged), a warning is shown and
282
+ confirmation is required. If N exceeds the total number of commits in the
283
+ repository, an error is shown and the operation is aborted.
284
+ +
285
+ With a commit hash, all commits from HEAD down to and including the given
286
+ commit are squashed. The commit must exist in the current branch history.
287
+ +
253
288
  This rewrites history. A force push is required to update a remote branch.
254
289
  git-cai will prompt before executing the force push.
255
290
  +
256
291
  ----
257
292
  git cai -s
293
+ git cai -s 3
294
+ git cai -s a1b2c3d
258
295
  ----
259
296
 
260
297
  -t, --time::
@@ -285,18 +322,186 @@ from git tags via `setuptools-scm`.
285
322
  git cai -v
286
323
  ----
287
324
 
325
+ -x, --context CONTEXT::
326
+ Provide extra context for the LLM to consider when generating the commit
327
+ message. The context string is appended to the diff before sending it to
328
+ the provider. This is useful for including information that is not visible
329
+ in the diff itself, such as a ticket number, the reason for a change, or
330
+ a link to an issue.
331
+ +
332
+ Can be combined with any commit-generating mode (`COMMIT` or `AMEND`).
333
+ Cannot be used with `--list`, `--update`, or `--squash`.
334
+ +
335
+ ----
336
+ git cai -x "Fixes JIRA-1234"
337
+ git cai -x "Performance optimisation for the search endpoint"
338
+ git cai -A -x "Reword after code review feedback"
339
+ ----
340
+
288
341
  LIST TYPES
289
342
  ----------
290
343
  The argument to `--list` must be one of the following:
291
344
 
345
+ config::
346
+ Show the active (effective) configuration. This displays the fully resolved
347
+ configuration that git-cai is currently using, including all provider blocks,
348
+ global settings, and any overrides from repository-level config files.
349
+ +
350
+ This is useful for verifying which settings are in effect, especially when a
351
+ repository config overrides the home config. Nested provider blocks (model,
352
+ temperature) are displayed indented under their provider name.
353
+ +
354
+ ----
355
+ git cai -l config
356
+ ----
357
+ +
358
+ Example output:
359
+ +
360
+ ----
361
+ Active configuration:
362
+
363
+ default: groq
364
+ language: en
365
+ style: professional
366
+ emoji: true
367
+ groq:
368
+ model: moonshotai/kimi-k2-instruct
369
+ temperature: 0
370
+ ...
371
+ ----
372
+
292
373
  editor::
293
- List supported and tested editors as default git editor. Most likely more editors will work.
374
+ List supported and tested editors as default git editor. Most likely more
375
+ editors will work. git-cai uses the same editor resolution as Git itself
376
+ (`GIT_EDITOR`, `VISUAL`, `EDITOR` environment variables).
294
377
 
295
378
  language::
296
- List supported languages.
379
+ List all 121 supported languages for commit message generation. Languages
380
+ are displayed sorted alphabetically by their human-readable name, each
381
+ followed by their language code. The language code is what you set in
382
+ `cai_config.yml` under the `language` key.
383
+ +
384
+ ----
385
+ git cai -l language
386
+ ----
387
+ +
388
+ Example output (excerpt):
389
+ +
390
+ ----
391
+ Available languages:
392
+ - English → en
393
+ - French → fr
394
+ - German → de
395
+ - Japanese → ja
396
+ - Klingon → tlh
397
+ ...
398
+ ----
399
+
400
+ model::
401
+ Show the default model for each supported provider. This displays the model
402
+ name that git-cai uses out of the box if no custom model is configured.
403
+ Models are listed alphabetically by provider name.
404
+ +
405
+ Note: these are the built-in defaults. If you have overridden a model in
406
+ your `cai_config.yml`, the override is not shown here. Use `--list config`
407
+ to see the effective configuration including overrides.
408
+ +
409
+ ----
410
+ git cai -l model
411
+ ----
412
+ +
413
+ Example output:
414
+ +
415
+ ----
416
+ Default models:
417
+
418
+ anthropic → claude-haiku-4-5
419
+ deepseek → deepseek-chat
420
+ gemini → gemini-2.5-flash
421
+ groq → moonshotai/kimi-k2-instruct
422
+ mistral → codestral-2508
423
+ ollama → llama3.1
424
+ openai → gpt-5.2
425
+ xai → grok-4-1-fast-reasoning
426
+ ----
427
+
428
+ path::
429
+ Show all resolved configuration file paths. This displays the locations
430
+ of the config directory, home config file, tokens file, and whether a
431
+ repository-specific config file is present. The active config source
432
+ (repository or home) is shown at the bottom.
433
+ +
434
+ This is particularly useful for debugging configuration issues or when
435
+ you are unsure which config file git-cai is reading.
436
+ +
437
+ ----
438
+ git cai -l path
439
+ ----
440
+ +
441
+ Example output (no repo config):
442
+ +
443
+ ----
444
+ Configuration file paths:
445
+
446
+ Config directory: /home/user/.config/cai
447
+ Home config: /home/user/.config/cai/cai_config.yml
448
+ Tokens file: /home/user/.config/cai/tokens.yml
449
+ Repository config: not found
450
+
451
+ Active config source: home
452
+ ----
453
+ +
454
+ Example output (with repo config):
455
+ +
456
+ ----
457
+ Configuration file paths:
458
+
459
+ Config directory: /home/user/.config/cai
460
+ Home config: /home/user/.config/cai/cai_config.yml
461
+ Tokens file: /home/user/.config/cai/tokens.yml
462
+ Repository config: /home/user/project/cai_config.yml (active)
463
+
464
+ Active config source: repository
465
+ ----
466
+
467
+ provider::
468
+ List all supported LLM providers. Each provider is shown with its default
469
+ model and whether an API token is required. Providers that do not require a
470
+ token (currently only `ollama`) are marked accordingly.
471
+ +
472
+ ----
473
+ git cai -l provider
474
+ ----
475
+ +
476
+ Example output:
477
+ +
478
+ ----
479
+ Supported providers:
480
+
481
+ anthropic model: claude-haiku-4-5 (token required)
482
+ deepseek model: deepseek-chat (token required)
483
+ gemini model: gemini-2.5-flash (token required)
484
+ groq model: moonshotai/kimi-k2-instruct (token required)
485
+ mistral model: codestral-2508 (token required)
486
+ ollama model: llama3.1 (no token required)
487
+ openai model: gpt-5.2 (token required)
488
+ xai model: grok-4-1-fast-reasoning (token required)
489
+ ----
297
490
 
298
491
  style::
299
- Show available commit message styles.
492
+ Show available commit message styles with descriptions and examples. The
493
+ style controls the tone of the generated commit message. Set the style in
494
+ `cai_config.yml` or override it per invocation with `--set style=<name>`.
495
+ +
496
+ Available styles: `academic`, `apologetic`, `excited`, `friendly`, `funny`,
497
+ `neutral`, `none`, `professional` (default), `sarcastic`.
498
+ +
499
+ The special style `none` omits the style instruction from the prompt
500
+ entirely, letting the model choose its own tone.
501
+ +
502
+ ----
503
+ git cai -l style
504
+ ----
300
505
 
301
506
  CONFIGURATION
302
507
  -------------
@@ -331,6 +536,7 @@ Available configuration keys:
331
536
  - `style` -- tone of the commit message (`professional`, `neutral`, `friendly`,
332
537
  `funny`, `excited`, `sarcastic`, `apologetic`, `academic`)
333
538
  - `emoji` -- enable or disable emojis in commit messages (`true`/`false`)
539
+ - `branch_context` -- include current branch name as LLM context (`true`/`false`)
334
540
  - `conventional` -- use Conventional Commits format (`true`/`false`)
335
541
  - `load_tokens_from` -- path to the tokens file
336
542
  - `prompt_file` -- path to the commit prompt Markdown file
@@ -419,6 +625,18 @@ Squash all commits on the current branch into one (rewrites history):
419
625
  git cai -s
420
626
  ----
421
627
 
628
+ Squash the last 3 commits:
629
+
630
+ ----
631
+ git cai -s 3
632
+ ----
633
+
634
+ Squash all commits down to and including a specific commit:
635
+
636
+ ----
637
+ git cai -s a1b2c3d
638
+ ----
639
+
422
640
  Show supported styles, languages, or editors:
423
641
 
424
642
  ----
@@ -427,6 +645,20 @@ git cai -l language
427
645
  git cai -l editor
428
646
  ----
429
647
 
648
+ Show supported providers and their default models:
649
+
650
+ ----
651
+ git cai -l provider
652
+ git cai -l model
653
+ ----
654
+
655
+ Show the active configuration and file paths:
656
+
657
+ ----
658
+ git cai -l config
659
+ git cai -l path
660
+ ----
661
+
430
662
  Override the provider for a single invocation:
431
663
 
432
664
  ----
@@ -454,6 +686,20 @@ git cai -H language=de
454
686
  git cai -H default=openai
455
687
  ----
456
688
 
689
+ Include branch name as context:
690
+
691
+ ----
692
+ git cai -b
693
+ git cai -b -C
694
+ ----
695
+
696
+ Provide extra context for the commit message:
697
+
698
+ ----
699
+ git cai -x "Fixes JIRA-1234"
700
+ git cai -x "Refactored to reduce memory usage on large datasets"
701
+ ----
702
+
457
703
  Measure generation time:
458
704
 
459
705
  ----