A fully interactive tool designed to streamline your GitHub repository prompt generation process and facilitate RAG (Retrieval-Augmented Generation) workflows
- Below is the high-level architecture of the system:
- 🌟 Features
- 🛠️ Installation
- 🚀 Usage
- ⚙️ Configuration
- 📖 Interactive Commands
- 🎨 Icons and Badges
- 🧪 Example
- 🤖 Technologies Used
- 📃 License
- 🤝 Contributing
- Interactive Mode: Easily input repository details and start generating prompts through a user-friendly interface.
- RAG Support: Engage in interactive Retrieval-Augmented Generation sessions with real-time question answering about your repositories.
- Environment Variable Management: Supports environment-based configurations for quick and seamless setup.
- Error Handling: Robust error handling to ensure smooth operations during interactive sessions.
- Clear Command Interface: Offers a set of easy-to-use commands for RAG sessions, including options to clear history or exit the session.
Follow these steps to get started with RepoRAG:
- Clone the repository:
$ git clone https://github.com/ahammadnafiz/RepoRAG.git
- Navigate to the project directory:
$ cd RepoRAG
- Install the required dependencies:
$ pip install -r requirements.txt
-
Create a
.env
file to store your environment variables (see Configuration). -
Download NLTK Data
python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"
Run the interactive mode directly from your terminal:
$ python reporag.py
- Step 1: Enter the repository URL in the format
owner/repo
. - Step 2: Provide your GitHub access token.
- Step 3: Specify the output file name for the generated prompt.
- Step 4: Choose the desired mode:
1
: Generate a prompt file only.2
: Generate a prompt file and start a RAG session.
Create a .env
file in the root directory to store your environment variables:
GITHUB_ACCESS_TOKEN=your_github_token
GROQ_API_KEY=your_groq_api_key
Environment Variables Explained:
GITHUB_ACCESS_TOKEN
: Your personal GitHub token for accessing private repositories.GROQ_API_KEY
: API key required for advanced RAG functionalities.
When running in RAG mode, you can use the following commands:
Command | Description |
---|---|
exit |
Exit the RAG session |
help |
Display available commands |
clear |
Clear the conversation history |
Supported Technologies:
- Python 3.8+
- GitHub API
- dotenv for environment variable management
=== RepoRAG Interactive Mode ===
Enter the GitHub repository URL (format: owner/repo): ahammadnafiz/RepoRAG
GitHub access token not found in .env. Please enter your token: ********
Enter the output file name for the prompt (e.g., output_prompt.txt): my_prompt.txt
Available modes:
1. Generate prompt file only
2. Generate prompt file and start RAG mode
Enter your choice (1/2): 2
- Python: Core language for the tool.
- dotenv: For environment variable management.
- Typing: Used for type hints and validation.
- GitHub API: To interact with GitHub repositories.
This project is licensed under the MIT License. See the LICENSE file for details.
We welcome contributions to RepoRAG! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add your feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a pull request.