git-cai-cli 0.13.3__tar.gz → 0.13.5__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.
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/PKG-INFO +10 -10
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/README.md +9 -9
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/docs/git-cai.txt +57 -69
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/docs/man/git-cai.1 +71 -95
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/_version.py +3 -3
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/cli/cli.py +1 -1
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/cli/helptext.py +6 -5
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/PKG-INFO +10 -10
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/uv.lock +118 -118
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.caiignore +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.gitattributes +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/cd/.SRCINFO +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/cd/PKGBUILD +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/ci/_version.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/ci/cai_config.ci.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/ci/tokens.ci.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/workflows/python-tests.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/workflows/release.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.github/workflows/release_aur.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.gitignore +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.bandit.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.checkov.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.flake8 +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.ls-lint.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.markdown-link-check.json +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.markdownlint.json +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.proselintrc +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.pylintrc +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/.yamllint.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/check_git_branch_name.sh +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/lychee.toml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.linters/pyrightconfig.json +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.markdownlintignore +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.mega-linter.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.semgrepignore +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/.trivyignore +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/CLAUDE.md +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/LICENSE +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/Makefile +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/cai_config.yml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/pyproject.toml +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/setup.cfg +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/__init__.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/cli/__init__.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/cli/modes.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/__init__.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/completion.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/config.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/editors.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/gitutils.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/languages.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/llm.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/options.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/pr.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/prompts_fallback.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/spinner.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/squash.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/stats.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/core/validate.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli/main.py +11 -11
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/SOURCES.txt +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/dependency_links.txt +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/entry_points.txt +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/requires.txt +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/src/git_cai_cli.egg-info/top_level.txt +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/conftest.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_cli_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_config_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_gitutils_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_modes_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_options_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_pr_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/integration/test_squash_integration.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_amend.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_branch_context.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_cli.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_completion.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_config.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_conventional.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_gitutils.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_helptext.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_llm.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_main.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_modes.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_options.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_pr.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_prompt_loading.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_set_config.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_spinner.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_squash.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_stats.py +0 -0
- {git_cai_cli-0.13.3 → git_cai_cli-0.13.5}/tests/unit/test_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-cai-cli
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.5
|
|
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
|
|
@@ -260,15 +260,15 @@ In addition to `git cai`, the following options are available:
|
|
|
260
260
|
- `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
|
|
261
261
|
- `-h`, `--help` – show help and available commands
|
|
262
262
|
- `-i`, `--install-completion` – install shell completion for bash, zsh, or fish
|
|
263
|
-
- `-l`, `--list` – list available information
|
|
263
|
+
- `-l`, `--list` – list available information. Valid types: `config`, `editor`, `language`, `model`, `path`, `provider`, `style`
|
|
264
264
|
- `-m`, `--model` – override the model for this invocation (requires `-P`)
|
|
265
265
|
- `-P`, `--provider` – override the LLM provider for this invocation
|
|
266
266
|
- `-p`, `--generate-prompts` – generate default `commit_prompt.md` and `squash_prompt.md` in the current directory (for customization)
|
|
267
|
-
- `-Q`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
268
|
-
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
269
|
-
- `--json` – render `--stats` output as JSON
|
|
270
|
-
- `--reset-stats` – delete all rows from the local stats DB
|
|
271
267
|
- `-q`, `--sql true|false` – override stats writing for this run (wins over the persisted `stats` config)
|
|
268
|
+
- `-z`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
269
|
+
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
270
|
+
- `--json` – render `--stats` output as JSON
|
|
271
|
+
- `--reset-stats` – delete all rows from the local stats DB
|
|
272
272
|
- `-r`, `--PR` – generate a Pull Request description from the commits between the current branch and its base (prints to stdout by default; set `pr_to_file=true` to write a Markdown file)
|
|
273
273
|
- `--base` `BRANCH` – explicit base branch for `--PR` (overrides auto-detection: `origin/HEAD` → `main` → `master`)
|
|
274
274
|
- `-S`, `--set` – set a config value (`key=value`) in repo config (requires existing repo config)
|
|
@@ -375,10 +375,10 @@ git cai -H stats=true # or in the home config
|
|
|
375
375
|
git cai -q true # one-off opt-in regardless of config
|
|
376
376
|
git cai -q false # one-off opt-out
|
|
377
377
|
|
|
378
|
-
git cai
|
|
379
|
-
git cai -
|
|
380
|
-
git cai
|
|
381
|
-
git cai --reset-stats
|
|
378
|
+
git cai -z # text summary
|
|
379
|
+
git cai -z --json # machine-readable
|
|
380
|
+
git cai --stats --since 2026-01-01 # date filter
|
|
381
|
+
git cai --stats --reset-stats # wipe all rows
|
|
382
382
|
```
|
|
383
383
|
|
|
384
384
|
Rows are split by `kind` (`commit`, `amend`, `squash`, `pr`) and capture provider, model, repo name, token counts, real LLM latency, and a snapshot of the active settings (language, style, emoji, temperature, prompt file).
|
|
@@ -230,15 +230,15 @@ In addition to `git cai`, the following options are available:
|
|
|
230
230
|
- `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
|
|
231
231
|
- `-h`, `--help` – show help and available commands
|
|
232
232
|
- `-i`, `--install-completion` – install shell completion for bash, zsh, or fish
|
|
233
|
-
- `-l`, `--list` – list available information
|
|
233
|
+
- `-l`, `--list` – list available information. Valid types: `config`, `editor`, `language`, `model`, `path`, `provider`, `style`
|
|
234
234
|
- `-m`, `--model` – override the model for this invocation (requires `-P`)
|
|
235
235
|
- `-P`, `--provider` – override the LLM provider for this invocation
|
|
236
236
|
- `-p`, `--generate-prompts` – generate default `commit_prompt.md` and `squash_prompt.md` in the current directory (for customization)
|
|
237
|
-
- `-Q`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
238
|
-
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
239
|
-
- `--json` – render `--stats` output as JSON
|
|
240
|
-
- `--reset-stats` – delete all rows from the local stats DB
|
|
241
237
|
- `-q`, `--sql true|false` – override stats writing for this run (wins over the persisted `stats` config)
|
|
238
|
+
- `-z`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
239
|
+
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
240
|
+
- `--json` – render `--stats` output as JSON
|
|
241
|
+
- `--reset-stats` – delete all rows from the local stats DB
|
|
242
242
|
- `-r`, `--PR` – generate a Pull Request description from the commits between the current branch and its base (prints to stdout by default; set `pr_to_file=true` to write a Markdown file)
|
|
243
243
|
- `--base` `BRANCH` – explicit base branch for `--PR` (overrides auto-detection: `origin/HEAD` → `main` → `master`)
|
|
244
244
|
- `-S`, `--set` – set a config value (`key=value`) in repo config (requires existing repo config)
|
|
@@ -345,10 +345,10 @@ git cai -H stats=true # or in the home config
|
|
|
345
345
|
git cai -q true # one-off opt-in regardless of config
|
|
346
346
|
git cai -q false # one-off opt-out
|
|
347
347
|
|
|
348
|
-
git cai
|
|
349
|
-
git cai -
|
|
350
|
-
git cai
|
|
351
|
-
git cai --reset-stats
|
|
348
|
+
git cai -z # text summary
|
|
349
|
+
git cai -z --json # machine-readable
|
|
350
|
+
git cai --stats --since 2026-01-01 # date filter
|
|
351
|
+
git cai --stats --reset-stats # wipe all rows
|
|
352
352
|
```
|
|
353
353
|
|
|
354
354
|
Rows are split by `kind` (`commit`, `amend`, `squash`, `pr`) and capture provider, model, repo name, token counts, real LLM latency, and a snapshot of the active settings (language, style, emoji, temperature, prompt file).
|
|
@@ -23,11 +23,11 @@ SYNOPSIS
|
|
|
23
23
|
[-r | --PR] [--base BRANCH]
|
|
24
24
|
[-S KEY=VALUE | --set KEY=VALUE]
|
|
25
25
|
[-s [N|HASH] | --squash [N|HASH]]
|
|
26
|
-
[-Q | --stats] [--since YYYY-MM-DD] [--json] [--reset-stats]
|
|
27
26
|
[-q true|false | --sql true|false]
|
|
28
27
|
[-T SECONDS | --timeout SECONDS]
|
|
29
28
|
[-t | --time] [-u | --update] [-v | --version]
|
|
30
29
|
[-x CONTEXT | --context CONTEXT]
|
|
30
|
+
[-z | --stats] [--since YYYY-MM-DD] [--json] [--reset-stats]
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
DESCRIPTION
|
|
@@ -310,73 +310,6 @@ overwrites.
|
|
|
310
310
|
git cai -p
|
|
311
311
|
----
|
|
312
312
|
|
|
313
|
-
-Q, --stats::
|
|
314
|
-
Show local-only usage analytics: commits and squashes generated, top
|
|
315
|
-
provider, total token counts, average latency, and per-provider rollups.
|
|
316
|
-
Recording is opt-in via the top-level `stats` config key (a plain
|
|
317
|
-
boolean, default `false`), so this view is empty until you turn writing
|
|
318
|
-
on. No diff content, commit messages, or file paths are stored — only
|
|
319
|
-
metadata.
|
|
320
|
-
+
|
|
321
|
-
Combine with `--since YYYY-MM-DD` to scope the view to recent activity, or
|
|
322
|
-
with `--json` to emit machine-readable output. Use `--reset-stats` to
|
|
323
|
-
clear the local SQLite database.
|
|
324
|
-
+
|
|
325
|
-
The DB lives at `$XDG_DATA_HOME/git-cai/stats.db` (default
|
|
326
|
-
`~/.local/share/git-cai/stats.db`). Override with the top-level
|
|
327
|
-
`stats_db_path` config key.
|
|
328
|
-
+
|
|
329
|
-
At the start of every run, git-cai logs whether stats writing is
|
|
330
|
-
enabled and (when enabled) the path of the SQLite database, so users
|
|
331
|
-
always know where their analytics live.
|
|
332
|
-
+
|
|
333
|
-
If the running Python build was compiled without sqlite3, this command
|
|
334
|
-
prints a clear message explaining how to fix it; commit generation
|
|
335
|
-
continues to work normally in that case.
|
|
336
|
-
+
|
|
337
|
-
The `stats` (and `stats_db_path`) keys are the one configuration
|
|
338
|
-
exception that does not follow the strict repo-replaces-home rule:
|
|
339
|
-
when the repo `cai_config.yml` does not mention them, the values are
|
|
340
|
-
taken from the home `~/.config/cai/cai_config.yml`. If neither file
|
|
341
|
-
defines `stats`, the hardcoded default is `false`. Use `git cai -g` to
|
|
342
|
-
write a fresh config that includes the setting so it is visible.
|
|
343
|
-
+
|
|
344
|
-
----
|
|
345
|
-
git cai --stats
|
|
346
|
-
git cai -Q --since 2026-01-01
|
|
347
|
-
git cai -Q --json
|
|
348
|
-
git cai --reset-stats
|
|
349
|
-
----
|
|
350
|
-
|
|
351
|
-
--since YYYY-MM-DD::
|
|
352
|
-
Restrict `--stats` (`-Q`) output to events recorded on or after this UTC
|
|
353
|
-
date. Has no effect outside of `--stats`. The date format is strict
|
|
354
|
-
ISO-8601 (e.g. `2026-01-15`).
|
|
355
|
-
+
|
|
356
|
-
----
|
|
357
|
-
git cai -Q --since 2026-01-01
|
|
358
|
-
----
|
|
359
|
-
|
|
360
|
-
--json::
|
|
361
|
-
Emit `--stats` (`-Q`) output as a JSON document instead of the text
|
|
362
|
-
summary. Suitable for piping into `jq` or other tooling. Has no effect
|
|
363
|
-
outside of `--stats`.
|
|
364
|
-
+
|
|
365
|
-
----
|
|
366
|
-
git cai -Q --json
|
|
367
|
-
git cai -Q --json --since 2026-01-01 | jq '.per_provider'
|
|
368
|
-
----
|
|
369
|
-
|
|
370
|
-
--reset-stats::
|
|
371
|
-
Delete every row from the local stats SQLite DB and exit. Prints the
|
|
372
|
-
number of rows removed. The schema and DB file are preserved (so the
|
|
373
|
-
next opt-in run records into the same file). No-op when the DB does
|
|
374
|
-
not yet exist.
|
|
375
|
-
+
|
|
376
|
-
----
|
|
377
|
-
git cai --reset-stats
|
|
378
|
-
----
|
|
379
|
-
|
|
380
313
|
-q, --sql VALUE::
|
|
381
314
|
Per-invocation override for `stats.enabled`. VALUE is `true` or `false`
|
|
382
315
|
(also accepts `yes/no`, `on/off`, `1/0`). Wins over the persisted config
|
|
@@ -546,6 +479,61 @@ git cai --squash -x "Resolves JIRA-99"
|
|
|
546
479
|
git cai -r -x "Closes JIRA-1234"
|
|
547
480
|
----
|
|
548
481
|
|
|
482
|
+
-z, --stats::
|
|
483
|
+
Show local-only usage analytics: commits and squashes generated, top
|
|
484
|
+
provider, total token counts, average latency, and per-provider rollups.
|
|
485
|
+
Recording is opt-in via the top-level `stats` config key (a plain
|
|
486
|
+
boolean, default `false`), so this view is empty until you turn writing
|
|
487
|
+
on. No diff content, commit messages, or file paths are stored — only
|
|
488
|
+
metadata.
|
|
489
|
+
+
|
|
490
|
+
The DB lives at `$XDG_DATA_HOME/git-cai/stats.db` (default
|
|
491
|
+
`~/.local/share/git-cai/stats.db`). Override with the top-level
|
|
492
|
+
`stats_db_path` config key.
|
|
493
|
+
+
|
|
494
|
+
At the start of every run, git-cai logs whether stats writing is
|
|
495
|
+
enabled and (when enabled) the path of the SQLite database, so users
|
|
496
|
+
always know where their analytics live.
|
|
497
|
+
+
|
|
498
|
+
If the running Python build was compiled without sqlite3, this command
|
|
499
|
+
prints a clear message explaining how to fix it; commit generation
|
|
500
|
+
continues to work normally in that case.
|
|
501
|
+
+
|
|
502
|
+
The `stats` (and `stats_db_path`) keys are the one configuration
|
|
503
|
+
exception that does not follow the strict repo-replaces-home rule:
|
|
504
|
+
when the repo `cai_config.yml` does not mention them, the values are
|
|
505
|
+
taken from the home `~/.config/cai/cai_config.yml`. If neither file
|
|
506
|
+
defines `stats`, the hardcoded default is `false`. Use `git cai -g` to
|
|
507
|
+
write a fresh config that includes the setting so it is visible.
|
|
508
|
+
+
|
|
509
|
+
Cannot be combined with `--amend`, `--list`, `--PR`, `--squash`, or
|
|
510
|
+
`--update`.
|
|
511
|
+
+
|
|
512
|
+
Modifiers for `--stats`:
|
|
513
|
+
+
|
|
514
|
+
`--since YYYY-MM-DD`;;
|
|
515
|
+
Restrict output to events recorded on or after this UTC date. The date
|
|
516
|
+
format is strict ISO-8601 (e.g. `2026-01-15`).
|
|
517
|
+
+
|
|
518
|
+
`--json`;;
|
|
519
|
+
Emit output as a JSON document instead of the text summary. Suitable
|
|
520
|
+
for piping into `jq` or other tooling.
|
|
521
|
+
+
|
|
522
|
+
`--reset-stats`;;
|
|
523
|
+
Delete every row from the local stats SQLite DB and exit. Prints the
|
|
524
|
+
number of rows removed. The schema and DB file are preserved (so the
|
|
525
|
+
next opt-in run records into the same file). No-op when the DB does
|
|
526
|
+
not yet exist.
|
|
527
|
+
+
|
|
528
|
+
----
|
|
529
|
+
git cai -z
|
|
530
|
+
git cai --stats
|
|
531
|
+
git cai -z --since 2026-01-01
|
|
532
|
+
git cai -z --json
|
|
533
|
+
git cai -z --json --since 2026-01-01 | jq '.per_provider'
|
|
534
|
+
git cai --stats --reset-stats
|
|
535
|
+
----
|
|
536
|
+
|
|
549
537
|
LIST TYPES
|
|
550
538
|
----------
|
|
551
539
|
The argument to `--list` must be one of the following:
|
|
@@ -776,7 +764,7 @@ Available configuration keys:
|
|
|
776
764
|
model, token counts, real LLM latency, and a snapshot of the active
|
|
777
765
|
settings (language, style, emoji, temperature, prompt file). No diff
|
|
778
766
|
content, commit messages, or file paths are stored. View the rollup
|
|
779
|
-
with `git cai
|
|
767
|
+
with `git cai -z` (`--stats`).
|
|
780
768
|
|
|
781
769
|
FILES
|
|
782
770
|
-----
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
.\" Title: git-cai
|
|
3
3
|
.\" Author: Thorsten Foltz
|
|
4
4
|
.\" Generator: Asciidoctor 2.0.26
|
|
5
|
-
.\" Date: 2026-05-
|
|
5
|
+
.\" Date: 2026-05-12
|
|
6
6
|
.\" Manual: \ \&
|
|
7
7
|
.\" Source: \ \&
|
|
8
8
|
.\" Language: English
|
|
9
9
|
.\"
|
|
10
|
-
.TH "GIT\-CAI" "1" "2026-05-
|
|
10
|
+
.TH "GIT\-CAI" "1" "2026-05-12" "\ \&" "\ \&"
|
|
11
11
|
.ie \n(.g .ds Aq \(aq
|
|
12
12
|
.el .ds Aq '
|
|
13
13
|
.ss \n[.ss] 0
|
|
@@ -45,11 +45,11 @@ git-cai \- AI\-powered commit message generator
|
|
|
45
45
|
[\-r | \-\-PR] [\-\-base BRANCH]
|
|
46
46
|
[\-S KEY=VALUE | \-\-set KEY=VALUE]
|
|
47
47
|
[\-s [N|HASH] | \-\-squash [N|HASH]]
|
|
48
|
-
[\-Q | \-\-stats] [\-\-since YYYY\-MM\-DD] [\-\-json] [\-\-reset\-stats]
|
|
49
48
|
[\-q true|false | \-\-sql true|false]
|
|
50
49
|
[\-T SECONDS | \-\-timeout SECONDS]
|
|
51
50
|
[\-t | \-\-time] [\-u | \-\-update] [\-v | \-\-version]
|
|
52
51
|
[\-x CONTEXT | \-\-context CONTEXT]
|
|
52
|
+
[\-z | \-\-stats] [\-\-since YYYY\-MM\-DD] [\-\-json] [\-\-reset\-stats]
|
|
53
53
|
.fi
|
|
54
54
|
.br
|
|
55
55
|
.SH "DESCRIPTION"
|
|
@@ -534,97 +534,6 @@ git cai \-p
|
|
|
534
534
|
.if n .RE
|
|
535
535
|
.RE
|
|
536
536
|
.sp
|
|
537
|
-
\-Q, \-\-stats
|
|
538
|
-
.RS 4
|
|
539
|
-
Show local\-only usage analytics: commits and squashes generated, top
|
|
540
|
-
provider, total token counts, average latency, and per\-provider rollups.
|
|
541
|
-
Recording is opt\-in via the top\-level \f(CRstats\fP config key (a plain
|
|
542
|
-
boolean, default \f(CRfalse\fP), so this view is empty until you turn writing
|
|
543
|
-
on. No diff content, commit messages, or file paths are stored — only
|
|
544
|
-
metadata.
|
|
545
|
-
.sp
|
|
546
|
-
Combine with \f(CR\-\-since YYYY\-MM\-DD\fP to scope the view to recent activity, or
|
|
547
|
-
with \f(CR\-\-json\fP to emit machine\-readable output. Use \f(CR\-\-reset\-stats\fP to
|
|
548
|
-
clear the local SQLite database.
|
|
549
|
-
.sp
|
|
550
|
-
The DB lives at \f(CR$XDG_DATA_HOME/git\-cai/stats.db\fP (default
|
|
551
|
-
\f(CR~/.local/share/git\-cai/stats.db\fP). Override with the top\-level
|
|
552
|
-
\f(CRstats_db_path\fP config key.
|
|
553
|
-
.sp
|
|
554
|
-
At the start of every run, git\-cai logs whether stats writing is
|
|
555
|
-
enabled and (when enabled) the path of the SQLite database, so users
|
|
556
|
-
always know where their analytics live.
|
|
557
|
-
.sp
|
|
558
|
-
If the running Python build was compiled without sqlite3, this command
|
|
559
|
-
prints a clear message explaining how to fix it; commit generation
|
|
560
|
-
continues to work normally in that case.
|
|
561
|
-
.sp
|
|
562
|
-
The \f(CRstats\fP (and \f(CRstats_db_path\fP) keys are the one configuration
|
|
563
|
-
exception that does not follow the strict repo\-replaces\-home rule:
|
|
564
|
-
when the repo \f(CRcai_config.yml\fP does not mention them, the values are
|
|
565
|
-
taken from the home \f(CR~/.config/cai/cai_config.yml\fP. If neither file
|
|
566
|
-
defines \f(CRstats\fP, the hardcoded default is \f(CRfalse\fP. Use \f(CRgit cai \-g\fP to
|
|
567
|
-
write a fresh config that includes the setting so it is visible.
|
|
568
|
-
.sp
|
|
569
|
-
.if n .RS 4
|
|
570
|
-
.nf
|
|
571
|
-
.fam C
|
|
572
|
-
git cai \-\-stats
|
|
573
|
-
git cai \-Q \-\-since 2026\-01\-01
|
|
574
|
-
git cai \-Q \-\-json
|
|
575
|
-
git cai \-\-reset\-stats
|
|
576
|
-
.fam
|
|
577
|
-
.fi
|
|
578
|
-
.if n .RE
|
|
579
|
-
.RE
|
|
580
|
-
.sp
|
|
581
|
-
\-\-since YYYY\-MM\-DD
|
|
582
|
-
.RS 4
|
|
583
|
-
Restrict \f(CR\-\-stats\fP (\f(CR\-Q\fP) output to events recorded on or after this UTC
|
|
584
|
-
date. Has no effect outside of \f(CR\-\-stats\fP. The date format is strict
|
|
585
|
-
ISO\-8601 (e.g. \f(CR2026\-01\-15\fP).
|
|
586
|
-
.sp
|
|
587
|
-
.if n .RS 4
|
|
588
|
-
.nf
|
|
589
|
-
.fam C
|
|
590
|
-
git cai \-Q \-\-since 2026\-01\-01
|
|
591
|
-
.fam
|
|
592
|
-
.fi
|
|
593
|
-
.if n .RE
|
|
594
|
-
.RE
|
|
595
|
-
.sp
|
|
596
|
-
\-\-json
|
|
597
|
-
.RS 4
|
|
598
|
-
Emit \f(CR\-\-stats\fP (\f(CR\-Q\fP) output as a JSON document instead of the text
|
|
599
|
-
summary. Suitable for piping into \f(CRjq\fP or other tooling. Has no effect
|
|
600
|
-
outside of \f(CR\-\-stats\fP.
|
|
601
|
-
.sp
|
|
602
|
-
.if n .RS 4
|
|
603
|
-
.nf
|
|
604
|
-
.fam C
|
|
605
|
-
git cai \-Q \-\-json
|
|
606
|
-
git cai \-Q \-\-json \-\-since 2026\-01\-01 | jq \*(Aq.per_provider\*(Aq
|
|
607
|
-
.fam
|
|
608
|
-
.fi
|
|
609
|
-
.if n .RE
|
|
610
|
-
.RE
|
|
611
|
-
.sp
|
|
612
|
-
\-\-reset\-stats
|
|
613
|
-
.RS 4
|
|
614
|
-
Delete every row from the local stats SQLite DB and exit. Prints the
|
|
615
|
-
number of rows removed. The schema and DB file are preserved (so the
|
|
616
|
-
next opt\-in run records into the same file). No\-op when the DB does
|
|
617
|
-
not yet exist.
|
|
618
|
-
.sp
|
|
619
|
-
.if n .RS 4
|
|
620
|
-
.nf
|
|
621
|
-
.fam C
|
|
622
|
-
git cai \-\-reset\-stats
|
|
623
|
-
.fam
|
|
624
|
-
.fi
|
|
625
|
-
.if n .RE
|
|
626
|
-
.RE
|
|
627
|
-
.sp
|
|
628
537
|
\-q, \-\-sql VALUE
|
|
629
538
|
.RS 4
|
|
630
539
|
Per\-invocation override for \f(CRstats.enabled\fP. VALUE is \f(CRtrue\fP or \f(CRfalse\fP
|
|
@@ -861,6 +770,73 @@ git cai \-r \-x "Closes JIRA\-1234"
|
|
|
861
770
|
.fi
|
|
862
771
|
.if n .RE
|
|
863
772
|
.RE
|
|
773
|
+
.sp
|
|
774
|
+
\-z, \-\-stats
|
|
775
|
+
.RS 4
|
|
776
|
+
Show local\-only usage analytics: commits and squashes generated, top
|
|
777
|
+
provider, total token counts, average latency, and per\-provider rollups.
|
|
778
|
+
Recording is opt\-in via the top\-level \f(CRstats\fP config key (a plain
|
|
779
|
+
boolean, default \f(CRfalse\fP), so this view is empty until you turn writing
|
|
780
|
+
on. No diff content, commit messages, or file paths are stored — only
|
|
781
|
+
metadata.
|
|
782
|
+
.sp
|
|
783
|
+
The DB lives at \f(CR$XDG_DATA_HOME/git\-cai/stats.db\fP (default
|
|
784
|
+
\f(CR~/.local/share/git\-cai/stats.db\fP). Override with the top\-level
|
|
785
|
+
\f(CRstats_db_path\fP config key.
|
|
786
|
+
.sp
|
|
787
|
+
At the start of every run, git\-cai logs whether stats writing is
|
|
788
|
+
enabled and (when enabled) the path of the SQLite database, so users
|
|
789
|
+
always know where their analytics live.
|
|
790
|
+
.sp
|
|
791
|
+
If the running Python build was compiled without sqlite3, this command
|
|
792
|
+
prints a clear message explaining how to fix it; commit generation
|
|
793
|
+
continues to work normally in that case.
|
|
794
|
+
.sp
|
|
795
|
+
The \f(CRstats\fP (and \f(CRstats_db_path\fP) keys are the one configuration
|
|
796
|
+
exception that does not follow the strict repo\-replaces\-home rule:
|
|
797
|
+
when the repo \f(CRcai_config.yml\fP does not mention them, the values are
|
|
798
|
+
taken from the home \f(CR~/.config/cai/cai_config.yml\fP. If neither file
|
|
799
|
+
defines \f(CRstats\fP, the hardcoded default is \f(CRfalse\fP. Use \f(CRgit cai \-g\fP to
|
|
800
|
+
write a fresh config that includes the setting so it is visible.
|
|
801
|
+
.sp
|
|
802
|
+
Cannot be combined with \f(CR\-\-amend\fP, \f(CR\-\-list\fP, \f(CR\-\-PR\fP, \f(CR\-\-squash\fP, or
|
|
803
|
+
\f(CR\-\-update\fP.
|
|
804
|
+
.sp
|
|
805
|
+
Modifiers for \f(CR\-\-stats\fP:
|
|
806
|
+
.sp
|
|
807
|
+
\f(CR\-\-since YYYY\-MM\-DD\fP
|
|
808
|
+
.RS 4
|
|
809
|
+
Restrict output to events recorded on or after this UTC date. The date
|
|
810
|
+
format is strict ISO\-8601 (e.g. \f(CR2026\-01\-15\fP).
|
|
811
|
+
.RE
|
|
812
|
+
.sp
|
|
813
|
+
\f(CR\-\-json\fP
|
|
814
|
+
.RS 4
|
|
815
|
+
Emit output as a JSON document instead of the text summary. Suitable
|
|
816
|
+
for piping into \f(CRjq\fP or other tooling.
|
|
817
|
+
.RE
|
|
818
|
+
.sp
|
|
819
|
+
\f(CR\-\-reset\-stats\fP
|
|
820
|
+
.RS 4
|
|
821
|
+
Delete every row from the local stats SQLite DB and exit. Prints the
|
|
822
|
+
number of rows removed. The schema and DB file are preserved (so the
|
|
823
|
+
next opt\-in run records into the same file). No\-op when the DB does
|
|
824
|
+
not yet exist.
|
|
825
|
+
.sp
|
|
826
|
+
.if n .RS 4
|
|
827
|
+
.nf
|
|
828
|
+
.fam C
|
|
829
|
+
git cai \-z
|
|
830
|
+
git cai \-\-stats
|
|
831
|
+
git cai \-z \-\-since 2026\-01\-01
|
|
832
|
+
git cai \-z \-\-json
|
|
833
|
+
git cai \-z \-\-json \-\-since 2026\-01\-01 | jq \*(Aq.per_provider\*(Aq
|
|
834
|
+
git cai \-\-stats \-\-reset\-stats
|
|
835
|
+
.fam
|
|
836
|
+
.fi
|
|
837
|
+
.if n .RE
|
|
838
|
+
.RE
|
|
839
|
+
.RE
|
|
864
840
|
.SH "LIST TYPES"
|
|
865
841
|
.sp
|
|
866
842
|
The argument to \f(CR\-\-list\fP must be one of the following:
|
|
@@ -1397,7 +1373,7 @@ default \f(CRfalse\fP). When enabled, every generation appends one row to
|
|
|
1397
1373
|
model, token counts, real LLM latency, and a snapshot of the active
|
|
1398
1374
|
settings (language, style, emoji, temperature, prompt file). No diff
|
|
1399
1375
|
content, commit messages, or file paths are stored. View the rollup
|
|
1400
|
-
with \f(CRgit cai
|
|
1376
|
+
with \f(CRgit cai \-z\fP (\f(CR\-\-stats\fP).
|
|
1401
1377
|
.RE
|
|
1402
1378
|
.SH "FILES"
|
|
1403
1379
|
.sp
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.13.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 13,
|
|
21
|
+
__version__ = version = '0.13.5'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 13, 5)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g310dca5e3'
|
|
@@ -144,7 +144,7 @@ def callback( # pylint: disable=too-many-arguments,too-many-positional-argument
|
|
|
144
144
|
stats: bool = typer.Option(
|
|
145
145
|
False,
|
|
146
146
|
"--stats",
|
|
147
|
-
"-
|
|
147
|
+
"-z",
|
|
148
148
|
help="Show local-only usage analytics (commits per provider, token totals, latency).",
|
|
149
149
|
),
|
|
150
150
|
stats_since: str = typer.Option(
|
|
@@ -27,14 +27,11 @@ Flags:
|
|
|
27
27
|
-H, --set-home KEY=VALUE Set a config value in home config (~/.config/cai/)
|
|
28
28
|
-h, --help Show this help message or opens manual
|
|
29
29
|
-i, --install-completion Install shell completion for git-cai
|
|
30
|
-
-l, --list
|
|
30
|
+
-l, --list [TYPE] List information. TYPE: config, editor, language,
|
|
31
|
+
model, path, provider, style
|
|
31
32
|
-m, --model NAME Override model for this invocation (requires --provider)
|
|
32
33
|
-P, --provider NAME Override LLM provider for this invocation
|
|
33
34
|
-p, --generate-prompts Generate default commit/squash/full_files/pr prompt files
|
|
34
|
-
-Q, --stats Show local-only usage analytics (commits, tokens, latency)
|
|
35
|
-
--since YYYY-MM-DD Filter --stats to events on or after this date
|
|
36
|
-
--json Render --stats output as JSON instead of text
|
|
37
|
-
--reset-stats Delete all rows from the local stats DB
|
|
38
35
|
-q, --sql true|false Override stats writing for this run (wins over config)
|
|
39
36
|
-r, --PR Generate a Pull Request description from the commits on this branch
|
|
40
37
|
--base BRANCH Base branch for --PR (overrides auto-detection)
|
|
@@ -48,6 +45,10 @@ Flags:
|
|
|
48
45
|
-u, --update Check for updates
|
|
49
46
|
-v, --version Show installed version
|
|
50
47
|
-x, --context TEXT Provide extra context for the LLM (e.g. ticket number, reason)
|
|
48
|
+
-z, --stats Show local-only usage analytics (commits, tokens, latency)
|
|
49
|
+
--since YYYY-MM-DD Filter --stats to events on or after this date
|
|
50
|
+
--json Render --stats output as JSON instead of text
|
|
51
|
+
--reset-stats Delete all rows from the local stats DB
|
|
51
52
|
|
|
52
53
|
Configuration:
|
|
53
54
|
Tokens are loaded from {HOME}/.config/cai/tokens.yml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: git-cai-cli
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.5
|
|
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
|
|
@@ -260,15 +260,15 @@ In addition to `git cai`, the following options are available:
|
|
|
260
260
|
- `-H`, `--set-home` – set a config value in home config (`key=value`), always targets `~/.config/cai/`
|
|
261
261
|
- `-h`, `--help` – show help and available commands
|
|
262
262
|
- `-i`, `--install-completion` – install shell completion for bash, zsh, or fish
|
|
263
|
-
- `-l`, `--list` – list available information
|
|
263
|
+
- `-l`, `--list` – list available information. Valid types: `config`, `editor`, `language`, `model`, `path`, `provider`, `style`
|
|
264
264
|
- `-m`, `--model` – override the model for this invocation (requires `-P`)
|
|
265
265
|
- `-P`, `--provider` – override the LLM provider for this invocation
|
|
266
266
|
- `-p`, `--generate-prompts` – generate default `commit_prompt.md` and `squash_prompt.md` in the current directory (for customization)
|
|
267
|
-
- `-Q`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
268
|
-
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
269
|
-
- `--json` – render `--stats` output as JSON
|
|
270
|
-
- `--reset-stats` – delete all rows from the local stats DB
|
|
271
267
|
- `-q`, `--sql true|false` – override stats writing for this run (wins over the persisted `stats` config)
|
|
268
|
+
- `-z`, `--stats` – show local-only usage analytics (commits/squashes/PRs per provider, tokens, average latency)
|
|
269
|
+
- `--since YYYY-MM-DD` – filter `--stats` to events on or after this date
|
|
270
|
+
- `--json` – render `--stats` output as JSON
|
|
271
|
+
- `--reset-stats` – delete all rows from the local stats DB
|
|
272
272
|
- `-r`, `--PR` – generate a Pull Request description from the commits between the current branch and its base (prints to stdout by default; set `pr_to_file=true` to write a Markdown file)
|
|
273
273
|
- `--base` `BRANCH` – explicit base branch for `--PR` (overrides auto-detection: `origin/HEAD` → `main` → `master`)
|
|
274
274
|
- `-S`, `--set` – set a config value (`key=value`) in repo config (requires existing repo config)
|
|
@@ -375,10 +375,10 @@ git cai -H stats=true # or in the home config
|
|
|
375
375
|
git cai -q true # one-off opt-in regardless of config
|
|
376
376
|
git cai -q false # one-off opt-out
|
|
377
377
|
|
|
378
|
-
git cai
|
|
379
|
-
git cai -
|
|
380
|
-
git cai
|
|
381
|
-
git cai --reset-stats
|
|
378
|
+
git cai -z # text summary
|
|
379
|
+
git cai -z --json # machine-readable
|
|
380
|
+
git cai --stats --since 2026-01-01 # date filter
|
|
381
|
+
git cai --stats --reset-stats # wipe all rows
|
|
382
382
|
```
|
|
383
383
|
|
|
384
384
|
Rows are split by `kind` (`commit`, `amend`, `squash`, `pr`) and capture provider, model, repo name, token counts, real LLM latency, and a snapshot of the active settings (language, style, emoji, temperature, prompt file).
|