git-cai(1)
==========
Thorsten Foltz
March 2026

NAME
----
git-cai - AI-powered commit message generator

SYNOPSIS
--------
[verse]
`git cai` [-A | --amend] [-a | --all] [-C | --conventional]
        [-b | --branch] [-c | --crazy] [-d | --debug]
        [-F | --full-files | --no-full-files] [-f PATH | --files PATH]
        [-g | --generate-config]
        [-H KEY=VALUE | --set-home KEY=VALUE] [-h | --help]
        [-i | --install-completion]
        [-l [config|editor|language|model|path|provider|style] |
         --list [config|editor|language|model|path|provider|style]]
        [-m MODEL | --model MODEL]
        [-P PROVIDER | --provider PROVIDER] [-p | --generate-prompts]
        [-r | --PR] [--base BRANCH]
        [-S KEY=VALUE | --set KEY=VALUE]
        [-s [N|HASH] | --squash [N|HASH]]
        [-q true|false | --sql true|false]
        [-T SECONDS | --timeout SECONDS]
        [-t | --time] [-u | --update] [-v | --version]
        [-x CONTEXT | --context CONTEXT]
        [-z | --stats] [--since YYYY-MM-DD] [--json] [--reset-stats]


DESCRIPTION
-----------
git-cai is a Git extension that generates commit
messages from staged changes using AI.

The command is invoked as `git cai` and integrates into Git using the
standard Git extension mechanism.

git-cai behaves like `git commit`, but with the commit message pre-filled:

- It reads the staged diff (`git diff --cached`).
- It sends the diff to the configured LLM provider/model.
- It opens your configured Git editor so you can review/edit before committing.

SETUP
-----
First run / configuration:

- Run `git cai` once. If no config exists yet, git-cai creates:
  `~/.config/cai/cai_config.yml` (global config) and ensures default prompt files exist:
  `~/.config/cai/commit_prompt.md` and `~/.config/cai/squash_prompt.md`.
- Add at least one API key to `~/.config/cai/tokens.yml` (created as a template if missing).
  The YAML keys are provider names (for example: `openai`, `anthropic`, `gemini`,
  `groq`, `xai`, `mistral`, `deepseek`).
  If you use `ollama` as provider, no token is required.
- In `~/.config/cai/cai_config.yml`, set `default:` to the provider you want and
  adjust the provider block (model/temperature) as needed.

Repository-specific setup (optional):

- Put a `cai_config.yml` (or `cai_config.yaml`) into the repository root.
  This repository config is authoritative and is not merged with the home config.
- Generate a starting point with `git cai -g` (creates `cai_config.yml` in the
  current directory).

Custom prompts (optional):

- Generate prompt files in the current directory with `git cai -p`.
- Point `prompt_file` / `squash_prompt_file` in `cai_config.yml` to your custom files.

OPTIONS
-------
-A, --amend::
Regenerate and amend the last commit message. git-cai reads the diff from
the most recent commit, sends it to the configured LLM, and opens the editor
so you can review or adjust the message before amending. This is useful when
the original commit message was poorly worded or when you want the LLM to
produce a better summary.
+
Combine with `-c` to skip the editor and amend immediately.
+
Cannot be combined with `--squash` or `--list`.
+
----
git cai -A
git cai -A -c
----

-a, --all::
Stage all modified and deleted files that are already tracked by Git before
generating the commit message. This mirrors the behaviour of `git commit -a`.
Untracked (new) files are not staged; add them manually with `git add` first.
+
Cannot be combined with `--list`, `--update`, or `--squash`.
+
----
git cai -a
----

-b, --branch / --no-branch::
Include the current Git branch name as context when generating the commit
message. The LLM uses the branch name to better understand the intent and
scope of the changes (e.g., a branch named `fix/login-timeout` hints at a
bug fix related to login timeouts).
+
Use `--no-branch` to explicitly disable branch context for this run when
the persisted config has it enabled.
+
This flag applies for the current invocation only. To enable it permanently,
set `branch_context: true` in `cai_config.yml` or run:
+
----
git cai -S branch_context=true
----
+
----
git cai -b
git cai -b -c
git cai --no-branch
----

