Git AI

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"[email protected]: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 true

Configuration Options

All options in config.json are optional and will fall back to default values if not provided.

OptionTypeDescriptionDefault
git_pathPathThe path to the (unaltered) git binary you distribute on developer machinesWhichever 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_repositoriesPattern[]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_repositoriesPattern[]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_repositoriesPattern[]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 maintainersDefaults to enabled
telemetry_enterprise_dsnstringA Sentry DSN to use to send yourself performance metrics and error loggingDefaults to none
disable_version_checksbooleanSkip automated version checks that would otherwise run on fetch/pull/pushfalse
disable_auto_updatesbooleanKeep checking for updates but never install them automaticallyfalse
update_channel"latest" | "next"Release channel to follow (latest = stable, next = prerelease)"latest"
quietbooleanSuppress chart output after commitsfalse
include_prompts_in_repositoriesPattern[]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_repositoriesNone
feature_flagsobjectFeature 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"
}