LLMRepo is a tool that allows users to interact with GitHub repositories through natural language. By leveraging Gemini LLM, users can ask questions about code, get explanations, summaries, and insights about repositories.
- Python 3.10+ with pip
- Node.js 16+ with npm (must be installed and available in your PATH)
- Gemini API key (get one from Google AI Studio)
-
Clone the repository
git clone <repository-url> cd LLMRepo -
Set up the backend
# Create and activate a virtual environment (optional but recommended) python -m venv venv # On Windows .\venv\Scripts\activate # On macOS/Linux source venv/bin/activate # Install Python dependencies pip install -r requirements.txt -
Set up the frontend
cd frontend npm install cd .. -
Configure environment variables
- Create a
.envfile in the root directory - Add your Gemini API key:
GEMINI_API_KEY=your_api_key_here - Optionally, you can add a GitHub access token for accessing private repositories or to avoid rate limits:
GITHUB_TOKEN=your_github_token_here
- Create a
Option 1: Using the main script (recommended) (this is giving errors atm, if you know coding- pls fix)
python main.py
This script will:
- Check and install dependencies if needed
- Start the backend server
- Start the frontend development server
- Open the application in your default web browser
Option 2: Manual startup
-
Start the backend server:
# From the project root python backend/main.py OR python -m uvicorn backend.main:app --reloadThe backend will run at http://localhost:8000
-
Start the frontend server:
# From the project root cd frontend npm run devThe frontend will run at http://localhost:5173
-
Open your browser and navigate to http://localhost:5173
If using the main script, press Ctrl+C in the terminal to stop both servers.
If starting manually, press Ctrl+C in each terminal window to stop the respective server.
If you see an error like FileNotFoundError: [WinError 2] The system cannot find the file specified when running the application, it means Node.js or npm is not installed or not in your PATH.
Solution:
- Install Node.js v16+ from nodejs.org
- Make sure Node.js is added to your PATH during installation
- Restart your terminal/command prompt after installation
- Verify installation by running
node -vandnpm -v
If you see a message like ❌ npm command not found in PATH but Node.js is detected, it means npm is not properly installed or not in your PATH.
Solution:
- Reinstall Node.js from nodejs.org and ensure you select the option to install npm during installation
- Make sure the npm installation directory is in your PATH
- On Windows, the npm path should be in the same directory as Node.js
- Restart your terminal/command prompt after making changes
- Verify npm is available by running
npm -v
- Repo Q&A – Ask questions about a GitHub repository and get answers based on code, README, and documentation
- Code Summarization – Generate concise summaries of files, functions, or entire repositories
- Code Explanation – Break down complex code snippets into simple explanations
- Dependency Analysis – Identify libraries used and explain their purpose
- Commit History Insights – Summarize recent commits and highlight important changes
- PR & Issue Insights – Explain the purpose of pull requests or issues in plain English
- Auto-Generated Documentation – Convert code comments and function definitions into detailed documentation
- Bug Detection & Fix Suggestions – Analyze code for potential bugs and suggest fixes
- Code Refactoring – Suggest improvements for cleaner, more efficient code
- Test Case Generation – Auto-generate test cases based on function definitions
- Interactive Chat Mode – Chat with repositories in a conversational manner
- AI Code Review – Provide feedback on code quality, security, and best practices
- Historical Code Evolution – Track how a function or file evolved over time
- Frontend: React.js
- Backend: Python (FastAPI)
- LLM: Google's Gemini API
- GitHub API for repository access