-C, --conventional / --no-conventional::
Generate the commit message in Conventional Commits format
(`type(scope): description`). The LLM is instructed to use one of the
following types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
`build`, `ci`, `chore`, `revert`. Append `!` after the type or scope to
signal a breaking change.
+
Use `--no-conventional` to explicitly disable Conventional Commits for
this run when the persisted config has it enabled.
+
This flag applies for the current invocation only. To enable it permanently,
set `conventional: true` in `cai_config.yml` or run:
+
----
git cai -S conventional=true
----
+
----
git cai -C
git cai -C -c
git cai --no-conventional
----

-c, --crazy::
Trust the LLM output and commit immediately without opening an editor.
The generated message is used as-is. Useful in scripts or when you are
confident in the LLM output.
+
Can be combined with `-A` to amend without review, or with `-C` to commit
a Conventional Commits message directly.
+
----
git cai -c
git cai -A -c
----

-d, --debug::
Enable debug logging. Produces verbose output to stderr, including
configuration loading, provider selection, prompt assembly, and the raw
LLM request/response. Helpful for troubleshooting configuration or
provider issues.
+
Cannot be combined with `--help` or `--version`.
+
----
git cai -d
----

-F, --full-files::
Send the full working-tree contents of every staged file alongside the diff.
By default, git-cai sends only the staged diff to the LLM. With `-F`, the
diff is followed by a block of the form:
+
----
--- File: path/to/file.py ---
<full contents>
----
+
for each staged text file. This produces higher-quality commit messages for
large or context-dependent changes, at the cost of more input tokens. Binary
files and files matching `.caiignore` are skipped.
+
The flag applies for the current invocation only. To enable it permanently,
set `full_files: true` in `cai_config.yml` or run:
+
----
git cai -S full_files=true
----
+
Can be combined with `-f` to scope the content dump to specific files.
+
----
git cai -F
git cai -F -f src/foo.py
----

-f, --files PATH::
Restrict the diff (and full-file content, if `-F` is on) to the given path.
Repeat the flag to pass multiple paths. `.caiignore` patterns still apply on
top of the whitelist.
+
Useful when a working tree contains unrelated staged changes and the commit
should focus on a subset of them, or when you want the LLM to concentrate
on a specific file.
+
Cannot be used with `--list`, `--update`, or `--squash`.
+
----
git cai -f src/foo.py
git cai -f src/foo.py -f tests/test_foo.py
git cai -F -f src/foo.py
----

-g, --generate-config::
Write the default `cai_config.yml` into the current directory. This is a
convenient way to create a repository-specific configuration that overrides
the home config. Edit the generated file to customise provider, model,
language, style, or other settings for this repository.
+
If a `cai_config.yml` already exists in the current directory, an error is
shown to prevent accidental overwrites.
+
----
cd /path/to/repo
git cai -g
----

-H, --set-home KEY=VALUE::
Set a configuration value in the home (default) config file at
`~/.config/cai/cai_config.yml`. Always targets the home config, even when a
repository-level config exists. Use this to change your personal defaults
that apply to all repositories without a repo-specific config.
+
Supports the same key formats as `--set`, including dot notation for nested
provider keys.
+
----
git cai -H language=de
git cai -H default=anthropic
git cai -H emoji=false
git cai -H groq.model=llama-3.3-70b
----

-h, --help::
Show a summary of available flags and usage information. When a manual page
is installed, the full manual is opened instead.

-i, --install-completion::
Install shell completion for `git cai`. Supports bash, zsh, and fish.
Completions cover all flags and provider names for `--provider`.
+
After installation, restart your terminal or source your shell configuration
file for the completions to take effect.
+
----
git cai -i
----

