git-cai-cli 0.17.4__tar.gz → 0.18.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.17.4 → git_cai_cli-0.18.1}/PKG-INFO +68 -3
  2. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/README.md +67 -2
  3. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/cai_config.yml +4 -2
  4. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/docs/git-cai.txt +127 -24
  5. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/docs/man/git-cai.1 +277 -26
  6. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/_version.py +3 -3
  7. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/cli/cli.py +14 -0
  8. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/cli/helptext.py +3 -0
  9. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/changelog.py +7 -1
  10. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/completion.py +8 -1
  11. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/config.py +74 -8
  12. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/doctor.py +15 -2
  13. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/explain.py +7 -1
  14. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/generation.py +6 -1
  15. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/gitutils.py +17 -2
  16. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/init.py +21 -8
  17. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/llm.py +51 -6
  18. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/options.py +3 -7
  19. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/pr.py +7 -1
  20. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/release.py +7 -1
  21. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/split.py +7 -1
  22. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/squash.py +19 -2
  23. git_cai_cli-0.18.1/src/git_cai_cli/core/subscription.py +270 -0
  24. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/validate.py +7 -0
  25. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/main.py +24 -1
  26. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/PKG-INFO +68 -3
  27. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/SOURCES.txt +2 -0
  28. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/scm_file_list.json +2 -0
  29. git_cai_cli-0.18.1/src/git_cai_cli.egg-info/scm_version.json +8 -0
  30. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_completion.py +3 -0
  31. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_init.py +2 -2
  32. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_main.py +1 -0
  33. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_signoff.py +24 -1
  34. git_cai_cli-0.18.1/tests/unit/test_subscription.py +657 -0
  35. git_cai_cli-0.17.4/src/git_cai_cli.egg-info/scm_version.json +0 -8
  36. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.caiignore +0 -0
  37. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.gitattributes +0 -0
  38. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/cd/.SRCINFO +0 -0
  39. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/cd/PKGBUILD +0 -0
  40. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/ci/_version.py +0 -0
  41. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/ci/cai_config.ci.yml +0 -0
  42. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/ci/tokens.ci.yml +0 -0
  43. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/workflows/python-tests.yml +0 -0
  44. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/workflows/release.yml +0 -0
  45. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.github/workflows/release_aur.yml +0 -0
  46. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.gitignore +0 -0
  47. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.bandit.yml +0 -0
  48. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.checkov.yml +0 -0
  49. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.flake8 +0 -0
  50. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.ls-lint.yml +0 -0
  51. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.markdownlint.json +0 -0
  52. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.proselintrc.json +0 -0
  53. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.pylintrc +0 -0
  54. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/.yamllint.yml +0 -0
  55. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/check_git_branch_name.sh +0 -0
  56. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/lychee.toml +0 -0
  57. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.linters/pyrightconfig.json +0 -0
  58. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.markdownlintignore +0 -0
  59. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.mega-linter.yml +0 -0
  60. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.semgrepignore +0 -0
  61. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/.trivyignore +0 -0
  62. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/CLAUDE.md +0 -0
  63. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/LICENSE +0 -0
  64. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/Makefile +0 -0
  65. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/pyproject.toml +0 -0
  66. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/setup.cfg +0 -0
  67. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/__init__.py +0 -0
  68. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/cli/__init__.py +0 -0
  69. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/cli/modes.py +0 -0
  70. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/__init__.py +0 -0
  71. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/languages.py +0 -0
  72. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/prompts_fallback.py +0 -0
  73. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/secrets.py +0 -0
  74. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/spinner.py +0 -0
  75. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli/core/stats.py +0 -0
  76. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/dependency_links.txt +0 -0
  77. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/entry_points.txt +0 -0
  78. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/requires.txt +0 -0
  79. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/src/git_cai_cli.egg-info/top_level.txt +0 -0
  80. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/conftest.py +0 -0
  81. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_cli_integration.py +0 -0
  82. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_config_integration.py +0 -0
  83. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_gitutils_integration.py +0 -0
  84. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_modes_integration.py +0 -0
  85. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_options_integration.py +0 -0
  86. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_pr_integration.py +0 -0
  87. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/integration/test_squash_integration.py +0 -0
  88. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_amend.py +0 -0
  89. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_branch_context.py +0 -0
  90. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_changelog.py +0 -0
  91. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_classification.py +0 -0
  92. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_cli.py +0 -0
  93. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_config.py +0 -0
  94. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_conventional.py +0 -0
  95. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_custom_provider.py +0 -0
  96. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_doctor.py +0 -0
  97. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_explain.py +0 -0
  98. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_generation.py +0 -0
  99. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_gitutils.py +0 -0
  100. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_helptext.py +0 -0
  101. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_llm.py +0 -0
  102. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_modes.py +0 -0
  103. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_options.py +0 -0
  104. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_pr.py +0 -0
  105. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_print.py +0 -0
  106. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_prompt_loading.py +0 -0
  107. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_release.py +0 -0
  108. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_secrets.py +0 -0
  109. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_set_config.py +0 -0
  110. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_spinner.py +0 -0
  111. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_split.py +0 -0
  112. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_squash.py +0 -0
  113. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_stats.py +0 -0
  114. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/tests/unit/test_validate.py +0 -0
  115. {git_cai_cli-0.17.4 → git_cai_cli-0.18.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-cai-cli
3
- Version: 0.17.4
3
+ Version: 0.18.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
@@ -49,8 +49,11 @@ Currently supported providers:
49
49
  - Mistral
50
50
  - DeepSeek
51
51
  - Ollama (local)
52
+ - GitHub Copilot (subscription only)
52
53
  - Any OpenAI compatible API (OpenRouter, Together, Cerebras, LM Studio, vLLM, llama.cpp, LiteLLM, ...) via `base_url`
53
54
 
55
+ Anthropic and OpenAI can also run on a Claude or ChatGPT subscription instead of an API key.
56
+
54
57
  ---
55
58
 
56
59
  ## Prerequisites
@@ -60,6 +63,7 @@ Currently supported providers:
60
63
  - Either:
61
64
  - Ollama installed and running locally, or
62
65
  - A local OpenAI compatible server such as LM Studio or vLLM, or
66
+ - A Claude, ChatGPT or GitHub Copilot subscription with the command line tool of the vendor installed and logged in, or
63
67
  - An API key for at least one of the following providers:
64
68
  - OpenAI
65
69
  - Gemini (free tier available)
@@ -77,12 +81,14 @@ Currently supported providers:
77
81
  - Generates meaningful, context-aware commit messages using an LLM
78
82
  - Seamless integration with Git
79
83
  - Supports multiple LLM providers and models, plus any OpenAI compatible endpoint
84
+ - Claude, ChatGPT or GitHub Copilot subscription instead of an API key (`--subscription`)
80
85
  - Global configuration with per-repository overrides
81
86
  - Interactive `--init` wizard for first-time setup (provider, token, language, style)
82
87
  - Repository-specific language, style, and model selection
83
88
  - Amend mode refines the existing commit message instead of regenerating it from scratch, preserving trailers and intent
84
89
  - Conventional Commits format support
85
90
  - `Signed-off-by:` (DCO) trailer support via `--signoff`
91
+ - Optional `Branch:` trailer with the current branch name via `--branch-trailer`
86
92
  - `--print` mode that emits the generated message to stdout for scripting
87
93
  - Change configuration from the command line
88
94
  - Optional commit squashing with automatic summary generation (all, last N, or up to a specific commit)
@@ -160,7 +166,8 @@ git cai --init # or: git cai -I
160
166
  ```
161
167
 
162
168
  It asks for a default provider, language, style, and emoji preference,
163
- then collects the API key (input is hidden while you type). The wizard
169
+ and for Claude and OpenAI whether to use a subscription. It then collects
170
+ the API key if one is needed (input is hidden while you type). The wizard
164
171
  writes `~/.config/cai/cai_config.yml` and, for providers that need one,
165
172
  `~/.config/cai/tokens.yml` with mode `0600`. Existing entries for other
166
173
  providers in `tokens.yml` are preserved. `--init` only writes home-scope
@@ -186,7 +193,7 @@ It also creates three Markdown prompt files:
186
193
  Don't be scared the first run will show an error. It only misses a token.
187
194
  Add your provider API keys to `tokens.yml`. Once configured, cai will reuse them automatically.
188
195
  Optional for each repository a file containing tokens can be set.
189
- Set your preferred LLM in `cai_config.yml` (Groq by default).
196
+ Set your preferred LLM in `cai_config.yml` (Anthropic by default).
190
197
 
191
198
  If you want to use Ollama, install it, set `default: ollama` and configure the `ollama:` block (model/temperature). Ollama is automatically started when used.
192
199
 
@@ -211,6 +218,36 @@ With `requires_token: false` no key is needed. `/chat/completions` is appended t
211
218
  `base_url` unless it is already there. The name works with `-P` / `--provider`
212
219
  and shows up in `git cai -l provider` and shell completion.
213
220
 
221
+ ### Subscription instead of an API key
222
+
223
+ A Claude, OpenAI (ChatGPT) or GitHub Copilot subscription can be used instead
224
+ of an API token. cai then calls the official command line tool of the vendor,
225
+ which must be installed and logged in:
226
+
227
+ | Provider | Command | Log in with |
228
+ |-------------|-----------|---------------------|
229
+ | `anthropic` | `claude` | `claude auth login` |
230
+ | `openai` | `codex` | `codex login` |
231
+ | `copilot` | `copilot` | `copilot login` |
232
+
233
+ ```sh
234
+ git cai -H subscription=true # enable persistently in the home config
235
+ git cai -U # use the subscription for this run
236
+ git cai -U -P openai # with another provider
237
+ git cai -P copilot # Copilot always uses the subscription
238
+ git cai -K # use the API for this run despite subscription: true
239
+ ```
240
+
241
+ `copilot` has no API, so it always uses the subscription and `-K` is an error
242
+ for it. Providers without a subscription ignore `subscription: true`, but `-U`
243
+ with them is an error. If the command is not installed, cai stops and explains
244
+ how to install it; it never switches to the API or to another provider on its
245
+ own. API credentials in the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`,
246
+ `CODEX_API_KEY`, `COPILOT_PROVIDER_*`) are hidden from the command, so the API
247
+ account is not billed. `temperature`, `base_url` and `max_output_tokens` do not
248
+ apply, the secret scan stays active, and every request counts against the usage
249
+ limits of the subscription.
250
+
214
251
  ### Custom prompts (Markdown)
