git-cai-cli 0.15.5__tar.gz → 0.16.1__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 (115) hide show
  1. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/cd/.SRCINFO +1 -1
  2. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/cd/PKGBUILD +1 -1
  3. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.pylintrc +2 -2
  4. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/PKG-INFO +1 -2
  5. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/docs/git-cai.txt +181 -59
  6. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/docs/man/git-cai.1 +285 -79
  7. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/pyproject.toml +0 -1
  8. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/_version.py +3 -3
  9. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/cli/cli.py +28 -0
  10. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/cli/helptext.py +4 -0
  11. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/cli/modes.py +47 -7
  12. git_cai_cli-0.16.1/src/git_cai_cli/core/changelog.py +87 -0
  13. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/config.py +28 -12
  14. git_cai_cli-0.16.1/src/git_cai_cli/core/explain.py +80 -0
  15. git_cai_cli-0.16.1/src/git_cai_cli/core/generation.py +114 -0
  16. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/gitutils.py +92 -2
  17. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/llm.py +209 -307
  18. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/options.py +23 -55
  19. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/pr.py +8 -40
  20. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/prompts_fallback.py +67 -0
  21. git_cai_cli-0.16.1/src/git_cai_cli/core/release.py +73 -0
  22. git_cai_cli-0.16.1/src/git_cai_cli/core/split.py +75 -0
  23. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/squash.py +3 -16
  24. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/validate.py +8 -46
  25. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/main.py +65 -24
  26. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/PKG-INFO +1 -2
  27. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/SOURCES.txt +10 -1
  28. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/requires.txt +0 -1
  29. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/scm_file_list.json +83 -74
  30. git_cai_cli-0.16.1/src/git_cai_cli.egg-info/scm_version.json +8 -0
  31. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_modes_integration.py +2 -5
  32. git_cai_cli-0.16.1/tests/unit/test_changelog.py +111 -0
  33. git_cai_cli-0.16.1/tests/unit/test_explain.py +103 -0
  34. git_cai_cli-0.16.1/tests/unit/test_generation.py +135 -0
  35. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_gitutils.py +90 -0
  36. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_helptext.py +6 -0
  37. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_llm.py +186 -145
  38. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_main.py +84 -0
  39. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_modes.py +77 -6
  40. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_options.py +18 -41
  41. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_prompt_loading.py +49 -0
  42. git_cai_cli-0.16.1/tests/unit/test_release.py +108 -0
  43. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_secrets.py +7 -7
  44. git_cai_cli-0.16.1/tests/unit/test_split.py +65 -0
  45. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_stats.py +6 -6
  46. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_validate.py +1 -32
  47. git_cai_cli-0.16.1/uv.lock +822 -0
  48. git_cai_cli-0.15.5/src/git_cai_cli/core/editors.py +0 -23
  49. git_cai_cli-0.15.5/src/git_cai_cli.egg-info/scm_version.json +0 -8
  50. git_cai_cli-0.15.5/uv.lock +0 -1183
  51. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.caiignore +0 -0
  52. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.gitattributes +0 -0
  53. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/ci/_version.py +0 -0
  54. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/ci/cai_config.ci.yml +0 -0
  55. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/ci/tokens.ci.yml +0 -0
  56. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/workflows/python-tests.yml +0 -0
  57. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/workflows/release.yml +0 -0
  58. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.github/workflows/release_aur.yml +0 -0
  59. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.gitignore +0 -0
  60. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.bandit.yml +0 -0
  61. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.checkov.yml +0 -0
  62. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.flake8 +0 -0
  63. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.ls-lint.yml +0 -0
  64. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.markdown-link-check.json +0 -0
  65. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.markdownlint.json +0 -0
  66. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.proselintrc +0 -0
  67. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/.yamllint.yml +0 -0
  68. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/check_git_branch_name.sh +0 -0
  69. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/lychee.toml +0 -0
  70. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.linters/pyrightconfig.json +0 -0
  71. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.markdownlintignore +0 -0
  72. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.mega-linter.yml +0 -0
  73. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.semgrepignore +0 -0
  74. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/.trivyignore +0 -0
  75. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/CLAUDE.md +0 -0
  76. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/LICENSE +0 -0
  77. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/Makefile +0 -0
  78. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/README.md +0 -0
  79. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/cai_config.yml +0 -0
  80. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/setup.cfg +0 -0
  81. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/__init__.py +0 -0
  82. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/cli/__init__.py +0 -0
  83. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/__init__.py +0 -0
  84. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/completion.py +0 -0
  85. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/doctor.py +0 -0
  86. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/init.py +0 -0
  87. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/languages.py +0 -0
  88. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/secrets.py +0 -0
  89. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/spinner.py +0 -0
  90. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli/core/stats.py +0 -0
  91. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/dependency_links.txt +0 -0
  92. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/entry_points.txt +0 -0
  93. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/src/git_cai_cli.egg-info/top_level.txt +0 -0
  94. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/conftest.py +0 -0
  95. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_cli_integration.py +0 -0
  96. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_config_integration.py +0 -0
  97. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_gitutils_integration.py +0 -0
  98. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_options_integration.py +0 -0
  99. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_pr_integration.py +0 -0
  100. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/integration/test_squash_integration.py +0 -0
  101. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_amend.py +0 -0
  102. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_branch_context.py +0 -0
  103. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_classification.py +0 -0
  104. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_cli.py +0 -0
  105. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_completion.py +0 -0
  106. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_config.py +0 -0
  107. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_conventional.py +0 -0
  108. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_doctor.py +0 -0
  109. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_init.py +0 -0
  110. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_pr.py +0 -0
  111. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_print.py +0 -0
  112. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_set_config.py +0 -0
  113. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_signoff.py +0 -0
  114. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_spinner.py +0 -0
  115. {git_cai_cli-0.15.5 → git_cai_cli-0.16.1}/tests/unit/test_squash.py +0 -0