-l, --list [config|editor|language|model|path|provider|style]::
List information about a specific category. Provide one of the supported
list types as the next argument. Without an argument, a help text is shown
listing all valid choices.
+
----
git cai -l config
git cai -l editor
git cai -l language
git cai -l model
git cai -l path
git cai -l provider
git cai -l style
----

-m, --model MODEL::
Override the model for this invocation. Must be used together with
`--provider` (`-P`); specifying `--model` alone is an error. The model name
is passed directly to the provider's API, so it must be a valid model
identifier for that provider.
+
----
git cai -P openai -m gpt-4o
git cai -P anthropic -m claude-haiku-4-5
git cai -P ollama -m mistral
----

-P, --provider PROVIDER::
Override the LLM provider for this invocation. The model and temperature
from the configuration for that provider are used unless `--model` is also
specified. Available providers: `anthropic`, `deepseek`, `gemini`, `groq`,
`mistral`, `ollama`, `openai`, `xai`.
+
----
git cai -P anthropic
git cai -P groq -m llama-3.3-70b
----

-p, --generate-prompts::
Generate default `commit_prompt.md` and `squash_prompt.md` in the current
directory. These files serve as starting points for custom prompts. After
generating them, point `prompt_file` and/or `squash_prompt_file` in your
`cai_config.yml` to the generated files.
+
If the files already exist, an error is shown to prevent accidental
overwrites.
+
----
git cai -p
----

-q, --sql VALUE::
Per-invocation override for `stats.enabled`. VALUE is `true` or `false`
(also accepts `yes/no`, `on/off`, `1/0`). Wins over the persisted config
value. Useful for one-off opt-in or opt-out without editing the config.
+
----
git cai --sql true       # record this commit even when config has stats off
git cai -q false         # don't record this commit even when config has stats on
----

-r, --PR::
Generate a Pull Request description summarizing the commits between the
current branch and its base branch. git-cai collects the commit messages
and the list of files changed since the branch diverged, sends them to
the configured LLM, and produces a Markdown description with `## Summary`
and `## Test plan` sections.
+
This mode never modifies git state: no commit, no reset, no force push.
+
By default the generated description is printed to stdout. To write it to
a file in the repository root instead, set `pr_to_file: true` in
`cai_config.yml`. The filename defaults to `PR_DESCRIPTION.md` and can be
changed via `pr_file_name`. Configuration follows the same precedence as
every other key (repository config wins; otherwise home config; otherwise
built-in defaults).
+
The base branch is auto-detected in this order: `origin/HEAD`, then local
`main`, then local `master`. Use `--base` to override.
+
Cannot be combined with `--amend`, `--list`, `--squash`, or `--update`.
Can be combined with `--context` to inject extra context (e.g. a ticket
number or reviewer ask).
+
----
git cai -r
git cai --PR
git cai -r --base develop
git cai -r -x "Closes JIRA-1234"
----

--base BRANCH::
Explicit base branch for `--PR`. Overrides the auto-detection chain
(`origin/HEAD` -> `main` -> `master`). Useful for repositories whose base
branch is not `main`/`master` or that lack `origin/HEAD`.
+
Only meaningful in combination with `--PR` (`-r`).
+
----
git cai -r --base develop
git cai -r --base release/1.x
----

-S, --set KEY=VALUE::
Set a configuration value in the repository config (`cai_config.yml` in the
repository root). Requires an existing repo config; if none is found, an
error is shown with a hint to use `--set-home` (`-H`) to change the default
config or `git cai -g` to create a repo config first.
+
Supports dot notation for nested provider keys (e.g., `groq.model`).
Values are auto-parsed: `true`/`false` become booleans, numeric strings
become integers or floats, everything else stays a string.
+
----
git cai -S default=anthropic
git cai -S emoji=false
git cai -S groq.model=llama-3.3-70b
git cai -S openai.temperature=0.7
git cai -S conventional=true
----