215
252
 
216
253
  The generated commit message is guided by prompt files.
@@ -263,6 +300,7 @@ git cai -g
263
300
  ### Available configuration options
264
301
 
265
302
  - `default` – default LLM provider
303
+ - `subscription` – use the Claude, OpenAI or Copilot subscription through the command line tool of the vendor instead of the API; default `false`. Ignored by providers without a subscription
266
304
  - `model` – model to use for the selected provider
267
305
  (note: not all models may be compatible)
268
306
  - `temperature` – controls how creative the generated messages are
@@ -290,6 +328,7 @@ OpenAI style providers include the version (`https://gateway.example/v1`); `anth
290
328
  - `stats` – opt in to local-only usage analytics (per-run row in a SQLite DB at `~/.local/share/git-cai/stats.db`); default `false`.
291
329
  No diff content, commit messages, or file paths are stored — only metadata (provider, model, kind, repo name, token counts, latency, settings)
292
330
  - `signoff` – append a `Signed-off-by:` trailer (built from git `user.name` / `user.email`) to every commit message; default `false`
331
+ - `branch_trailer` – append a `Branch: <name>` trailer with the current branch name, placed above any sign-off; default `false`
293
332
  - `secret_scan` – scan the outgoing diff for likely secrets and ask before sending; default `true`. Bypass once with `-B` / `--allow-secrets`,
294
333
  or disable entirely by setting it to `false`. Skipped for tokenless providers (Ollama), where nothing leaves the machine.
295
334
  Custom providers are always scanned, even with `requires_token: false`, since the diff may leave the machine
@@ -315,6 +354,8 @@ In addition to `git cai`, the following options are available:
315
354
  - `-h`, `--help` – show help and available commands
316
355
  - `-I`, `--init` – interactive setup wizard (writes home config and tokens.yml)
317
356
  - `-i`, `--install-completion` – install shell completion for bash, zsh, or fish. Rerun after upgrading to get custom provider completion
357
+ - `-j`, `--branch-trailer` / `--no-branch-trailer` – append a `Branch: <name>` trailer with the current branch name (above any sign-off; skipped on a detached HEAD); applies to commit, amend, and squash modes
358
+ - `-K`, `--no-subscription` – use the API for this invocation even when the config has `subscription: true` (error for `copilot`)
318
359
  - `-k`, `--check` – run configuration diagnostics offline (config source, provider, token, prompts, editor, style)
319
360
  - `-l`, `--list` – list available information. Valid types: `config`, `editor`, `language`, `model`, `path`, `provider`, `style`
320
361
  - `-m`, `--model` – override the model for this invocation (requires `-P`)
@@ -337,6 +378,7 @@ In addition to `git cai`, the following options are available:
337
378
  - `-e`, `--emoji` / `--no-emoji` – override emoji usage for this invocation (use `--no-emoji` to disable when config enables it)
338
379
  - `-T`, `--timeout` `SECONDS` – HTTP timeout for this invocation (overrides config)
339
380
  - `-t`, `--time` – measure and log commit message generation time
381
+ - `-U`, `--subscription` – use the Claude, OpenAI or Copilot subscription for this invocation instead of the API (no token needed)
340
382
  - `-u`, `--update` – check for updates
341
383
  - `-v`, `--version` – show the installed version
342
384
  - `-x`, `--context` – provide extra context for the LLM (e.g. ticket number, reason for change)
@@ -467,6 +509,29 @@ is appended to that block without an extra blank line. Re-running with
467
509
  `--signoff` on a message that already carries the same trailer is a
468
510
  no-op.
469
511
 
512
+ ### Branch trailer
513
+
514
+ cai can also record the branch a commit was made on as a `Branch:`
515
+ trailer. It goes at the bottom of the message, directly above the
516
+ `Signed-off-by:` line when sign-off is active:
517
+
518
+ ```sh
519
+ git cai -j # one-off
520
+ git cai -j -o # with sign-off
521
+ git cai -S branch_trailer=true # enable persistently in the repo config
522
+ ```
523
+
524
+ ```text
525
+ feat: add login timeout
526
+
527
+ Body.
528
+
529
+ Branch: feature/login-timeout
530
+ Signed-off-by: Alice <alice@example.com>
531
+ ```
532
+
533
+ On a detached HEAD there is no branch name, so nothing is added.
534
+
470
535
  ### Print-only output (no commit)
471
536
 
472
537
  `--print` generates the commit message and writes it to stdout instead
@@ -20,8 +20,11 @@ Currently supported providers:
20
20
  - Mistral
21
21
  - DeepSeek
22
22
  - Ollama (local)
23
+ - GitHub Copilot (subscription only)
23
24
  - Any OpenAI compatible API (OpenRouter, Together, Cerebras, LM Studio, vLLM, llama.cpp, LiteLLM, ...) via `base_url`
24
25
 
26
+ Anthropic and OpenAI can also run on a Claude or ChatGPT subscription instead of an API key.
27
+
25
28
  ---
26
29
 
27
30
  ## Prerequisites
@@ -31,6 +34,7 @@ Currently supported providers:
31
34
  - Either:
32
35
  - Ollama installed and running locally, or
33
36
  - A local OpenAI compatible server such as LM Studio or vLLM, or
37
+ - A Claude, ChatGPT or GitHub Copilot subscription with the command line tool of the vendor installed and logged in, or
34
38
  - An API key for at least one of the following providers:
35
39
  - OpenAI
36
40
  - Gemini (free tier available)
@@ -48,12 +52,14 @@ Currently supported providers:
48
52
  - Generates meaningful, context-aware commit messages using an LLM
49
53
  - Seamless integration with Git
50
54
  - Supports multiple LLM providers and models, plus any OpenAI compatible endpoint
55
+ - Claude, ChatGPT or GitHub Copilot subscription instead of an API key (`--subscription`)
51
56
  - Global configuration with per-repository overrides
52
57
  - Interactive `--init` wizard for first-time setup (provider, token, language, style)
53
58
  - Repository-specific language, style, and model selection
54
59
  - Amend mode refines the existing commit message instead of regenerating it from scratch, preserving trailers and intent
55
60
  - Conventional Commits format support
56
61
  - `Signed-off-by:` (DCO) trailer support via `--signoff`
62
+ - Optional `Branch:` trailer with the current branch name via `--branch-trailer`
57
63
  - `--print` mode that emits the generated message to stdout for scripting
58
64
  - Change configuration from the command line
59
65
  - Optional commit squashing with automatic summary generation (all, last N, or up to a specific commit)
@@ -131,7 +137,8 @@ git cai --init # or: git cai -I
131
137
  ```
