Git-Vector is a command-line tool that allows developers to interact with their Git repositories using OpenAI models. It provides a conversational interface to help you understand and navigate your codebase by leveraging the full context of your repository.
- Conversational Interface: Interactively ask questions about your codebase and receive detailed explanations.
- Full Repository Context: The tool indexes your entire Git repository to provide context-aware responses.
- Caching Mechanism: Embeddings are cached to improve performance on subsequent runs.
- Customizable Models: Supports different OpenAI models for both embeddings and chat completions.
- Configurable Parameters: Adjust maximum tokens for prompts and responses to suit your needs.
pip install git-vector
-
Set Up Environment Variables:
Export your OpenAI API key as an environment variable (or use a
.env
file):export OPENAI_API_KEY=your_api_key_here
-
Run the Application:
git-vector --repo-dir /path/to/your/git/repository
This will start the interactive CLI for the user to chat with the codebase.
--repo-dir
: (Required) The path to the Git repository.--embedding-model
: The OpenAI model to use for embeddings (default:text-embedding-3-small
).--chat-model
: The OpenAI model to use for chat completions (default:gpt-4o-mini
).--max-prompt-tokens
: Maximum number of tokens for the prompt (default:2000
).--max-response-tokens
: Maximum number of tokens for the response (default:500
).
This project is licensed under the MIT License. See the LICENSE file for details.
- Markus Blomqvist - [email protected]
- OpenAI for providing the API that powers this tool.
- GitPython for interacting with Git repositories.
- NumPy and scikit-learn for numerical and machine learning.