Git-Iris uses a TOML configuration file located at ~/.config/git-iris/config.toml
. This document outlines all available configuration options and their usage.
The configuration file is organized into these main sections:
- Global settings
- Default provider
- Provider-specific configurations
-
use_gitmoji
: Boolean (optional)- Description: Enables Gitmoji in commit messages.
- Default:
false
- Example:
use_gitmoji = true
-
custom_instructions
: String (optional)- Description: Custom instructions included in all LLM prompts.
- Default:
""
- Example:
custom_instructions = "Always mention the ticket number and focus on the impact of changes."
default_provider
: String (required)- Description: The default LLM provider.
- Default:
"openai"
- Example:
default_provider = "claude"
Each provider has its own subtable under [providers]
with these fields:
-
api_key
: String (required)- Description: The provider's API key.
- Example:
api_key = "sk-1234567890abcdef"
-
model
: String (optional)- Description: The specific model to use.
- Default: Provider-dependent
- Example:
model = "gpt-4o"
-
additional_params
: Table (optional)- Description: Additional provider or model-specific parameters.
- Example:
additional_params = { temperature = "0.7", max_tokens = "150" }
-
custom_token_limit
: Integer (optional)- Description: Custom token limit for this provider.
- Default: Provider-dependent
- Example:
custom_token_limit = 8000
- OpenAI
- Default model: "gpt-o4"
- Claude
- Default model: "claude-3-sonnet-20240320"
use_gitmoji = true
custom_instructions = """
Always mention the ticket number if applicable.
Focus on the impact of changes rather than implementation details.
"""
default_provider = "openai"
[providers.openai]
api_key = "sk-1234567890abcdef"
model = "gpt-4"
additional_params = { temperature = "0.7", max_tokens = "150" }
custom_token_limit = 8000
[providers.claude]
api_key = "sk-abcdef1234567890"
model = "claude-3-sonnet-20240320"
additional_params = { temperature = "0.8" }
custom_token_limit = 100000
Use the git-iris config
command to modify settings:
git-iris config --provider openai --api-key YOUR_API_KEY
git-iris config --provider openai --model gpt-4
git-iris config --provider openai --param temperature=0.7 --param max_tokens=150
git-iris config --gitmoji true
git-iris config --custom-instructions "Your custom instructions here"
git-iris config --token-limit 8000
You can also edit the ~/.config/git-iris/config.toml
file directly with a text editor.
To add a new provider, create a new section under [providers]
:
[providers.new_provider]
api_key = "your-api-key-here"
model = "model-name"
additional_params = { param1 = "value1", param2 = "value2" }
custom_token_limit = 10000
Set it as the default provider if desired:
default_provider = "new_provider"
Note: The application code must support the new provider's API for it to function.
Git-Iris automatically optimizes token usage to maximize context while staying within provider limits. You can set a custom token limit for each provider using the custom_token_limit
option.
- Keep your API keys secret and never share your configuration file containing API keys.
- Git-Iris stores API keys in the configuration file. Ensure the file has appropriate permissions (readable only by you).
- Consider using environment variables for API keys in shared environments.
If you encounter issues:
- Verify your API keys are correct and have the necessary permissions.
- Check that you're using supported models for each provider.
- Ensure your custom instructions don't exceed token limits.
- Review the Git-Iris logs for any error messages.
For further assistance, please refer to the Git-Iris documentation or open an issue on the GitHub repository.