132
138
 
133
139
  It asks for a default provider, language, style, and emoji preference,
134
- then collects the API key (input is hidden while you type). The wizard
140
+ and for Claude and OpenAI whether to use a subscription. It then collects
141
+ the API key if one is needed (input is hidden while you type). The wizard
135
142
  writes `~/.config/cai/cai_config.yml` and, for providers that need one,
136
143
  `~/.config/cai/tokens.yml` with mode `0600`. Existing entries for other
137
144
  providers in `tokens.yml` are preserved. `--init` only writes home-scope
@@ -157,7 +164,7 @@ It also creates three Markdown prompt files:
157
164
  Don't be scared the first run will show an error. It only misses a token.
158
165
  Add your provider API keys to `tokens.yml`. Once configured, cai will reuse them automatically.
159
166
  Optional for each repository a file containing tokens can be set.
160
- Set your preferred LLM in `cai_config.yml` (Groq by default).
167
+ Set your preferred LLM in `cai_config.yml` (Anthropic by default).
161
168
 
162
169
  If you want to use Ollama, install it, set `default: ollama` and configure the `ollama:` block (model/temperature). Ollama is automatically started when used.
163
170
 
@@ -182,6 +189,36 @@ With `requires_token: false` no key is needed. `/chat/completions` is appended t
182
189
  `base_url` unless it is already there. The name works with `-P` / `--provider`
