Metadata-Version: 2.1
Name: git-vector
Version: 0.1.0rc1
Summary: Prompt OpenAI models with git repository context
License: MIT
Author: Markus Blomqvist
Author-email: blomqvist_markus@hotmail.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: gitpython (>=3.1.43,<4.0.0)
Requires-Dist: numpy (>=2.1.1,<3.0.0)
Requires-Dist: openai (>=1.47.1,<2.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: scikit-learn (>=1.5.2,<2.0.0)
Requires-Dist: tqdm (>=4.66.5,<5.0.0)
Description-Content-Type: text/markdown

# Git-Vector

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

**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.

## Table of Contents

- [Git-Vector](#git-vector)
  - [Table of Contents](#table-of-contents)
  - [Features](#features)
  - [Installation](#installation)
  - [Usage](#usage)
  - [Configuration](#configuration)
  - [License](#license)
  - [Author](#author)
  - [Acknowledgments](#acknowledgments)

## Features

- **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.

## Installation

```bash
pip install git-vector
```

## Usage

1. **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
   ```

2. **Run the Application**:

   ```
   git-vector --repo-dir /path/to/your/git/repository
   ```

   This will start the intera`tive CLI for the user to chat with the codebase.

## Configuration

- `--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`).

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Author

- Markus Blomqvist - [blomqvist_markus@hotmail.com](mailto:blomqvist_markus@hotmail.com)

## Acknowledgments

- [OpenAI](https://openai.com) for providing the API that powers this tool.
- [GitPython](https://gitpython.readthedocs.io/en/stable/) for interacting with Git repositories.
- [NumPy](https://numpy.org/) and [scikit-learn](https://scikit-learn.org/) for numerical and machine learning
  2024-09-25 00:12:15,639 [INFO] Response provided to the user.

