Talk to Code is a Python-based tool that allows you to have a conversation with any GitHub repository. By cloning the repository and processing its contents, it enables you to ask questions about the codebase and receive AI-generated explanations and insights using Google's Gemini model.
- Repo Cloning: Automatically clones any public GitHub repository.
- Codebase Analysis: Ingests the entire file structure and content for context.
- Interactive Chat: Ask questions about the code in natural language.
- Markdown Output: Saves detailed responses to
output.mdfor easy reading.
- Python 3.8 or higher
- Git installed and accessible in your terminal
- A Google Gemini API Key
-
Clone this repository:
git clone https://github.com/aidankeighron/talk-to-code cd talk-to-code -
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.envfile in the project root. -
Add your GitHub repository URL and Gemini API key:
GITHUB_REPO=https://github.com/username/repository GEMINI_API_KEY=your_api_key_here
You can get a free Gemini API key from Google AI Studio.
-
Run the main script:
python main.py
-
Wait for the repository to be cloned and processed.
-
Enter your questions when prompted.
-
Type
qto exit the program. -
View the answers in the generated
output.mdfile.