183
190
  and shows up in `git cai -l provider` and shell completion.
184
191
 
192
+ ### Subscription instead of an API key
193
+
194
+ A Claude, OpenAI (ChatGPT) or GitHub Copilot subscription can be used instead
195
+ of an API token. cai then calls the official command line tool of the vendor,
196
+ which must be installed and logged in:
197
+
198
+ | Provider | Command | Log in with |
199
+ |-------------|-----------|---------------------|
200
+ | `anthropic` | `claude` | `claude auth login` |
201
+ | `openai` | `codex` | `codex login` |
202
+ | `copilot` | `copilot` | `copilot login` |
203
+
204
+ ```sh
205
+ git cai -H subscription=true # enable persistently in the home config
206
+ git cai -U # use the subscription for this run
207
+ git cai -U -P openai # with another provider
208
+ git cai -P copilot # Copilot always uses the subscription
209
+ git cai -K # use the API for this run despite subscription: true
210
+ ```
211
+
212
+ `copilot` has no API, so it always uses the subscription and `-K` is an error
213
+ for it. Providers without a subscription ignore `subscription: true`, but `-U`
214
+ with them is an error. If the command is not installed, cai stops and explains
215
+ how to install it; it never switches to the API or to another provider on its
216
+ own. API credentials in the environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`,
217
+ `CODEX_API_KEY`, `COPILOT_PROVIDER_*`) are hidden from the command, so the API
218
+ account is not billed. `temperature`, `base_url` and `max_output_tokens` do not
219
+ apply, the secret scan stays active, and every request counts against the usage
220
+ limits of the subscription.
221
+
185
222
  ### Custom prompts (Markdown)
186
223
 
187
224
  The generated commit message is guided by prompt files.
@@ -234,6 +271,7 @@ git cai -g
234
271
  ### Available configuration options
235
272
 
236
273
  - `default` – default LLM provider
274
+ - `subscription` – use the Claude, OpenAI or Copilot subscription through the command line tool of the vendor instead of the API; default `false`. Ignored by providers without a subscription
237
275
  - `model` – model to use for the selected provider
238
276
  (note: not all models may be compatible)
239
277
  - `temperature` – controls how creative the generated messages are
@@ -261,6 +299,7 @@ OpenAI style providers include the version (`https://gateway.example/v1`); `anth
261
299
  - `stats` – opt in to local-only usage analytics (per-run row in a SQLite DB at `~/.local/share/git-cai/stats.db`); default `false`.