-s, --squash [N|HASH]::
Squash commits on the current branch into a single commit with an
LLM-generated summary message. git-cai collects the individual commit
messages, sends them to the LLM, and opens the editor for review. After
confirmation, a soft reset is performed and the squashed commit is created.
+
Without an argument, all commits since the branch diverged from the base
branch are squashed (default behaviour).
+
With a number `N`, the last N commits are squashed. If N exceeds the number
of commits on this branch (since it diverged), a warning is shown and
confirmation is required. If N exceeds the total number of commits in the
repository, an error is shown and the operation is aborted.
+
With a commit hash, all commits from HEAD down to and including the given
commit are squashed. The commit must exist in the current branch history.
+
This rewrites history. A force push is required to update a remote branch.
git-cai will prompt before executing the force push.
+
----
git cai -s
git cai -s 3
git cai -s a1b2c3d
----

-T, --timeout SECONDS::
Override the HTTP timeout for the LLM call in this invocation. The default
is 30 seconds for remote providers and 300 seconds for Ollama (since local
generation can be significantly slower). The override applies uniformly to
whichever provider is selected for this run.
+
To change the default permanently, set `timeout: <seconds>` in
`cai_config.yml` or the home config:
+
----
git cai -H timeout=60
git cai -S timeout=45
----
+
Ollama keeps its own timeout under `ollama.timeout` (default 300). Override
it separately:
+
----
git cai -H ollama.timeout=600
----
+
----
git cai -T 60
git cai -T 120 -P anthropic
----

-t, --time::
Measure and log the wall-clock time taken to generate the commit message.
The duration is printed to stderr after the LLM responds. Useful for
comparing provider/model performance.
+
Can also be enabled permanently via `measure_time: true` in
`cai_config.yml`.
+
----
git cai -t
----

-u, --update::
Check PyPI for a newer version of git-cai-cli. If an update is available,
the new version number and the install command are printed.
+
----
git cai -u
----

-v, --version::
Print the installed version of git-cai-cli and exit. The version is derived
from git tags via `setuptools-scm`.
+
----
git cai -v
----

-x, --context CONTEXT::
Provide extra context for the LLM to consider when generating the commit
message. The context string is appended to the diff (or commit history in
squash mode, or the commit list in PR mode) before sending it to the
provider. This is useful for including information that is not visible in
the diff itself, such as a ticket number, the reason for a change, or a
link to an issue.
+
Can be combined with `COMMIT`, `AMEND`, `SQUASH`, or `PR` modes.
Cannot be used with `--list` or `--update`.
+
----
git cai -x "Fixes JIRA-1234"
git cai -x "Performance optimisation for the search endpoint"
git cai -A -x "Reword after code review feedback"
git cai --squash -x "Resolves JIRA-99"
git cai -r -x "Closes JIRA-1234"
----

-z, --stats::
Show local-only usage analytics: commits and squashes generated, top
provider, total token counts, average latency, and per-provider rollups.
Recording is opt-in via the top-level `stats` config key (a plain
boolean, default `false`), so this view is empty until you turn writing
on. No diff content, commit messages, or file paths are stored — only
metadata.
+
The DB lives at `$XDG_DATA_HOME/git-cai/stats.db` (default
`~/.local/share/git-cai/stats.db`). Override with the top-level
`stats_db_path` config key.
+
At the start of every run, git-cai logs whether stats writing is
enabled and (when enabled) the path of the SQLite database, so users
always know where their analytics live.
+
If the running Python build was compiled without sqlite3, this command
prints a clear message explaining how to fix it; commit generation
continues to work normally in that case.
+
The `stats` (and `stats_db_path`) keys are the one configuration
exception that does not follow the strict repo-replaces-home rule:
when the repo `cai_config.yml` does not mention them, the values are
taken from the home `~/.config/cai/cai_config.yml`. If neither file
defines `stats`, the hardcoded default is `false`. Use `git cai -g` to
write a fresh config that includes the setting so it is visible.
+
Cannot be combined with `--amend`, `--list`, `--PR`, `--squash`, or
`--update`.
+
Modifiers for `--stats`:
+
`--since YYYY-MM-DD`;;
Restrict output to events recorded on or after this UTC date. The date
format is strict ISO-8601 (e.g. `2026-01-15`).
+
`--json`;;
Emit output as a JSON document instead of the text summary. Suitable
for piping into `jq` or other tooling.
+
`--reset-stats`;;
Delete every row from the local stats SQLite DB and exit. Prints the
number of rows removed. The schema and DB file are preserved (so the
next opt-in run records into the same file). No-op when the DB does
not yet exist.
+
----
git cai -z
git cai --stats
git cai -z --since 2026-01-01
git cai -z --json
git cai -z --json --since 2026-01-01 | jq '.per_provider'
git cai --stats --reset-stats
----