@@ -12,7 +12,7 @@ pkgbase = cai
12
12
  makedepends = python-setuptools-scm
13
13
  depends = python
14
14
  depends = python-yaml
15
- depends = python-openai
15
+ depends = python-pathspec
16
16
  depends = python-requests
17
17
  depends = python-typer
18
18
  depends = git
@@ -10,7 +10,7 @@ license=('MIT')
10
10
  depends=(
11
11
  python
12
12
  python-yaml
13
- python-openai
13
+ python-pathspec
14
14
  python-requests
15
15
  python-typer
16
16
  git
@@ -69,8 +69,8 @@ check-protected-access-in-special-methods=no
69
69
  max-args=30 # Max arguments per function
70
70
  max-attributes=12 # Max attributes per class
71
71
  max-branches=35 # Max branches per function
72
- max-locals=80 # Max locals per function
73
- max-returns=10 # Max return statements per function
72
+ max-locals=90 # Max locals per function
73
+ max-returns=15 # Max return statements per function
74
74
  max-statements=140 # Max total statements per function
75
75
  max-public-methods=20 # Max public methods per class
76
76
  min-public-methods=1 # Min public methods per class
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-cai-cli
3
- Version: 0.15.5
3
+ Version: 0.16.1
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
@@ -22,7 +22,6 @@ Requires-Python: >=3.10
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: pyyaml>=6.0.3
25
- Requires-Dist: openai>=2.30.0
26
25
  Requires-Dist: typer>=0.23.1
27
26
  Requires-Dist: requests>=2.33.0
28
27
  Requires-Dist: pathspec>=0.12.1
@@ -10,29 +10,33 @@ git-cai - AI-powered commit message generator
10
10
  SYNOPSIS
11
11
  --------
12
12
  [verse]
13
- `git cai` [-A | --amend] [-a | --all] [-C | --conventional]
14
- [-b | --branch] [-c | --crazy] [-d | --debug]
15
- [-B | --allow-secrets] [-k | --check] [-n | --ping]
16
- [-e TEMPERATURE | --temperature TEMPERATURE]
13
+ `git cai` [-A | --amend] [-a | --all]
14
+ [-B | --allow-secrets] [-b | --branch | --no-branch]
15
+ [-C | --conventional | --no-conventional] [-c | --crazy]
16
+ [-D [HASH] | --explain [HASH]] [-d | --debug]
17
+ [-E TEMPERATURE | --temperature TEMPERATURE]
18
+ [-e | --emoji | --no-emoji]
17
19
  [-F | --full-files | --no-full-files] [-f PATH | --files PATH]
18
20
  [-g | --generate-config]
19
21
  [-H KEY=VALUE | --set-home KEY=VALUE] [-h | --help]
20
- [-I | --init]
21
- [-i | --install-completion]
22
+ [-I | --init] [-i | --install-completion]
23
+ [-k | --check]
24
+ [-L CODE | --language CODE]
22
25
  [-l [config|editor|language|model|path|provider|style] |
23
26
  --list [config|editor|language|model|path|provider|style]]
24
27
  [-m MODEL | --model MODEL]
28
+ [-N | --changelog] [-n | --ping]
25
29
  [-o | --signoff | --no-signoff]
26
30
  [-P PROVIDER | --provider PROVIDER] [-p | --generate-prompts]
27
31
  [--print]
32
+ [-q true|false | --sql true|false]
33
+ [-R | --release]
28
34
  [-r | --PR] [--base BRANCH]
29
35
  [-S KEY=VALUE | --set KEY=VALUE]
30
36
  [-s [N|HASH] | --squash [N|HASH]]
31
- [-q true|false | --sql true|false]
32
- [--style STYLE] [--language CODE] [--emoji | --no-emoji]
33
- [-T SECONDS | --timeout SECONDS]
34
- [-t | --time] [-u | --update] [-v | --version]
35
- [-x CONTEXT | --context CONTEXT]
37
+ [-T SECONDS | --timeout SECONDS] [-t | --time]
38
+ [-u | --update] [-v | --version] [-w | --split]
39
+ [-x CONTEXT | --context CONTEXT] [-y STYLE | --style STYLE]
36
40
  [-z | --stats] [--since YYYY-MM-DD] [--json] [--reset-stats]
37
41
 
38
42
 
@@ -188,6 +192,24 @@ git cai -c
188
192
  git cai -A -c
189
193
  ----
190
194
 
195
+ -D, --explain [HASH]::
196
+ Explain what a change does in plain prose, printed to stdout. With no
197
+ argument, explains the staged diff; with a commit HASH, explains that
198
+ commit's diff. Read-only: nothing is staged, committed, or amended.
199
+ +
200
+ The explanation is prose, not a commit message: it covers the intent of
201
+ the change, the notable edits, and any risks a reviewer should know. Use
202
+ `-x` to add context the diff does not show.
203
+ +
204
+ The prompt follows the usual fallback chain: `explain_prompt_file` from
205
+ config, then `~/.config/cai/explain_prompt.md`, then the built-in default.
206
+ +
207
+ ----
208
+ git cai --explain
209
+ git cai -D a1b2c3d
210
+ git cai -D -x "Fixes JIRA-1234"
211
+ ----
212
+
191
213
  -d, --debug::
192
214
  Enable debug logging. Produces verbose output to stderr, including
193
215
  configuration loading, provider selection, prompt assembly, and the raw
@@ -200,7 +222,7 @@ Cannot be combined with `--help` or `--version`.
200
222
  git cai -d
201
223
  ----
202
224
 
203
- -e, --temperature TEMPERATURE::
225
+ -E, --temperature TEMPERATURE::
204
226
  Override the sampling temperature of the active provider for this invocation
205
227
  only. Higher values produce more varied wording; lower values are more
206
228
  deterministic. The override is provider-scoped, mirroring `--model`, and does
@@ -209,8 +231,19 @@ temperature (for example OpenAI GPT-5 models and Anthropic Opus 4.7 and newer);
209
231
  for those the value is ignored and a warning is logged.
210
232
  +
211
233
  ----
212
- git cai -e 0.7
213
- git cai -P anthropic -e 0.2
234
+ git cai -E 0.7
235
+ git cai -P anthropic -E 0.2
236
+ ----
237
+
238
+ -e, --emoji / --no-emoji::
239
+ Override emoji usage for this invocation only. `--emoji` instructs the model
240
+ to use relevant emojis; `--no-emoji` disables them even when the persisted
241
+ config enables emoji. To change the default permanently, set `emoji:` in
242
+ `cai_config.yml`.
243
+ +
244
+ ----
245
+ git cai --no-emoji
246
+ git cai --emoji
214
247
  ----
215
248
 
216
249
  -F, --full-files::
@@ -341,13 +374,16 @@ git cai --check
341
374
  git cai --check --ping
342
375
  ----
343
376
 
344
- -n, --ping::
345
- Only meaningful together with `--check`. After the offline checks, send one
346
- small request to the active provider and report whether it is reachable and how
347
- long it took. Useful to confirm an API key and network path end to end.
377
+ -L, --language CODE::
378
+ Override the commit message language for this invocation only, using a
379
+ supported language code (e.g. `de`, `fr`, `es`), or `none` to omit the
380
+ language instruction. Run `git cai -l language` to list supported codes. An
381
+ unsupported code is rejected with an error. To change it permanently, set
382
+ `language:` in `cai_config.yml`.
348
383
  +
349
384
  ----
350
- git cai --check --ping
385
+ git cai --language de
386
+ git cai --language none
351
387
  ----
352
388
 
353
389
  -l, --list [config|editor|language|model|path|provider|style]::
@@ -377,6 +413,38 @@ git cai -P anthropic -m claude-haiku-4-5
377
413
  git cai -P ollama -m mistral
378
414
  ----
379
415
 
416
+ -N, --changelog::
417
+ Generate a changelog section in the "Keep a Changelog" style from the
418
+ commits since the most recent tag (`git describe --tags --abbrev=0`). If the
419
+ repository has no tags yet, the whole history is used.
420
+ +
421
+ Entries are grouped under the standard headings (Added, Changed,
422
+ Deprecated, Removed, Fixed, Security); headings without entries are
423
+ omitted. Read-only: nothing is committed or tagged.
424
+ +
425
+ By default the section is printed to stdout. Set `changelog_to_file: true`
426
+ to prepend it to the changelog file instead; the filename comes from
427
+ `changelog_file_name` (default `CHANGELOG.md`) and the file is written in
428
+ the repository root, keeping any existing content below the new section.
429
+ +
430
+ The prompt follows the usual fallback chain: `changelog_prompt_file` from
431
+ config, then `~/.config/cai/changelog_prompt.md`, then the built-in default.
432
+ +
433
+ ----
434
+ git cai --changelog
435
+ git cai -N > CHANGELOG.new.md
436
+ git cai -S changelog_to_file=true
437
+ ----
438
+
439
+ -n, --ping::
440
+ Only meaningful together with `--check`. After the offline checks, send one
441
+ small request to the active provider and report whether it is reachable and how
442
+ long it took. Useful to confirm an API key and network path end to end.
443
+ +
444
+ ----
445
+ git cai --check --ping
446
+ ----
447
+
380
448
  -o, --signoff / --no-signoff::
381
449
  Append a `Signed-off-by:` trailer to the generated commit message
382
450
  using your configured git `user.name` and `user.email`. Applies in
@@ -459,6 +527,37 @@ git cai --sql true # record this commit even when config has stats off
459
527
  git cai -q false # don't record this commit even when config has stats on
460
528
  ----
461
529
 
530
+ -R, --release::
531
+ Print release notes for the commits since the most recent tag
532
+ (`git describe --tags --abbrev=0`) to stdout. If the repository has no tags
533
+ yet, the whole history is used. Read-only: nothing is committed or tagged.
534
+ +
535
+ The notes open with a one-line title, then group the changes under Markdown
536
+ h3 headings (`### Features`) in this order: Breaking changes, Features, Bug
537
+ fixes, Performance, Refactoring, Documentation, Tests, Build and CI, Chores,
538
+ Reverts. A heading is printed only when it has entries -- a release that
539
+ fixes no bugs shows no "Bug fixes" heading. Each commit is assigned by its Conventional Commits type
540
+ (`feat` -> Features, `fix` -> Bug fixes, and so on); a `!` marker or a
541
+ `BREAKING CHANGE` note goes under Breaking changes. Commits without a type
542
+ prefix are placed by inferring the closest heading from the message.
543
+ +
544
+ Emojis appear only when they are switched on, either by `emoji: true` in
545
+ `cai_config.yml` or by `-e`/`--emoji` on the command line. With `--no-emoji`,
546
+ or with emoji disabled in config, the notes are plain text.
547
+ +
548
+ Output is the notes and nothing else, so it pipes cleanly into a file, a
549
+ release form, or `git tag -a -F -`.
550
+ +
551
+ The prompt follows the usual fallback chain: `release_prompt_file` from
552
+ config, then `~/.config/cai/release_prompt.md`, then the built-in default.
553
+ +
554
+ ----
555
+ git cai --release
556
+ git cai -R --no-emoji
557
+ git cai -R > RELEASE_NOTES.md
558
+ git cai -R -x "First public release"
559
+ ----
560
+
462
561
  -r, --PR::
463
562
  Generate a Pull Request description summarizing the commits between the
464
563
  current branch and its base branch. git-cai collects the commit messages
@@ -545,42 +644,6 @@ git cai -s 3
545
644
  git cai -s a1b2c3d
546
645
  ----
547
646
 
548
- --style STYLE::
549
- Override the commit message tone style for this invocation only (e.g.
550
- `professional`, `neutral`, `friendly`, `funny`, `excited`, `sarcastic`,
551
- `apologetic`, `academic`, or `none` to let the model choose). Run
552
- `git cai -l style` to see all styles with examples. An invalid value is
553
- rejected with an error. To change the style permanently, set `style:` in
554
- `cai_config.yml`.
555
- +
556
- ----
557
- git cai --style funny
558
- git cai --style none
559
- ----
560
-
561
- --language CODE::
562
- Override the commit message language for this invocation only, using a
563
- supported language code (e.g. `de`, `fr`, `es`), or `none` to omit the
564
- language instruction. Run `git cai -l language` to list supported codes. An
565
- unsupported code is rejected with an error. To change it permanently, set
566
- `language:` in `cai_config.yml`.
567
- +
568
- ----
569
- git cai --language de
570
- git cai --language none
571
- ----
572
-
573
- --emoji / --no-emoji::
574
- Override emoji usage for this invocation only. `--emoji` instructs the model
575
- to use relevant emojis; `--no-emoji` disables them even when the persisted
576
- config enables emoji. To change the default permanently, set `emoji:` in
577
- `cai_config.yml`.
578
- +
579
- ----
580
- git cai --no-emoji
581
- git cai --emoji
582
- ----
583
-
584
647
  -T, --timeout SECONDS::
585
648
  Override the HTTP timeout for the LLM call in this invocation. The default
586
649
  is 30 seconds for remote providers and 300 seconds for Ollama (since local
@@ -635,6 +698,29 @@ from git tags via `setuptools-scm`.
635
698
  git cai -v
636
699
  ----
637
700
 
701
+ -w, --split::
702
+ Suggest how to break the staged change into several smaller, logically
703
+ coherent commits. The grouping is at file granularity: whole files are
704
+ assigned to groups, never split within a file. Each group is printed with a
705
+ suggested one-line commit message and the file paths it contains.
706
+ +
707
+ Advisory: the plan is printed and nothing is executed. To apply a group,
708
+ run `git reset`, then `git add <files>` and `git cai` for each group in
709
+ turn.
710
+ +
711
+ Unlike the other read-only modes, the `--split` prompt does not receive the
712
+ language, style, or emoji instructions: its output is a structured plan, not
713
+ prose.
714
+ +
715
+ The prompt follows the usual fallback chain: `split_prompt_file` from
716
+ config, then `~/.config/cai/split_prompt.md`, then the built-in default.
717
+ +
718
+ ----
719
+ git add -A
720
+ git cai --split
721
+ git cai -w -x "Keep the migration separate"
722
+ ----
723
+
638
724
  -x, --context CONTEXT::
639
725
  Provide extra context for the LLM to consider when generating the commit
640
726
  message. The context string is appended to the diff (or commit history in
@@ -643,7 +729,8 @@ provider. This is useful for including information that is not visible in
643
729
  the diff itself, such as a ticket number, the reason for a change, or a
644
730
  link to an issue.
645
731
  +
646
- Can be combined with `COMMIT`, `AMEND`, `SQUASH`, or `PR` modes.
732
+ Can be combined with `COMMIT`, `AMEND`, `SQUASH`, `PR`, `EXPLAIN`,
733
+ `SPLIT`, `CHANGELOG`, and `TAG` modes.
647
734
  Cannot be used with `--list` or `--update`.
648
735
  +
649
736
  ----
@@ -654,9 +741,25 @@ git cai --squash -x "Resolves JIRA-99"
654
741
  git cai -r -x "Closes JIRA-1234"
655
742
  ----
656
743
 
744
+ -y, --style STYLE::
745
+ Override the commit message tone style for this invocation only (e.g.
746
+ `professional`, `neutral`, `friendly`, `funny`, `excited`, `sarcastic`,
747
+ `apologetic`, `academic`, or `none` to let the model choose). Run
748
+ `git cai -l style` to see all styles with examples. An invalid value is
749
+ rejected with an error. To change the style permanently, set `style:` in
750
+ `cai_config.yml`.
751
+ +
752
+ ----
753
+ git cai --style funny
754
+ git cai --style none
755
+ ----
756
+
657
757
  -z, --stats::
658
- Show local-only usage analytics: commits and squashes generated, top
659
- provider, total token counts, average latency, and per-provider rollups.
758
+ Show local-only usage analytics: commits, amends, squashes and PR
759
+ descriptions generated, top provider, total token counts, average latency,
760
+ and per-provider rollups. The read-only modes (`--explain`, `--split`,
761
+ `--changelog`, `--release`) are recorded in the database and included in the
762
+ token and latency totals, but do not yet get their own count line.
660
763
  Recording is opt-in via the top-level `stats` config key (a plain
661
764
  boolean, default `false`), so this view is empty until you turn writing
662
765
  on. No diff content, commit messages, or file paths are stored — only
@@ -950,6 +1053,24 @@ Available configuration keys:
950
1053
  `--PR`. Follows the same fallback chain as `prompt_file` /
951
1054
  `squash_prompt_file`: configured path -> `~/.config/cai/pr_prompt.md` ->
952
1055
  built-in fallback.
1056
+ - `changelog_file_name` -- filename used when `changelog_to_file` is `true`
1057
+ (default `CHANGELOG.md`). The file is written in the repository root; any
1058
+ existing content is kept below the newly generated section.
1059
+ - `changelog_prompt_file` -- path to a custom Markdown prompt file used by
1060
+ `--changelog` (fallback chain: configured path ->
1061
+ `~/.config/cai/changelog_prompt.md` -> built-in fallback).
1062
+ - `changelog_to_file` -- when running `--changelog`, prepend the generated
1063
+ section to the changelog file instead of printing it to stdout
1064
+ (`true`/`false`, default `false`)
1065
+ - `explain_prompt_file` -- path to a custom Markdown prompt file used by
1066
+ `--explain` (same fallback chain, with
1067
+ `~/.config/cai/explain_prompt.md` as the middle step).
1068
+ - `split_prompt_file` -- path to a custom Markdown prompt file used by
1069
+ `--split` (same fallback chain, with `~/.config/cai/split_prompt.md` as
1070
+ the middle step).
1071
+ - `release_prompt_file` -- path to a custom Markdown prompt file used by
1072
+ `--release` (same fallback chain, with `~/.config/cai/release_prompt.md` as
1073
+ the middle step).
953
1074
  - `<provider>.model` -- model name for a specific provider
954
1075
  - `<provider>.temperature` -- temperature for a specific provider
955
1076
  - `anthropic.max_tokens` -- upper bound on Anthropic response tokens
@@ -958,7 +1079,8 @@ Available configuration keys:
958
1079
  (default `300`; overrides the global `timeout` for this provider only)
959
1080
  - `stats` -- opt in to local-only usage analytics (`true`/`false`,
960
1081
  default `false`). When enabled, every generation appends one row to
961
- `~/.local/share/git-cai/stats.db` capturing kind, repo name, provider,
1082
+ `~/.local/share/git-cai/stats.db` capturing kind (`commit`, `amend`,
1083
+ `squash`, `pr`, `explain`, `split`, `changelog`, `release`), repo name, provider,
962
1084
  model, token counts, real LLM latency, and a snapshot of the active
963
1085
  settings (language, style, emoji, temperature, prompt file). No diff
964
1086
  content, commit messages, or file paths are stored. View the rollup