262
300
  No diff content, commit messages, or file paths are stored — only metadata (provider, model, kind, repo name, token counts, latency, settings)
263
301
  - `signoff` – append a `Signed-off-by:` trailer (built from git `user.name` / `user.email`) to every commit message; default `false`
302
+ - `branch_trailer` – append a `Branch: <name>` trailer with the current branch name, placed above any sign-off; default `false`
264
303
  - `secret_scan` – scan the outgoing diff for likely secrets and ask before sending; default `true`. Bypass once with `-B` / `--allow-secrets`,
265
304
  or disable entirely by setting it to `false`. Skipped for tokenless providers (Ollama), where nothing leaves the machine.
266
305
  Custom providers are always scanned, even with `requires_token: false`, since the diff may leave the machine
@@ -286,6 +325,8 @@ In addition to `git cai`, the following options are available:
286
325
  - `-h`, `--help` – show help and available commands
287
326
  - `-I`, `--init` – interactive setup wizard (writes home config and tokens.yml)
288
327
  - `-i`, `--install-completion` – install shell completion for bash, zsh, or fish. Rerun after upgrading to get custom provider completion
328
+ - `-j`, `--branch-trailer` / `--no-branch-trailer` – append a `Branch: <name>` trailer with the current branch name (above any sign-off; skipped on a detached HEAD); applies to commit, amend, and squash modes
329
+ - `-K`, `--no-subscription` – use the API for this invocation even when the config has `subscription: true` (error for `copilot`)
289
330
  - `-k`, `--check` – run configuration diagnostics offline (config source, provider, token, prompts, editor, style)
290
331
  - `-l`, `--list` – list available information. Valid types: `config`, `editor`, `language`, `model`, `path`, `provider`, `style`
291
332
  - `-m`, `--model` – override the model for this invocation (requires `-P`)
@@ -308,6 +349,7 @@ In addition to `git cai`, the following options are available:
308
349
  - `-e`, `--emoji` / `--no-emoji` – override emoji usage for this invocation (use `--no-emoji` to disable when config enables it)
309
350
  - `-T`, `--timeout` `SECONDS` – HTTP timeout for this invocation (overrides config)
310
351
  - `-t`, `--time` – measure and log commit message generation time
352
+ - `-U`, `--subscription` – use the Claude, OpenAI or Copilot subscription for this invocation instead of the API (no token needed)
311
353
  - `-u`, `--update` – check for updates
312
354
  - `-v`, `--version` – show the installed version
313
355
  - `-x`, `--context` – provide extra context for the LLM (e.g. ticket number, reason for change)
@@ -438,6 +480,29 @@ is appended to that block without an extra blank line. Re-running with
438
480
  `--signoff` on a message that already carries the same trailer is a
439
481
  no-op.
440
482
 
483
+ ### Branch trailer
484
+
485
+ cai can also record the branch a commit was made on as a `Branch:`
486
+ trailer. It goes at the bottom of the message, directly above the
487
+ `Signed-off-by:` line when sign-off is active:
488
+
489
+ ```sh
490
+ git cai -j # one-off
491
+ git cai -j -o # with sign-off
492
+ git cai -S branch_trailer=true # enable persistently in the repo config
493
+ ```
494
+
495
+ ```text
496
+ feat: add login timeout
497
+
498
+ Body.
499
+
500
+ Branch: feature/login-timeout
501
+ Signed-off-by: Alice <alice@example.com>
502
+ ```
503
+
504
+ On a detached HEAD there is no branch name, so nothing is added.
505
+
441
506
  ### Print-only output (no commit)
442
507
 
443
508
  `--print` generates the commit message and writes it to stdout instead
@@ -4,7 +4,8 @@ style: professional
4
4
  emoji: true
5
5
  conventional: false
6
6
  branch_context: false
7
- load_tokens_from: /home/thorsten/.config/cai/tokens.yml
7
+ branch_trailer: true
8
+ load_tokens_from: ~/.config/cai/tokens.yml
8
9
  prompt_file: ""
9
10
  squash_prompt_file: ""
10
11
  full_files_prompt_file: ""
@@ -14,9 +15,10 @@ timeout: 30
14
15
  full_files: false
15
16
  pr_to_file: false
16
17
  pr_file_name: PR_DESCRIPTION.md
17
- pr_prompt_file: "/home/thorsten/.config/cai/pr_prompt.md"
18
+ pr_prompt_file: "~/.config/cai/pr_prompt.md"
18
19
  stats: true
19
20
  signoff: true
21
+ subscription: true
20
22
  anthropic:
21
23
  model: claude-haiku-5-5
22
24
  max_tokens: 32768
@@ -20,6 +20,7 @@ SYNOPSIS
20
20
  [-g | --generate-config]
21
21
  [-H KEY=VALUE | --set-home KEY=VALUE] [-h | --help]
22
22
  [-I | --init] [-i | --install-completion]
23
+ [-j | --branch-trailer | --no-branch-trailer]
23
24
  [-k | --check]
24
25
  [-L CODE | --language CODE]