LIST TYPES
----------
The argument to `--list` must be one of the following:

config::
Show the active (effective) configuration. This displays the fully resolved
configuration that git-cai is currently using, including all provider blocks,
global settings, and any overrides from repository-level config files.
+
This is useful for verifying which settings are in effect, especially when a
repository config overrides the home config. Nested provider blocks (model,
temperature) are displayed indented under their provider name.
+
----
git cai -l config
----
+
Example output:
+
----
Active configuration:

  default: groq
  language: en
  style: professional
  emoji: true
  groq:
    model: moonshotai/kimi-k2-instruct
    temperature: 0
  ...
----

editor::
List supported and tested editors as default git editor. Most likely more
editors will work. git-cai uses the same editor resolution as Git itself
(`GIT_EDITOR`, `VISUAL`, `EDITOR` environment variables).

language::
List all 121 supported languages for commit message generation. Languages
are displayed sorted alphabetically by their human-readable name, each
followed by their language code. The language code is what you set in
`cai_config.yml` under the `language` key.
+
----
git cai -l language
----
+
Example output (excerpt):
+
----
Available languages:
  - English → en
  - French → fr
  - German → de
  - Japanese → ja
  - Klingon → tlh
  ...
----

model::
Show the default model for each supported provider. This displays the model
name that git-cai uses out of the box if no custom model is configured.
Models are listed alphabetically by provider name.
+
Note: these are the built-in defaults. If you have overridden a model in
your `cai_config.yml`, the override is not shown here. Use `--list config`
to see the effective configuration including overrides.
+
----
git cai -l model
----
+
Example output:
+
----
Default models:

  anthropic    → claude-haiku-4-5
  deepseek     → deepseek-chat
  gemini       → gemini-2.5-flash
  groq         → moonshotai/kimi-k2-instruct
  mistral      → codestral-2508
  ollama       → llama3.1
  openai       → gpt-5.2
  xai          → grok-4-1-fast-reasoning
----

path::
Show all resolved configuration file paths. This displays the locations
of the config directory, home config file, tokens file, and whether a
repository-specific config file is present. The active config source
(repository or home) is shown at the bottom.
+
This is particularly useful for debugging configuration issues or when
you are unsure which config file git-cai is reading.
+
----
git cai -l path
----
+
Example output (no repo config):
+
----
Configuration file paths:

  Config directory:      /home/user/.config/cai
  Home config:           /home/user/.config/cai/cai_config.yml
  Tokens file:           /home/user/.config/cai/tokens.yml
  Repository config:     not found

  Active config source:  home
----
+
Example output (with repo config):
+
----
Configuration file paths:

  Config directory:      /home/user/.config/cai
  Home config:           /home/user/.config/cai/cai_config.yml
  Tokens file:           /home/user/.config/cai/tokens.yml
  Repository config:     /home/user/project/cai_config.yml  (active)

  Active config source:  repository
----

