Skip to content

michaelpeluso/git-guru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This document was generated using only the resources within this repository - minus the live demo.

GitGuru

Table of Contents

  1. Project Overview
  2. Features
  3. Demo
  4. Requirements and Dependencies
  5. Installation and Execution
  6. File Structure
  7. Logging System
  8. Troubleshooting and FAQ

Project Overview

The GitGuru project is designed to streamline the process of generating a custom README.md file for GitHub repositories. It leverages artificial intelligence to analyze code snippets and create a comprehensive README.md document.

Features

  • AI-Powered README Generation
  • Error Detection
  • Inquiry-Based Assistance

Slicing

Slicing refers to the process of dividing code snippets into manageable segments. This allows the AI to analyze smaller blocks of code rather than overwhelming it with large chunks. By breaking down the input, the system can focus on understanding the functionality and purpose of each segment, leading to more accurate and relevant README generation.

Embedding

Embedding is a technique used to convert code snippets into numerical representations that capture semantic meaning. This transformation allows the AI to understand the relationships between various pieces of code and their contexts. By embedding code snippets, the system can effectively gauge their relevance to the overall project, enhancing the quality of the generated documentation.

Storing in the Database

The project makes use of a robust database system to store embedded representations of the code snippets. This storage allows for quick retrieval and analysis of previously processed snippets, enabling the AI to draw from a wealth of information when generating documentation. The database is designed to maintain efficiency and speed, ensuring that the AI can operate without lag, even when processing extensive codebases.

Demo

GitGuru-Demo.mp4

Requirements and Dependencies:

  • Python 3.8
  • Required Python packages specified in the requirements.txt file
  • OpenAI API key (obtain from OpenAI platform)
  • Chroma path for vectorstore operations
  • Your Github repository URL

Installation and Execution

  1. Quickstart
  • Clone this repository to your local machine.
  • Navigate to the repository directory.
  • Install the required dependencies using pip install -r requirements.txt.
  • Run python main.py in your terminal.
  1. Start Python Virtual Environment: Open a terminal window. Navigate to the project directory. Create a new Python virtual environment by running the command:
python -m venv venv

Activate the virtual environment:

  • On Windows:
venv\Scripts\activate
  • On macOS and Linux:
source venv/bin/activate
  1. Install Requirements:
  2. Make sure you are in the virtual environment. Install the required dependencies from the requirements.txt file by running the command:
pip install -r requirements.txt
  1. Execute Commands: To run the application in on your browser, use the following command:
python main.py

To run the application in debug mode, use the following command:

python main.py debug

To run the backend functionality in the terminal, use:

python main.py backend

Logging System

The logging system in this project is designed to track API usage and store relevant information in log files. The system initializes the logs directory and log file if they do not already exist. Each log entry includes a timestamp, action performed, tokens input, tokens output, and cost associated with the action. The log file is appended with each new log entry to maintain a history of API usage.

File Structure

.
.
├── .gitignore
├── .gitmodules
└── app
    ├── __init__.py
    └── backend
        ├── __init__.py
        ├── create_database.py
        ├── repo_retrieval.py
        └── utils
            ├── ai_interactions.py
            ├── file_manager.py
            ├── get_api_limit.py
            └── log_manager.py
    └── frontend
        └── static
            └── css
                ├── global.css
                ├── index.css
                ├── query.css
                └── select-files.css
            └── js
                ├── index.js
                ├── query.js
                └── select-files.js
        └── templates
            ├── index.html
            ├── query.html
            └── select-files.html
├── __init__.py
├── main.py
├── package-lock.json
├── readme.md
└── requirements.txt

Troubleshooting and FAQ

  • If you encounter any issues during the installation process, please ensure you have the correct versions of Python and pip installed.
  • If the README.md file is not generating as expected, ensure that your code snippets are relevant to your project.

Please note that this README.md file is generated and may not reflect the actual project's README.md file.

About

An AI-powered tool delivering instant programmatic support and automating README generation for GitHub repositories through text embedding, retrieval-augmented generation, and vector search.

Topics

Resources

Stars

Watchers

Forks

Contributors