Git AI Configuration
Configure Git AI's behavior using the config.json file.
Git AI's behavior can be configured on developer machines by writing a JSON file in the user's home directory, or by using the git-ai config CLI commands.
On Linux and macOS, this file is located at $HOME/.git-ai/config.json.
On Windows, this file is located at %USERPROFILE%\.git-ai\config.json.
Using git-ai config
You can view and manage configuration directly from the command line instead of editing the JSON file by hand.
# Show all effective configuration as formatted JSON
git-ai config
# Show a specific config value
git-ai config <key>
# Set a config value
git-ai config set <key> <value>
# Add to an array value (extends existing entries instead of replacing)
git-ai config set <key> <value> --add
git-ai config --add <key> <value>
# Remove a config value (reverts to its default)
git-ai config unset <key>Repository pattern resolution
For repository array fields (allow_repositories, exclude_repositories, exclude_prompts_in_repositories), values can be provided as:
- Glob patterns —
"*","https://github.com/org/*" - URLs / git protocols —
"git@github.com:org/repo.git" - Local file paths —
"."or"/path/to/repo"(automatically resolves to the repository's remote URLs)
# Exclude the current repo using path resolution
git-ai config set exclude_repositories .
# Add another repo by path
git-ai config --add exclude_repositories ~/projects/my-repo
# Set with a glob pattern
git-ai config set allow_repositories "https://github.com/myorg/*"
# Add a feature flag using dot notation
git-ai config --add feature_flags.my_flag trueConfiguration Options
All options in config.json are optional and will fall back to default values if not provided.
| Option | Type | Description | Default |
|---|---|---|---|
git_path | Path | The path to the (unaltered) git binary you distribute on developer machines | Whichever git is on the shell path |
prompt_storage | "default" | "notes" | "local" | Controls where prompt data is stored. default = local/enterprise, notes = include in git notes, local = local SQLite only | "default" |
exclude_prompts_in_repositories | Pattern[] | Exclude prompts from authorship logs for repositories matching these patterns. Supports glob patterns (e.g., https://github.com/myorg/*). Use "*" to exclude all. | Empty list (no exclusions) |
allow_repositories | Pattern[] | Allow git-ai in only these remotes. Supports glob patterns (e.g., https://github.com/myorg/*) | If not specified or set to an empty list, all repositories are allowed |
exclude_repositories | Pattern[] | Exclude git-ai from these remotes. Supports glob patterns (e.g., https://github.com/myorg/*) | If a repository is present in both allow and exclude lists, exclusion takes precedence |
telemetry_oss | "off" | Disable OSS performance metrics and error logging sent to Git AI maintainers | Defaults to enabled |
telemetry_enterprise_dsn | string | A Sentry DSN to use to send yourself performance metrics and error logging | Defaults to none |
disable_version_checks | boolean | Skip automated version checks that would otherwise run on fetch/pull/push | false |
disable_auto_updates | boolean | Keep checking for updates but never install them automatically | false |
update_channel | "latest" | "next" | Release channel to follow (latest = stable, next = prerelease) | "latest" |
quiet | boolean | Suppress chart output after commits | false |
include_prompts_in_repositories | Pattern[] | Repositories to include for prompt storage (array). Used with default_prompt_storage for per-repo overrides. | Empty list |
default_prompt_storage | "default" | "notes" | "local" | Fallback storage mode for repositories not matched by include_prompts_in_repositories | None |
feature_flags | object | Feature flag overrides. Set nested keys with dot notation (e.g., feature_flags.my_flag) | {} |
Example Configuration
{
"git_path": "/usr/bin/git",
"prompt_storage": "notes",
"allow_repositories": [
"https://github.com/yourorg/*"
],
"disable_auto_updates": false,
"update_channel": "latest"
}