25
26
  [-l [config|editor|language|model|path|provider|style] |
@@ -35,6 +36,7 @@ SYNOPSIS
35
36
  [-S KEY=VALUE | --set KEY=VALUE]
36
37
  [-s [N|HASH] | --squash [N|HASH]]
37
38
  [-T SECONDS | --timeout SECONDS] [-t | --time]
39
+ [-U | --subscription | -K | --no-subscription]
38
40
  [-u | --update] [-v | --version] [-w | --split]
39
41
  [-x CONTEXT | --context CONTEXT] [-y STYLE | --style STYLE]
40
42
  [-z | --stats] [--since YYYY-MM-DD] [--json] [--reset-stats]
@@ -59,8 +61,9 @@ SETUP
59
61
  Guided setup (recommended):
60
62
 
61
63
  - Run `git cai --init` (or `-I`). The interactive wizard asks for a
62
- default provider, language, style, and emoji preference, then
63
- collects the API key (hidden input). It writes
64
+ default provider, language, style, and emoji preference, and for Claude
65
+ and OpenAI whether to use a subscription. It then collects the API key
66
+ (hidden input) if one is needed. It writes
64
67
  `~/.config/cai/cai_config.yml` and, for providers that need one,
65
68
  `~/.config/cai/tokens.yml` with mode `0600`. Existing token entries
66
69
  for other providers are preserved.
@@ -73,8 +76,8 @@ First run / configuration (manual):
73
76
  - Add at least one API key to `~/.config/cai/tokens.yml` (created as a template if missing).
74
77
  The YAML keys are provider names (for example: `openai`, `anthropic`, `gemini`,
75
78
  `groq`, `xai`, `mistral`, `deepseek`).
76
- If you use `ollama` as provider, no token is required. Custom providers use
77
- their own name as key (see below).
79
+ If you use `ollama` as provider or a subscription (see below), no token is
80
+ required. Custom providers use their own name as key (see below).
78
81
  - In `~/.config/cai/cai_config.yml`, set `default:` to the provider you want and
79
82
  adjust the provider block (model/temperature) as needed.
80
83
 
@@ -90,6 +93,35 @@ Custom prompts (optional):
90
93
  - Generate prompt files in the current directory with `git cai -p`.
91
94
  - Point `prompt_file` / `squash_prompt_file` in `cai_config.yml` to your custom files.
92
95
 
96
+ Subscription instead of API (optional):
97
+
98
+ - A Claude, OpenAI (ChatGPT) or GitHub Copilot subscription can be used instead
99
+ of an API token. git-cai then calls the official command line tool of the
100
+ vendor, which must be installed and logged in:
101
+
102
+ Provider Command Log in with
103
+ anthropic claude claude auth login
104
+ openai codex codex login
105
+ copilot copilot copilot login
106
+
107
+ - Set `subscription: true` in `cai_config.yml`, or pass `--subscription` (`-U`)
108
+ for a single run. The default is `false`, which uses the API.
109
+ - `copilot` has no API, so it always uses the subscription. All other providers
110
+ ignore the setting and keep using their API.
111
+ - The model comes from the provider block, as with the API. With
112
+ `copilot.model: auto`, the default, Copilot picks the model.
113
+ - If the command is not installed, git-cai stops and explains how to install it.
114
+ It never switches to the API or to another provider on its own.
115
+ - API credentials in the environment (such as `ANTHROPIC_API_KEY`,
116
+ `OPENAI_API_KEY`, `CODEX_API_KEY`, and `COPILOT_PROVIDER_*`) are hidden from
117
+ the command, because it would bill the API account instead.
118
+ - The command runs in an empty directory. `claude` and `copilot` run without
119
+ tools. `codex` keeps a few built in ones, but runs in its read only sandbox and
120
+ without shell, web search, plugins, and connected ChatGPT apps.
121
+ - `temperature`, `base_url`, and `max_output_tokens` do not apply. The secret
122
+ scan stays active, since the diff leaves the machine.
123
+ - Every request counts against the usage limits of the subscription.
124
+
93
125
  Custom OpenAI compatible providers (optional):
94
126
 
95
127
  - Any service speaking the OpenAI `/chat/completions` API (OpenRouter, Together,
@@ -374,8 +406,9 @@ providers that require one) `~/.config/cai/tokens.yml` with mode
374
406
  `0600`.
375
407
  +
376
408
  The wizard asks for a default provider, language, commit-message
377
- style, whether to use emoji, and — for providers other than `ollama`
378
- — the API key. Input for the API key is hidden while you type.
409
+ style, whether to use emoji, whether to use a subscription (`anthropic` and
410
+ `openai`), and the API key if the choice needs one. Input for the API key is
411
+ hidden while you type.
379
412
  +
380
413
  If `~/.config/cai/cai_config.yml` already exists, the wizard prompts
381
414
  before overwriting it. Existing entries in `tokens.yml` for other
@@ -403,12 +436,47 @@ file for the completions to take effect.
403
436
  git cai -i
404
437
  ----
405
438
 
439
+ -j, --branch-trailer / --no-branch-trailer::
440
+ Append a `Branch: <name>` trailer with the current branch name to the
441
+ generated commit message. Applies in COMMIT, AMEND, and SQUASH modes.
442
+ The trailer goes at the bottom; when `--signoff` is active as well, it
443
+ sits directly above the `Signed-off-by:` line. On a detached HEAD there
444
+ is no branch name, so nothing is added. Off by default.
445
+ +
446
+ Use `--no-branch-trailer` to explicitly disable for the current run when
447
+ the persisted config has `branch_trailer: true`. To enable permanently:
448
+ +
449
+ ----
450
+ git cai -S branch_trailer=true
451
+ ----
452
+ +
453
+ ----
454
+ git cai -j
455
+ git cai -j -o
456
+ ----
457
+
458
+ -K, --no-subscription::
459
+ Use the API for this invocation even when the persisted config has
460
+ `subscription: true`. The provider then needs its API token as usual. This is
461
+ an error for `copilot`, which has no API. See `--subscription` (`-U`). To
462
+ disable the subscription permanently:
463
+ +
464
+ ----
465
+ git cai -H subscription=false
466
+ ----
467
+ +
468
+ ----
469
+ git cai -K
470
+ git cai -K -P anthropic
471
+ ----
472
+
406
473
  -k, --check::
407
474
  Run configuration diagnostics and exit. The check is offline by default: it
408
475
  reports which config is authoritative (repository, home, or built-in), validates
409
476
  the config keys, confirms the default provider has a model (and shows its
410
477
  `base_url` if set) and a usable token (skipped for `ollama` and providers with
411
- `requires_token: false`), that the commit/squash/full-files/PR prompts resolve, and that the
478
+ `requires_token: false`; with a subscription it checks that the command is
479
+ installed instead), that the commit/squash/full-files/PR prompts resolve, and that the
412
480
  configured editor is on `PATH`. Exits non-zero if any check fails. Add `--ping`
