A Streamlit application to analyze GitHub repositories and provide coding assistance using an AI model.
- Clone GitHub repositories and extract code.
- Generate responses to questions about the codebase.
- Modern dark-themed UI.
- Command-line argument for specifying the temp folder.
- Support for both Gemini AI and Anthropic Claude AI.
- Automatic cleanup of temp folder on exit.
- Python 3.7+
- Streamlit
- Anthropic
- Git
- Google Cloud Platform (GCP) account
- GCP project with Vertex AI enabled
-
Clone the repository:
git clone https://github.com/your-username/codey.git cd codey
-
Install the dependencies:
pip install -r requirements.txt
-
Set up your Google Cloud Platform (GCP) credentials:
- Follow these instructions to create a service account and download the JSON key file.
- Set the environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the path of the JSON key file:export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-file.json"
-
Set up your GCP project details in the
config.py
file:- Open
config.py
and set thePROJECT_ID
andLOCATION
variables to your GCP project ID and location.
Example
config.py
:PROJECT_ID = "your-gcp-project-id" LOCATION = "your-gcp-location" MODEL_ID = "your-model-id"
- Open
-
Set up your Anthropic API Key:
- Obtain your Anthropic API key from the Anthropic platform.
- Set the environment variable
ANTHROPIC_API_KEY
to your Anthropic API key:export ANTHROPIC_API_KEY="your-anthropic-api-key"
-
Run the Streamlit app with the following command:
streamlit run codey.py --temp_folder ./temp
-
Open your browser and navigate to
https://localhost:8501
.
--temp_folder
: Specify the temporary folder to store GitHub files (default:./temp
).
codey.py
: Main code to run the Streamlit application.services/code_analyzer.py
: Module for cloning and extracting code from GitHub repositories.services/streamlit_helpers.py
: Helper functions for the Streamlit app.
This project is licensed under the MIT License.