GitSage
Configuration

Config Reference

GitSage reads configuration from ~/.git-sage.json. This file is created automatically the first time you run gitsage config.

Full Configuration File

~/.git-sage.json
12345678
{
"ai_provider": "gitsage",
"model": "gitsage-fast",
"auto_commit": false,
"max_length": 72,
"style": "conventional",
"telemetry": true
}

Parameters

ai_provider
stringdefault: "gitsage"

The intelligence engine to use. "gitsage" uses the GitSage API Cloud; "local" routes to Ollama.

Values: "gitsage" | "local"

model
stringdefault: "gitsage-fast"

The specific model. For local: "mistral", "llama3", "codellama", etc.

Values: Any valid model ID

auto_commit
booleandefault: false

If true, automatically commits without asking for confirmation when confidence is high (≥ 85%).

Values: true | false

max_length
numberdefault: 72

Maximum character length for the commit subject line.

Values: 40–120

style
stringdefault: "conventional"

Commit message formatting style. Conventional Commits is recommended.

Values: "conventional" | "simple" | "detailed"

telemetry
booleandefault: true

Anonymous usage telemetry to help improve GitSage. No code or diff data is ever sent.

Values: true | false

Setting Config via CLI

You can update configuration directly from the terminal without editing the JSON file:

bash
123456789101112
# Set commit message style (conventional, simple, emoji)
gitsage config --style conventional
# Enable or disable anonymous usage tracking
gitsage config --telemetry
gitsage config --no-telemetry
# Reset all preferences to defaults
gitsage config --reset
# View current config
gitsage config --help

API Key Setup

Get your production API key from the GitSage Portal. Set it as an environment variable for security:

~/.bashrc or ~/.zshrc
1
export GITSAGE_API_KEY="gs_prod...your-key-here"

Security: Never commit your API key to version control. GitSage stores it encrypted in ~/.git-sage.json, which is outside your repo.

GitSage Docs

View on GitHub