provider::
List all supported LLM providers. Each provider is shown with its default
model and whether an API token is required. Providers that do not require a
token (currently only `ollama`) are marked accordingly.
+
----
git cai -l provider
----
+
Example output:
+
----
Supported providers:

  anthropic    model: claude-haiku-4-5                    (token required)
  deepseek     model: deepseek-chat                      (token required)
  gemini       model: gemini-2.5-flash                   (token required)
  groq         model: moonshotai/kimi-k2-instruct        (token required)
  mistral      model: codestral-2508                     (token required)
  ollama       model: llama3.1                           (no token required)
  openai       model: gpt-5.2                            (token required)
  xai          model: grok-4-1-fast-reasoning            (token required)
----

style::
Show available commit message styles with descriptions and examples. The
style controls the tone of the generated commit message. Set the style in
`cai_config.yml` or override it per invocation with `--set style=<name>`.
+
Available styles: `academic`, `apologetic`, `excited`, `friendly`, `funny`,
`neutral`, `none`, `professional` (default), `sarcastic`.
+
The special style `none` omits the style instruction from the prompt
entirely, letting the model choose its own tone.
+
----
git cai -l style
----

CONFIGURATION
-------------
Configuration precedence:

1. Repository config: `<repo-root>/cai_config.yml` or `<repo-root>/cai_config.yaml`
2. Home config: `~/.config/cai/cai_config.yml`
3. Built-in defaults (written to the home config file on first run)

Authentication tokens are loaded from:

----
$HOME/.config/cai/tokens.yml
----

Config is loaded by default from:

----
$HOME/.config/cai/cai_config.yml
----

cai_config.yml (or cai_config.yaml) can be loaded from the root of a repository.
If present, it replaces the home config for that repository.

Tokens can be loaded from everywhere defined within "load_tokens_from"
in cai_config.yml

Available configuration keys:

- `default` -- default LLM provider name
- `language` -- language for commit messages (e.g., `en`, `de`, `fr`)
- `style` -- tone of the commit message (`professional`, `neutral`, `friendly`,
  `funny`, `excited`, `sarcastic`, `apologetic`, `academic`)
- `emoji` -- enable or disable emojis in commit messages (`true`/`false`)
- `branch_context` -- include current branch name as LLM context (`true`/`false`)
- `conventional` -- use Conventional Commits format (`true`/`false`)
- `load_tokens_from` -- path to the tokens file
- `prompt_file` -- path to the commit prompt Markdown file
- `squash_prompt_file` -- path to the squash prompt Markdown file
- `token_logging` -- log token usage after each LLM call (`true`/`false`)
- `measure_time` -- log generation time (`true`/`false`)
- `timeout` -- HTTP timeout in seconds for remote LLM calls (default `30`)
- `full_files` -- send full working-tree contents of staged files alongside
  the diff (`true`/`false`, default `false`)
- `pr_to_file` -- when running `--PR`, write the generated PR description
  to a Markdown file in the repository root instead of printing it to
  stdout (`true`/`false`, default `false`)
- `pr_file_name` -- filename used when `pr_to_file` is `true` (default
  `PR_DESCRIPTION.md`). The file is written in the repository root and
  overwritten on each run.
- `pr_prompt_file` -- path to a custom Markdown prompt file used by
  `--PR`. Follows the same fallback chain as `prompt_file` /
  `squash_prompt_file`: configured path -> `~/.config/cai/pr_prompt.md` ->
  built-in fallback.
- `<provider>.model` -- model name for a specific provider
- `<provider>.temperature` -- temperature for a specific provider
- `anthropic.max_tokens` -- upper bound on Anthropic response tokens
  (default `32768`)
- `ollama.timeout` -- HTTP timeout in seconds for Ollama generation calls
  (default `300`; overrides the global `timeout` for this provider only)