413
481
  to also probe the active provider with a tiny live request.
414
482
  +
@@ -521,7 +589,7 @@ git cai -s --signoff
521
589
  -P, --provider PROVIDER::
522
590
  Override the LLM provider for this invocation. The model and temperature
523
591
  from the configuration for that provider are used unless `--model` is also
524
- specified. Available providers: `anthropic`, `deepseek`, `gemini`, `groq`,
592
+ specified. Available providers: `anthropic`, `copilot`, `deepseek`, `gemini`, `groq`,
525
593
  `mistral`, `ollama`, `openai`, `xai`, plus any custom OpenAI compatible
526
594
  provider defined in the active config (see SETUP). Shell completion offers
527
595
  both.
@@ -694,9 +762,9 @@ git cai -s a1b2c3d
694
762
  ----
695
763
 
696
764
  -T, --timeout SECONDS::
697
- Override the HTTP timeout for the LLM call in this invocation. The default
698
- is 30 seconds for remote providers, 60 seconds for Gemini (Flash Lite can queue
699
- for up to 30 seconds) and 300 seconds for Ollama (since local generation can be
765
+ Override the timeout for the LLM call in this invocation. The default
766
+ is 30 seconds for remote providers, 60 seconds for Copilot and for Gemini (Flash
767
+ Lite can queue for up to 30 seconds) and 300 seconds for Ollama (since local generation can be
700
768
  significantly slower). The override applies uniformly to whichever provider is
701
769
  selected for this run, including those with their own `<provider>.timeout`.
702
770
  +
@@ -708,8 +776,9 @@ git cai -H timeout=60
708
776
  git cai -S timeout=45
709
777
  ----
710
778
  +
711
- Ollama and Gemini keep their own timeouts under `ollama.timeout` (default 300)
712
- and `gemini.timeout` (default 60). Override them separately:
779
+ Ollama, Gemini and Copilot keep their own timeouts under `ollama.timeout`
780
+ (default 300), `gemini.timeout` and `copilot.timeout` (default 60). Override them
781
+ separately:
713
782
  +
714
783
  ----
715
784
  git cai -H ollama.timeout=600
@@ -733,6 +802,23 @@ Can also be enabled permanently via `measure_time: true` in
733
802
  git cai -t
734
803
  ----
735
804
 
805
+ -U, --subscription::
806
+ Use the Claude (`anthropic`), OpenAI (`openai`) or GitHub Copilot (`copilot`)
807
+ subscription for this invocation instead of the API. The request goes through
808
+ the command line tool of the vendor, so no API token is needed. A provider
809
+ without a subscription is an error. See SETUP and `--no-subscription` (`-K`).
810
+ To enable it permanently:
811
+ +
812
+ ----
813
+ git cai -H subscription=true
814
+ ----
815
+ +
816
+ ----
817
+ git cai -U
818
+ git cai -U -P openai
819
+ git cai -P copilot
820
+ ----
821
+
736
822
  -u, --update::
737
823
  Check PyPI for a newer version of git-cai-cli. If an update is available,
738
824
  the new version number and the install command are printed.
@@ -885,13 +971,14 @@ Example output:
885
971
  ----
886
972
  Active configuration:
887
973
 
888
- default: groq
974
+ default: anthropic
975
+ subscription: false
889
976
  language: en
890
977
  style: professional
891
978
  emoji: true
892
- groq:
893
- model: openai/gpt-oss-20b
894
- temperature: 0
979
+ anthropic:
980
+ model: claude-haiku-5-5
981
+ max_output_tokens: 32768
895
982
  ...
896
983
  ----
897
984
 
@@ -941,6 +1028,7 @@ Example output:
941
1028
  Default models:
942
1029
 
943
1030
  anthropic → claude-haiku-5-5
1031
+ copilot → auto
944
1032
  deepseek → deepseek-flash
945
1033
  gemini → gemini-3.5-flash-lite
946
1034
  groq → openai/gpt-oss-20b
@@ -991,8 +1079,8 @@ Configuration file paths:
991
1079
 
992
1080
  provider::
993
1081
  List all supported LLM providers. Each provider is shown with its default
994
- model and whether an API token is required. Providers that do not require a
995
- token (`ollama`, and custom providers with `requires_token: false`) are
1082
+ model and whether it needs an API token or can use a subscription. Providers
1083
+ that do not require a token (`ollama`, `copilot`, and custom providers with `requires_token: false`) are
996
1084
  marked accordingly. Custom OpenAI compatible providers from the active config
997
1085
  follow in a separate section with their `base_url`.
998
1086
  +
@@ -1005,13 +1093,14 @@ Example output:
1005
1093
  ----
1006
1094
  Supported providers:
1007
1095
 
1008
- anthropic model: claude-haiku-5-5 (token required)
1096
+ anthropic model: claude-haiku-5-5 (token or subscription)
1097
+ copilot model: auto (subscription, no token required)
1009
1098
  deepseek model: deepseek-flash (token required)
1010
1099
  gemini model: gemini-3.5-flash-lite (token required)
1011
1100
  groq model: openai/gpt-oss-20b (token required)
1012
1101
  mistral model: codestral-2508 (token required)
1013
1102
  ollama model: gemma4:e2b (no token required)
1014
- openai model: gpt-6-luna (token required)
1103
+ openai model: gpt-6-luna (token or subscription)
1015
1104
  xai model: grok-4.3 (token required)
1016
1105
 
1017
1106
  Custom providers (OpenAI compatible, from config):
@@ -1063,12 +1152,17 @@ in cai_config.yml
1063
1152
 
1064
1153
  Available configuration keys:
1065
1154
 
1066
- - `default` -- default LLM provider name
1155
+ - `default` -- default LLM provider name (default `anthropic`)
1156
+ - `subscription` -- use the Claude, OpenAI or Copilot subscription through the
1157
+ command line tool of the vendor instead of the API (`true`/`false`, default
1158
+ `false`). Ignored by providers without a subscription. See SETUP.
1067
1159
  - `language` -- language for commit messages (e.g., `en`, `de`, `fr`)
1068
1160
  - `style` -- tone of the commit message (`professional`, `neutral`, `friendly`,
1069
1161
  `funny`, `excited`, `sarcastic`, `apologetic`, `academic`)
1070
1162
  - `emoji` -- enable or disable emojis in commit messages (`true`/`false`)
1071
1163
  - `branch_context` -- include current branch name as LLM context (`true`/`false`)
1164
+ - `branch_trailer` -- append a `Branch: <name>` trailer above any sign-off
1165
+ (`true`/`false`, default `false`)
1072
1166
  - `conventional` -- use Conventional Commits format (`true`/`false`)
1073
1167
  - `secret_scan` -- scan the diff (and any full-file contents) for likely
1074
1168
  secrets before sending to the LLM (`true`/`false`, default `true`). On a
@@ -1095,7 +1189,7 @@ Available configuration keys:
1095
1189
  - `squash_prompt_file` -- path to the squash prompt Markdown file
1096
1190
  - `token_logging` -- log token usage after each LLM call (`true`/`false`)
1097
1191
  - `measure_time` -- log generation time (`true`/`false`)
1098
- - `timeout` -- HTTP timeout in seconds for remote LLM calls (default `30`)
1192
+ - `timeout` -- timeout in seconds for remote LLM calls (default `30`)
1099
1193
  - `full_files` -- send full working-tree contents of staged files alongside
1100
1194
  the diff (`true`/`false`, default `false`)
1101
1195
  - `max_diff_bytes` -- maximum size (in UTF-8 bytes) of the diff/commit-log
@@ -1145,7 +1239,8 @@ Available configuration keys:
1145
1239
  `anthropic` the default is `32768` (`max_tokens` is still read as a legacy
1146
1240
  alias). For OpenAI compatible providers it is only sent when set.
1147
1241
  - `<provider>.timeout` -- HTTP timeout in seconds for one provider,
1148
- overriding the global `timeout` (`ollama` defaults to `300`, `gemini` to `60`).
1242
+ overriding the global `timeout` (`ollama` defaults to `300`, `gemini` and
1243
+ `copilot` to `60`).
1149
1244
  The `--timeout` flag overrides both.
1150
1245
  - `stats` -- opt in to local-only usage analytics (`true`/`false`,
1151
1246
  default `false`). When enabled, every generation appends one row to
@@ -1304,6 +1399,14 @@ Override the provider for a single invocation:
1304
1399
  git cai -P anthropic
1305
1400
  ----
1306
1401
 
1402
+ Use a subscription instead of the API:
1403
+
1404
+ ----
1405
+ git cai -U
1406
+ git cai -U -P openai
1407
+ git cai -P copilot
1408
+ ----
1409
+
1307
1410
  Use a custom OpenAI compatible provider defined in the config:
1308
1411
 
1309
1412
  ----