- `stats` -- opt in to local-only usage analytics (`true`/`false`,
  default `false`). When enabled, every generation appends one row to
  `~/.local/share/git-cai/stats.db` capturing kind, repo name, provider,
  model, token counts, real LLM latency, and a snapshot of the active
  settings (language, style, emoji, temperature, prompt file). No diff
  content, commit messages, or file paths are stored. View the rollup
  with `git cai -z` (`--stats`).

FILES
-----
`~/.config/cai/cai_config.yml`::
Global configuration (created automatically if missing).

`~/.config/cai/tokens.yml`::
Provider API keys (created as a template if missing).

`~/.config/cai/commit_prompt.md` and `~/.config/cai/squash_prompt.md`::
Default prompt files (created automatically if missing/empty). You can point
`prompt_file` and `squash_prompt_file` to other locations.

`<repo-root>/cai_config.yml` or `<repo-root>/cai_config.yaml`::
Optional repository-specific configuration. When present, replaces the home
config entirely for that repository.

`<repo-root>/.caiignore`::
Optional ignore file. Patterns are appended as exclusions when git-cai runs
`git diff --cached`.

EDITOR
------
git-cai uses the same editor resolution as Git (via `git var GIT_EDITOR` and the
usual `GIT_EDITOR`/`VISUAL`/`EDITOR` environment variables).

In the default commit-message flow, git-cai opens an editor with the generated
message in a temporary file:

- Save and exit to continue with the commit.
- Close without saving to abort.

If you use a GUI editor, the template starts with a line `# DELETE THIS LINE...`.
Delete it to accept the commit.

EXAMPLES
--------
Generate a commit message from staged changes:

----
git add -A
git cai
----

Stage tracked changes (like `git commit -a`) and generate a message:

----
git cai -a
----

Regenerate and amend the last commit message:

----
git cai -A
----

Amend without opening the editor:

----
git cai -A -c
----

Use Conventional Commits format:

----
git cai -C
----

Commit immediately without opening the editor:

----
git cai -c
----

Squash all commits on the current branch into one (rewrites history):

----
git cai -s
----

Squash the last 3 commits:

----
git cai -s 3
----

Squash all commits down to and including a specific commit:

----
git cai -s a1b2c3d
----

Generate a Pull Request description from the current branch (prints to
stdout):

----
git cai -r
git cai --PR
----

Generate a PR description against an explicit base branch:

----
git cai -r --base develop
----

Write the PR description to a file in the repository root (set once in
`cai_config.yml`, then run normally):

----
git cai -S pr_to_file=true
git cai -S pr_file_name=PR.md
git cai -r
----

Generate a PR description with extra context:

----
git cai -r -x "Closes JIRA-1234"
----

Show supported styles, languages, or editors:

----
git cai -l style
git cai -l language
git cai -l editor
----

Show supported providers and their default models:

----
git cai -l provider
git cai -l model
----

Show the active configuration and file paths:

----
git cai -l config
git cai -l path
----

Override the provider for a single invocation:

----
git cai -P anthropic
----

Override both provider and model:

----
git cai -P openai -m gpt-4o
----

Change a value in the repo config:

----
git cai -S default=anthropic
git cai -S groq.model=llama-3.3-70b
git cai -S emoji=false
----

Change a value in the home (default) config:

----
git cai -H language=de
git cai -H default=openai
----

Include branch name as context:

----
git cai -b
git cai -b -C
----

Provide extra context for the commit message:

----
git cai -x "Fixes JIRA-1234"
git cai -x "Refactored to reduce memory usage on large datasets"
----

Measure generation time:

----
git cai -t
----

Send full file contents in addition to the diff:

----
git cai -F
git cai -F -f src/foo.py
----

Limit generation to specific files:

----
git cai -f src/foo.py
git cai -f src/foo.py -f tests/test_foo.py
----

Override the HTTP timeout for a single run:

----
git cai -T 60
git cai -T 120 -P anthropic
----

Install shell completion:

----
git cai -i
----

Check for updates:

----
git cai -u
----

SEE ALSO
--------
git(1)
